@3deye-toolkit/react-event-list 0.0.1-alpha.8 → 0.0.1

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.
@@ -0,0 +1,73 @@
1
+ import { default as React_2 } from 'react';
2
+
3
+ declare class CameraEvent {
4
+ cameraId: number;
5
+ type: EventType;
6
+ raw: RawSensorEvent;
7
+ thumbnailUrl: string;
8
+ detectedObjects: DetectedObject[];
9
+ faces: Face[];
10
+ instant: boolean;
11
+ get id(): number;
12
+ get startTime(): Date;
13
+ get endTime(): Date;
14
+ get isLive(): boolean;
15
+ get acknowledged(): boolean;
16
+ constructor(raw: RawSensorEvent);
17
+ }
18
+
19
+ declare interface DetectedObject {
20
+ Type: string;
21
+ Value?: string;
22
+ Number?: string;
23
+ Box: {
24
+ Left: number;
25
+ Top: number;
26
+ Right: number;
27
+ Bottom: number;
28
+ };
29
+ Probability: number;
30
+ Colors?: {
31
+ Color: string;
32
+ }[];
33
+ }
34
+
35
+ declare const EventList: React_2.FC<Props>;
36
+ export default EventList;
37
+
38
+ declare type EventType = 'Motion' | 'Tampering' | 'PanTiltZoom' | 'CrossLine' | 'Intrusion' | 'LicensePlate' | 'FaceDetection' | 'Audio' | 'Analytic' | 'SpeedDetection' | 'PeopleCounter' | 'Temperature' | 'PoS' | 'GPS' | 'DigitalInput' | 'Normal' | 'Suspicious' | 'Loitering' | 'Vandalism' | 'Trespass' | 'Emergency' | 'LifeInDanger' | 'ErroneousAlert' | 'Misidentification' | 'Fire' | 'MedicalDuress' | 'HoldUp' | 'CheckIn' | 'CheckOut' | 'ClockIn' | 'ClockOut' | 'ParkingStart' | 'ParkingEnd' | 'ParkingViolation' | 'GateAccess' | 'DoorAccess' | 'TemperatureCheck' | 'IDCheck' | 'PPECheck' | 'WelfareCheck' | 'Uncategorized' | 'Unknown';
39
+
40
+ declare interface Face {
41
+ PersonId: number;
42
+ Name: string;
43
+ Box: {
44
+ Left: number;
45
+ Top: number;
46
+ Right: number;
47
+ Bottom: number;
48
+ };
49
+ Probability: number;
50
+ }
51
+
52
+ declare interface Props extends React_2.HTMLAttributes<HTMLDivElement> {
53
+ onEventClick: (event: CameraEvent) => void;
54
+ }
55
+
56
+ declare interface RawSensorEvent {
57
+ message: string;
58
+ data: string | null;
59
+ id: number;
60
+ customerId: number;
61
+ sensorId: number;
62
+ sensorType: 'CameraSensor' | 'MotionSensor' | 'IntrusionSensor' | 'AudioSensor' | 'TemperatureSensor' | 'SpeedSensor' | 'Unknown';
63
+ eventType: EventType;
64
+ ackEventType: string;
65
+ description?: any;
66
+ tags?: any;
67
+ customerData?: any;
68
+ startTime: string;
69
+ endTime: string;
70
+ userId: string;
71
+ }
72
+
73
+ export { }
@@ -0,0 +1 @@
1
+ import{format as e,subHours as t,startOfHour as r,isSameYear as n,isSameDay as i}from"date-fns/esm";import a from"i18next";import{of as o,from as l,Observable as s,Subscription as c,throwError as d,EMPTY as u}from"rxjs";import h,{useContext as m,useRef as p,useCallback as f,cloneElement as g,useState as v,createContext as b,Children as y,useEffect as E,useLayoutEffect as w}from"react";import{AppContext as x,app as C}from"@3deye-toolkit/core";import{computed as O,makeObservable as T,observable as M,action as L,runInAction as N,reaction as P,when as j}from"mobx";import{subHours as I}from"date-fns";import{mergeMap as _,catchError as k,switchMap as S,map as D,exhaustMap as F}from"rxjs/operators";import z from"earcut";import A,{components as H}from"react-select";import R from"clsx";import{observer as $,useLocalObservable as B}from"mobx-react-lite";import{useFloating as V,offset as U,flip as W,shift as G,arrow as Y,autoUpdate as X,useInteractions as Z,useRole as q,useDismiss as J,FloatingPortal as K,FloatingFocusManager as Q,useHover as ee}from"@floating-ui/react";import te from"react-datepicker";import re from"react-ink";import ne from"@seznam/compose-react-refs";import*as ie from"@sentry/browser";import{useElementSize as ae}from"@mantine/hooks";var oe={filter:"Filter",eventSearchFilter:{from:"From",to:"To",live:"Live"},button:{ok:"Ok"},showEvents_one:"show {{count}} new event",showEvents_other:"show {{count}} new events",noEventsFound:"no events found"};const le=new Map,se={detection:{order:["querystring","htmlTag","navigator"],lookupQuerystring:"lang"},fallbackLng:"en",load:"all",interpolation:{escapeValue:!1}},ce=a.createInstance();function de(t,r){const n=le.get(ce.language);return e(t,r,{locale:n})}const ue=h.createContext(null);var he,me;function pe(e,t=!1){const r=O(e);return new s((e=>{const n=r.observe_((({newValue:t})=>e.next(t)),t);return()=>n()}))}!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.RECONNECTING=2]="RECONNECTING",e[e.DISCONNECTED=3]="DISCONNECTED"}(he||(he={})),function(e){e[e.Motion=0]="Motion",e[e.Tampering=1]="Tampering",e[e.PanTiltZoom=2]="PanTiltZoom",e[e.CrossLine=3]="CrossLine",e[e.Intrusion=4]="Intrusion",e[e.LicensePlate=5]="LicensePlate",e[e.FaceDetection=6]="FaceDetection",e[e.Audio=7]="Audio",e[e.Analytic=8]="Analytic",e[e.SpeedDetection=9]="SpeedDetection",e[e.PeopleCounter=10]="PeopleCounter",e[e.Temperature=11]="Temperature",e[e.PoS=12]="PoS",e[e.GPS=13]="GPS",e[e.DigitalInput=14]="DigitalInput",e[e.Normal=15]="Normal",e[e.Suspicious=16]="Suspicious",e[e.Loitering=17]="Loitering",e[e.Vandalism=18]="Vandalism",e[e.Trespass=19]="Trespass",e[e.Emergency=20]="Emergency",e[e.LifeInDanger=21]="LifeInDanger",e[e.ErroneousAlert=22]="ErroneousAlert",e[e.Misidentification=23]="Misidentification",e[e.Fire=24]="Fire",e[e.MedicalDuress=25]="MedicalDuress",e[e.HoldUp=26]="HoldUp",e[e.CheckIn=27]="CheckIn",e[e.CheckOut=28]="CheckOut",e[e.ClockIn=29]="ClockIn",e[e.ClockOut=30]="ClockOut",e[e.ParkingStart=31]="ParkingStart",e[e.ParkingEnd=32]="ParkingEnd",e[e.ParkingViolation=33]="ParkingViolation",e[e.GateAccess=34]="GateAccess",e[e.DoorAccess=35]="DoorAccess",e[e.TemperatureCheck=36]="TemperatureCheck",e[e.IDCheck=37]="IDCheck",e[e.PPECheck=38]="PPECheck",e[e.WelfareCheck=39]="WelfareCheck",e[e.Uncategorized=40]="Uncategorized",e[e.Unknown=999]="Unknown"}(me||(me={}));class fe{constructor(){Object.defineProperty(this,"api",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposables",{enumerable:!0,configurable:!0,writable:!0,value:[]})}initWith(e){this.api=e,this.afterInit&&this.afterInit()}dispose(){this.disposables.forEach((e=>{e instanceof c?e.closed||e.unsubscribe():e()}))}}const ge=new Set(["LicensePlate","FaceDetection","Analytic","SpeedDetection","Temperature","PoS","GPS","DigitalInput"]);class ve{constructor(e){if(Object.defineProperty(this,"cameraId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thumbnailUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"detectedObjects",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"faces",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"instant",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),T(this,{id:O,startTime:O,endTime:O,acknowledged:O,isLive:O,raw:M.ref}),this.raw=e,this.type=e.eventType,this.cameraId=e.sensorId,("Analytic"===this.type||"FaceDetection"===this.type)&&e.data)try{const t=JSON.parse(e.data);t.FoundObjects&&(this.type="Analytic",this.detectedObjects=t.FoundObjects),t.Faces&&(this.type="FaceDetection",this.faces=t.Faces),this.thumbnailUrl=t.ThumbnailUrl}catch{console.warn("invalid data",e.data),this.type="Motion"}this.instant=ge.has(this.type),this.detectedObjects||(this.detectedObjects=[])}get id(){return this.raw.id}get startTime(){return new Date(this.raw.startTime)}get endTime(){return new Date(this.raw.endTime)}get isLive(){return!ge.has(this.type)&&+this.startTime==+this.endTime}get acknowledged(){return"sensorId"in this.raw&&!!this.raw.ackEventType}}var be="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var ye=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a};var Ee=function(e,t){return e===t||e!=e&&t!=t},we="object"==typeof be&&be&&be.Object===Object&&be,xe="object"==typeof self&&self&&self.Object===Object&&self,Ce=we||xe||Function("return this")(),Oe=Ce.Symbol,Te=Oe,Me=Object.prototype,Le=Me.hasOwnProperty,Ne=Me.toString,Pe=Te?Te.toStringTag:void 0;var je=function(e){var t=Le.call(e,Pe),r=e[Pe];try{e[Pe]=void 0;var n=!0}catch(e){}var i=Ne.call(e);return n&&(t?e[Pe]=r:delete e[Pe]),i},Ie=Object.prototype.toString;var _e=je,ke=function(e){return Ie.call(e)},Se=Oe?Oe.toStringTag:void 0;var De=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Se&&Se in Object(e)?_e(e):ke(e)};var Fe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ze=De,Ae=Fe;var He=function(e){if(!Ae(e))return!1;var t=ze(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var Re=He,$e=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Be=/^(?:0|[1-9]\d*)$/;var Ve=Ee,Ue=function(e){return null!=e&&$e(e.length)&&!Re(e)},We=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Be.test(e))&&e>-1&&e%1==0&&e<t},Ge=Fe;var Ye=/\s/;var Xe=function(e){for(var t=e.length;t--&&Ye.test(e.charAt(t)););return t},Ze=/^\s+/;var qe=De,Je=function(e){return null!=e&&"object"==typeof e};var Ke=function(e){return e?e.slice(0,Xe(e)+1).replace(Ze,""):e},Qe=Fe,et=function(e){return"symbol"==typeof e||Je(e)&&"[object Symbol]"==qe(e)},tt=/^[-+]0x[0-9a-f]+$/i,rt=/^0b[01]+$/i,nt=/^0o[0-7]+$/i,it=parseInt;var at=function(e){if("number"==typeof e)return e;if(et(e))return NaN;if(Qe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ke(e);var r=rt.test(e);return r||nt.test(e)?it(e.slice(2),r?2:8):tt.test(e)?NaN:+e};var ot=function(e){return e?Infinity===(e=at(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var lt=ye,st=function(e,t,r){if(!Ge(r))return!1;var n=typeof t;return!!("number"==n?Ue(r)&&We(t,r.length):"string"==n&&t in r)&&Ve(r[t],e)},ct=function(e){var t=ot(e),r=t%1;return t==t?r?t-r:t:0},dt=Math.ceil,ut=Math.max;var ht=function(e,t,r){t=(r?st(e,t,r):void 0===t)?1:ut(ct(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var i=0,a=0,o=Array(dt(n/t));i<n;)o[a++]=lt(e,i,i+=t);return o};const mt=([e,t],[r,n],[i,a])=>{const o=(n-t)*(i-r)-(r-e)*(a-n);return 0===o?0:o>0?1:2},pt=([e,t],[r,n],[i,a])=>r<=Math.max(e,i)&&r>=Math.min(e,i)&&n<=Math.max(t,a)&&n>=Math.min(t,a),ft=(e,t,r)=>!(e<r.x||t<r.y||e>r.x+r.width||t>r.y+r.height),gt=(e,t,r)=>{const n=r.y1*r.x3-r.x1*r.y3+(r.y3-r.y1)*e+(r.x1-r.x3)*t,i=r.x1*r.y2-r.y1*r.x2+(r.y1-r.y2)*e+(r.x2-r.x1)*t;if(n<0!=i<0)return!1;const a=-r.y2*r.x3+r.y1*(r.x3-r.x2)+r.x1*(r.y2-r.y3)+r.x2*r.y3;return a<0?n<=0&&n+i>=a:n>=0&&n+i<=a},vt=(e,t)=>{if(ft(t.x1,t.y1,e))return!0;if(ft(t.x2,t.y2,e))return!0;if(ft(t.x3,t.y3,e))return!0;if(gt(e.x,e.y,t))return!0;if(gt(e.x+e.width,e.y,t))return!0;if(gt(e.x+e.width,e.y+e.height,t))return!0;if(gt(e.x,e.y+e.height,t))return!0;const r=[[[e.x,e.y],[e.x+e.width,e.y]],[[e.x+e.width,e.y],[e.x+e.width,e.y+e.height]],[[e.x,e.y+e.height],[e.x+e.width,e.y+e.height]],[[e.x,e.y],[e.x,e.y+e.height]]];return!![[[t.x1,t.y1],[t.x2,t.y2]],[[t.x1,t.y1],[t.x3,t.y3]]].some((e=>r.some((t=>(([e,t],[r,n])=>{const i=mt(e,t,r),a=mt(e,t,n),o=mt(r,n,e),l=mt(r,n,t);return i!==a&&o!==l||!(0!==i||!pt(e,r,t))||!(0!==a||!pt(e,n,t))||!(0!==o||!pt(r,e,n))||!(0!==l||!pt(r,t,n))})(t,e)))))};class bt extends fe{constructor(e,t="events"){super(),Object.defineProperty(this,"eventsStore",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"mode",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pendingData",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"liveUpdateMode",{enumerable:!0,configurable:!0,writable:!0,value:"auto"}),Object.defineProperty(this,"updateTrigger",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"colors",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"disposables",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pageInfo",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"loading",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"loadMoreTrigger",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"retryTrigger",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"sortDirection",{enumerable:!0,configurable:!0,writable:!0,value:"DESC"}),Object.defineProperty(this,"probabilityThreshold",{enumerable:!0,configurable:!0,writable:!0,value:.5}),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"to",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cameras",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"detectedObjects",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"regions",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"eventTypes",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"loadingInited",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"flushUpdates",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.data=[...this.pendingData,...this.data],this.pendingData=[]}}),Object.defineProperty(this,"setLiveUpdateMode",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.liveUpdateMode=e}}),Object.defineProperty(this,"load",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.loadingInited||(this.loadingInited=!0,this.initDataLoading(),this.initLiveUpdates())}}),Object.defineProperty(this,"reload",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.error&&(this.retryTrigger=+!this.retryTrigger)}}),Object.defineProperty(this,"loadMore",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.error=null,this.loadMoreTrigger=+!this.loadMoreTrigger}}),Object.defineProperty(this,"requestData",{enumerable:!0,configurable:!0,writable:!0,value:({sortDirection:e,from:t,to:r,filter:n,pageInfo:i,cameras:a,regions:l})=>{var s;return this.api.cameras.GetSensorEventsPage({sensorIds:a,sensorType:"camera",sensorEventTypes:this.eventTypes,startTime:t,endTime:r,isDescending:"DESC"===e,rowsLimit:10,pageToken:null==i?void 0:i.nextPageToken},n,null!==(s=null==l?void 0:l.map(this.regionToWktPolygon))&&void 0!==s?s:[]).pipe(_((e=>e.success?o({events:e.resultItems,pageInfo:e.pageInfo}):d((()=>e.error)))),k((e=>(console.error(e),this.error=e,o({events:[],pageInfo:null})))))}}),Object.defineProperty(this,"toObjects",{enumerable:!0,configurable:!0,writable:!0,value:e=>"events"===this.mode?[{data:e,objectIdx:-1}]:e.detectedObjects.map(((e,t)=>{var r,n;return this.detectedObjects.length&&!this.detectedObjects.includes(e.Type)||this.colors.size&&!(null===(r=e.Colors)||void 0===r?void 0:r.some((e=>this.colors.has(e.Color))))||null!==this.probabilityThreshold&&e.Probability<this.probabilityThreshold||(null===(n=this.regions)||void 0===n?void 0:n.length)&&!this.regions.some((t=>((e,t)=>{const r=e.map((({x:e,y:t})=>[e,t]));return ht(z(r.flat()),3).some((r=>vt(t,{x1:e[r[0]].x,y1:e[r[0]].y,x2:e[r[1]].x,y2:e[r[1]].y,x3:e[r[2]].x,y3:e[r[2]].y})))})(t,this.boxToAabb(e.Box))))?-1:t})).filter((e=>-1!==e)).map((t=>({data:e,objectIdx:t})))}),T(this,{data:M.ref,cameras:M.struct,detectedObjects:M.struct,from:M,to:M,sortDirection:M,probabilityThreshold:M,pendingData:M.ref,liveUpdateMode:M,setLiveUpdateMode:L,updateTrigger:M,colors:M.ref,flushUpdates:L,pageInfo:M.ref,isLive:O,loading:M,loadMoreTrigger:M,retryTrigger:M,error:M.ref,loadMore:L,filterJson:O})}get isLive(){return"DESC"===this.sortDirection&&!this.to}get totalCount(){return this.data.length}get filterJson(){const{probabilityThreshold:e}=this;if(null===e)return null;const t={And:[]};return this.detectedObjects.length&&t.And.push({Or:this.detectedObjects.map((e=>({Type:e})))}),this.colors.size&&t.And.push({Or:[...this.colors].map((e=>({ObjectColors:[e]})))}),t.And.push({Or:[{Probability:e}]}),JSON.stringify(t)}initDataLoading(){const e=pe((()=>({from:this.from?+this.from:void 0,to:this.to?+this.to:void 0,sortDirection:this.sortDirection,filter:this.filterJson,cameraFilters:this.cameras,regions:this.regions})),!0);this.disposables.push(e.pipe(S((e=>pe((()=>this.retryTrigger),!0).pipe(D((()=>e))))),S((({from:e,to:t,sortDirection:r,filter:n,cameraFilters:i,regions:a})=>(N((()=>{this.loading=!0,this.pageInfo=null,this.error=null,this.data=[],this.pendingData=[]})),this.requestData({from:e?new Date(e):void 0,to:t?new Date(t):void 0,sortDirection:r,filter:n,cameras:i,pageInfo:this.pageInfo,regions:a}))))).subscribe((({events:e,pageInfo:t})=>{N((()=>{var r,n,i;if(!t)return;const a=e.map(yt);this.isLive?this.data=this.uniquelyConcat(this.eventsStore.getEvents({cameraIds:this.cameras,eventTypes:this.eventTypes.map((e=>me[e])),from:null!==(n=null===(r=a[0])||void 0===r?void 0:r.startTime)&&void 0!==n?n:I(new Date,1),to:null,colors:this.colors.size?this.colors:void 0,detectedObjectTypes:this.detectedObjects,probability:null!==(i=this.probabilityThreshold)&&void 0!==i?i:void 0}),a).flatMap(this.toObjects):this.data=a.flatMap(this.toObjects),this.eventsStore.add(a),this.pageInfo=t,this.loading=!1}))}))),this.disposables.push(e.pipe(S((({from:e,to:t,sortDirection:r,filter:n,cameraFilters:i})=>pe((()=>this.loadMoreTrigger)).pipe(F((()=>this.requestData({from:e?new Date(e):void 0,to:t?new Date(t):void 0,sortDirection:r,filter:n,cameras:i,pageInfo:this.pageInfo,regions:this.regions}))))))).subscribe((({events:e,pageInfo:t})=>{if(!t)return;const r=e.map(yt);this.eventsStore.add(r),N((()=>{this.data=this.data.concat(r.flatMap(this.toObjects)),this.pageInfo=t,this.loading=!1}))})))}initLiveUpdates(){this.disposables.push(pe((()=>({liveUpdateMode:this.liveUpdateMode,isLive:this.isLive})),!0).pipe(S((({liveUpdateMode:e,isLive:t})=>t&&"auto"===e?pe((()=>this.eventsStore.recentAdditions)):u))).subscribe((e=>{if(this.loading)return;if(!this.pageInfo&&this.error)return;const t=this.filter(e.map((e=>this.eventsStore.eventsById.get(e))));t.length&&N((()=>{this.data=[...t.flatMap(this.toObjects),...this.data]}))}))),this.disposables.push(pe((()=>({liveUpdateMode:this.liveUpdateMode,isLive:this.isLive})),!0).pipe(S((({liveUpdateMode:e,isLive:t})=>t&&"manual"===e?pe((()=>this.eventsStore.recentAdditions)):(this.pendingData&&N((()=>this.pendingData=[])),u)))).subscribe((e=>{if(!this.data.length)return;const t=this.filter(e.map((e=>this.eventsStore.eventsById.get(e))));t.length&&N((()=>{this.pendingData=[...t.flatMap(this.toObjects),...this.pendingData]}))})))}filter(e){let t=e;const{from:r,to:n}=this;if(r&&(t=t.filter((e=>e.startTime>=r))),n&&(t=t.filter((e=>e.startTime<=n))),this.cameras.length&&(t=t.filter((e=>this.cameras.includes(e.cameraId)))),this.eventTypes.length){const e=this.eventTypes.map((e=>me[e]));t=t.filter((t=>e.includes(t.type)))}return this.detectedObjects.length&&(t=t.filter((e=>e.detectedObjects.some((e=>{var t;const{probabilityThreshold:r}=this;return!(null!==r&&e.Probability<r)&&(this.colors.size?this.detectedObjects.includes(e.Type)&&(null===(t=e.Colors)||void 0===t?void 0:t.some((e=>this.colors.has(e.Color)))):this.detectedObjects.includes(e.Type))}))))),t}boxToAabb(e){return{x:e.Left,y:e.Top,width:e.Right-e.Left,height:e.Bottom-e.Top}}regionToWktPolygon(e){return e.length?"POLYGON (("+e.concat(e[0]).map((({x:e,y:t})=>`${e} ${t}`)).join(", ")+"))":"POLYGON (())"}uniquelyConcat(e,t){if(!e.length)return t.concat();if(!t.length)return e.concat();const r=e=>[e.id,e];return Array.from(new Map([...e.map(r),...t.map(r)]).values())}dispose(){this.disposables.forEach((e=>{e instanceof c?e.closed||e.unsubscribe():e()}))}}function yt(e){return new ve(e)}const Et={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},wt={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},xt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ct={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ot={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Tt={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};class Mt extends fe{constructor(e){super(),Object.defineProperty(this,"cameraFilters",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"objectFilters",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"date",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"sortDirection",{enumerable:!0,configurable:!0,writable:!0,value:"DESC"}),Object.defineProperty(this,"probabilityThreshold",{enumerable:!0,configurable:!0,writable:!0,value:.5}),Object.defineProperty(this,"facesProbabilityThreshold",{enumerable:!0,configurable:!0,writable:!0,value:.7}),Object.defineProperty(this,"colors",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"disposables",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"eventsLoader",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"toggleSorting",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.sortDirection="ASC"===this.sortDirection?"DESC":"ASC",null===this.date&&(this.date=t(r(new Date),1))}}),Object.defineProperty(this,"applyFilters",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e;this.eventsLoader.cameras=this.cameraFilters.map((e=>e.id)),this.eventsLoader.detectedObjects=this.objectFilters.map((e=>e.id)),this.eventsLoader.colors=this.colors,this.eventsLoader.probabilityThreshold=this.objectFilters.length?this.probabilityThreshold:null,"ASC"===this.sortDirection?(this.eventsLoader.sortDirection="ASC",this.eventsLoader.to=void 0,this.eventsLoader.from=this.date):(this.eventsLoader.sortDirection="DESC",this.eventsLoader.from=void 0,this.eventsLoader.to=null!==(e=this.date)&&void 0!==e?e:void 0)}}),Object.defineProperty(this,"getProbabilityTreshold",{enumerable:!0,configurable:!0,writable:!0,value:()=>this.probabilityThreshold}),Object.defineProperty(this,"setProbabilityTreshold",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.probabilityThreshold=e,this.applyFilters()}}),T(this,{cameraFilters:M.ref,objectFilters:M.ref,date:M,sortDirection:M,probabilityThreshold:M,setProbabilityTreshold:L,facesProbabilityThreshold:M,colors:M.ref,someAnalyticsFilterSelected:O,filters:O,setFilters:L,load:L,toggleColor:L.bound,clearColors:L.bound,applyFilters:L,toggleSorting:L}),this.eventsLoader=new bt(e),this.eventsLoader.loading=!0,this.eventsLoader.probabilityThreshold=null}get someAnalyticsFilterSelected(){return!!this.objectFilters.length}get filters(){return this.objectFilters.concat(this.cameraFilters)}load(){this.eventsLoader.load()}setFilters(e){this.cameraFilters=e?e.filter((e=>!("type"in e))):[],this.objectFilters=e?e.filter((e=>"type"in e)):[]}toggleColor(e){const t=new Set(this.colors);this.colors.has(e)?t.delete(e):t.add(e),this.colors=t,this.applyFilters()}clearColors(){this.colors=new Set,this.applyFilters()}afterInit(){this.eventsLoader.initWith(this.api)}dispose(){this.disposables.forEach((e=>{e instanceof c?e.closed||e.unsubscribe():e()})),this.eventsLoader.dispose()}}var Lt,Nt=(Lt=8,{container:e=>({...e,padding:Lt}),control:(e,t)=>({...e,borderRadius:8,backgroundColor:t.isFocused?"white":"rgba(0, 0, 0, 0.5)",border:"none",boxShadow:null,"&:hover":{borderColor:null}}),menu:e=>({...e,width:`calc(100% - ${2*Lt}px)`,marginTop:Lt?0:e.marginTop}),option:e=>({...e,color:"black"}),multiValueRemove:e=>({...e,color:"black"}),placeholder:(e,t)=>({...e,color:t.isFocused?e.color:"hsl(0, 0%, 70%)"})});function Pt(e){return h.forwardRef(((t,r)=>{const{size:n=24,color:i="currentColor",className:a,...o}=t,l=e.viewBox||"0 0 24 24",s=e.svg;return h.createElement("svg",{ref:r,preserveAspectRatio:"xMinYMin",className:R("icon",a),width:n,fill:i,viewBox:l,...o},s)}))}const jt=Pt({viewBox:"0 0 24 24",svg:h.createElement("g",null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M10.13 3.245a1.994 1.994 0 0 0-1.542.992l-5.491 9.53c-.55.954-.23 2.178.723 2.728l8.66 5c.953.55 2.174.216 2.724-.737l5.509-9.521c.335-.58.349-1.265.087-1.832L17.65 2.54z"}))});jt.displayName="LabelIcon";const It=Pt({viewBox:"0 0 24 24",svg:h.createElement("g",null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"}))});It.displayName="CameraIcon";const _t=Pt({viewBox:"0 0 24 24",svg:h.createElement("path",{d:"M17,6h-2V3c0-0.55-0.45-1-1-1h-4C9.45,2,9,2.45,9,3v3H7C5.9,6,5,6.9,5,8v11c0,1.1,0.9,2,2,2c0,0.55,0.45,1,1,1 c0.55,0,1-0.45,1-1h6c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1c1.1,0,2-0.9,2-2V8C19,6.9,18.1,6,17,6z M9.5,18H8V9h1.5V18z M12.75,18 h-1.5V9h1.5V18z M13.5,6h-3V3.5h3V6z M16,18h-1.5V9H16V18z"})});_t.displayName="LuggageIcon";const kt=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"}))});kt.displayName="CarIcon";const St=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M20 21c-1.39 0-2.78-.47-4-1.32-2.44 1.71-5.56 1.71-8 0C6.78 20.53 5.39 21 4 21H2v2h2c1.38 0 2.74-.35 4-.99 2.52 1.29 5.48 1.29 8 0 1.26.65 2.62.99 4 .99h2v-2h-2zM3.95 19H4c1.6 0 3.02-.88 4-2 .98 1.12 2.4 2 4 2s3.02-.88 4-2c.98 1.12 2.4 2 4 2h.05l1.89-6.68c.08-.26.06-.54-.06-.78s-.34-.42-.6-.5L20 10.62V6c0-1.1-.9-2-2-2h-3V1H9v3H6c-1.1 0-2 .9-2 2v4.62l-1.29.42c-.26.08-.48.26-.6.5s-.15.52-.06.78L3.95 19zM6 6h12v3.97L12 8 6 9.97V6z"}))});St.displayName="BoatIcon";const Dt=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M11.74 13.36L14.14 7.71L13.06 5.5H10.5V4H14L14.73 5.5H21.75L20.75 9H16.44L17.11 10.37C17.69 10.13 18.33 10 19 10C21.76 10 24 12.24 24 15C24 17.76 21.76 20 19 20C16.24 20 14 17.76 14 15C14 13.45 14.71 12.06 15.82 11.15L15 9.5L12.25 16H9.9C9.44 18.28 7.42 20 5 20C2.24 20 0 17.76 0 15C0 12.24 2.24 10 5 10C7.59 10 9.72 11.97 10 14.5H10.58L8.3 9H7.5C7.09 9 6.75 8.66 6.75 8.25C6.75 7.84 7.09 7.5 7.5 7.5H10.25C10.66 7.5 11 7.84 11 8.25C11 8.66 10.66 9 10.25 9H9.97L11.74 13.36M5 11.5C3.07 11.5 1.5 13.07 1.5 15C1.5 16.93 3.07 18.5 5 18.5C6.59 18.5 7.93 17.45 8.36 16H4V14.5H8.47C8.22 12.8 6.76 11.5 5 11.5M19 11.5C18.57 11.5 18.15 11.58 17.77 11.72L19.7 15.68L18.35 16.34L16.5 12.55C15.88 13.18 15.5 14.05 15.5 15C15.5 16.93 17.07 18.5 19 18.5C20.93 18.5 22.5 16.93 22.5 15C22.5 13.07 20.93 11.5 19 11.5Z"}))});Dt.displayName="BicycleIcon";const Ft=Pt({viewBox:"0 0 24 24",svg:h.createElement("g",null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7"}))});Ft.displayName="DirectionsWalkIcon";const zt=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("circle",{cx:"4.5",cy:"9.5",r:"2.5"}),h.createElement("circle",{cx:"9",cy:"5.5",r:"2.5"}),h.createElement("circle",{cx:"15",cy:"5.5",r:"2.5"}),h.createElement("circle",{cx:"19.5",cy:"9.5",r:"2.5"}),h.createElement("path",{d:"M17.34 14.86c-.87-1.02-1.6-1.89-2.48-2.91-.46-.54-1.05-1.08-1.75-1.32-.11-.04-.22-.07-.33-.09-.25-.04-.52-.04-.78-.04s-.53 0-.79.05c-.11.02-.22.05-.33.09-.7.24-1.28.78-1.75 1.32-.87 1.02-1.6 1.89-2.48 2.91-1.31 1.31-2.92 2.76-2.62 4.79.29 1.02 1.02 2.03 2.33 2.32.73.15 3.06-.44 5.54-.44h.18c2.48 0 4.81.58 5.54.44 1.31-.29 2.04-1.31 2.33-2.32.31-2.04-1.3-3.49-2.61-4.8z"}))});zt.displayName="PetsIcon";const At=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M4 4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H5Zm0 2h4v2h8V6h4v12H4Z"}),h.createElement("path",{d:"M9.923 10 8.43 12.433 10 15h-.8L8 13.036 6.8 15H6l1.602-2.616L6.136 10h.8l1.093 1.781L9.123 10Z"}),h.createElement("path",{d:"m13.709 10-1.492 2.433L13.787 15h-.8l-1.2-1.964L10.585 15h-.8l1.603-2.616L9.923 10h.799l1.094 1.781L12.91 10Z"}),h.createElement("path",{d:"m17.709 10-1.492 2.433L17.787 15h-.8l-1.2-1.964L14.585 15h-.8l1.603-2.616L13.923 10h.799l1.094 1.781L16.91 10Z"}))});At.displayName="LicensePlateIcon";const Ht=({data:e})=>{const t=16;return"licensePlate"===e.type?null:"detectedObject"!==e.type?h.createElement(It,{size:t}):"Luggage"===e.id?h.createElement(_t,{size:t}):"Car"===e.id?h.createElement(kt,{size:t}):"Person"===e.id?h.createElement(Ft,{size:t}):"Bicycle"===e.id?h.createElement(Dt,{size:t}):"Boat"===e.id?h.createElement(St,{size:t}):"Animal"===e.id?h.createElement(zt,{size:t}):"LicensePlate"===e.id?h.createElement(At,{size:t}):h.createElement(jt,{size:t})},Rt=e=>{const{children:t,innerProps:r,...n}=e,{Option:i}=H,{data:a}=e;if("licensePlate"===a.type)return h.createElement(i,{innerProps:r,...n},h.createElement("span",{style:{paddingLeft:8,paddingRight:8,borderRadius:4,border:"1px solid black"}},t));if("detectedObject"===a.type){const e={display:"inline-flex",alignItems:"center",width:"auto"},o={...r,style:e};return h.createElement(i,{innerProps:o,...n},h.createElement(Ht,{data:a}),h.createElement("div",{style:{marginLeft:4}},t))}return h.createElement(i,{...e})},$t=e=>{const{children:t,innerProps:r,...n}=e,{MultiValueLabel:i}=H,{data:a}=e,o={...r,style:{display:"flex",alignItems:"center"}};return h.createElement(i,{innerProps:o,...n},h.createElement(Ht,{data:a}),h.createElement("div",{style:{marginLeft:4}},t))},Bt=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))});Bt.displayName="FilterListIcon";const Vt={...Nt,multiValue:(e,{data:t})=>"color"in t?{...e,backgroundColor:t.color,color:"white"}:e,multiValueLabel:(e,{data:t})=>"color"in t?{...e,color:"white"}:e,multiValueRemove:(e,{data:t})=>"color"in t?{...e,color:"white",":hover":{backgroundColor:"rgba(255, 255, 255, 0.7)",color:t.color}}:{...e,color:"hsl(0, 0%, 20%)"},option:(e,{data:t,isFocused:r})=>"color"in t?"type"in t&&"licensePlate"===t.type?{...e,color:t.color,backgroundColor:r?wt[50]:"transparent",":active":{...e[":active"],backgroundColor:wt[100]}}:{...e,color:t.color}:{...e,color:"black"}},Ut=e=>{const{children:t,...r}=e;return h.createElement(H.Placeholder,{...r},h.createElement(Bt,{size:16,style:{position:"relative",top:4}})," ",t)},Wt=$((({addionalFiltersEnabled:e,store:t})=>{const{cameras:r,eventSchema:n}=m(ue),i=p({opened:!1});return h.createElement(A,{closeMenuOnSelect:!1,isMulti:!0,onChange:(e,r)=>{t.setFilters(e),"remove-value"!==r.action||i.current.opened||t.applyFilters()},onMenuOpen:()=>i.current.opened=!0,onMenuClose:()=>{i.current.opened=!1,t.applyFilters()},getOptionLabel:e=>e.name,getOptionValue:e=>e.id,options:(()=>{if(!n)return[];const t=e?n.foundObjectTypesForSelect:[];return r.loaded?[].concat(t,r.data.slice()):t})(),placeholder:ce.t("filter"),value:t.filters,components:{MultiValueLabel:$t,Option:Rt,Placeholder:Ut},styles:Vt})}));Wt.displayName="EventsPanelSelect";const Gt=h.forwardRef((function({width:e,height:t,placement:r="top",style:n},i){const a=[0,"top"===r?t:0],o=[e,a[1]],l=[e/2,t-a[1]],s=[e/4,t*("top"===r?3:1)/4],c=[.325*e,t-a[1]],d=[e-c[0],c[1]],u=[e-s[0],s[1]],m=e=>e.join(","),p=`M ${m(a)} C ${m(s)} ${m(c)} ${m(l)} ${m(d)} ${m(u)} ${m(o)}`,f=`${p} Z`;return h.createElement("svg",{ref:i,className:"tip",style:n,width:e,height:t,fill:"var(--tip-background, #fff)"},h.createElement("path",{className:"tip-body",d:f}),h.createElement("path",{className:"tip-border",d:p,stroke:"var(--tip-border, transparent)",strokeWidth:1}))})),Yt=({opened:e,onOpenChange:t,children:r,target:n,placement:i,className:a,autoDismiss:o=!0,withArrow:l=!1})=>{var s,c,d;const u=p(null),{x:m,y:v,reference:b,floating:y,strategy:E,context:w,middlewareData:x,placement:C,update:O}=V({open:e,onOpenChange:t,middleware:[U(5),W(),G(),Y({element:u})],placement:i,whileElementsMounted:(e,t,r)=>X(e,t,r,{animationFrame:!0})}),{getReferenceProps:T,getFloatingProps:M}=Z([q(w),J(w,{ancestorScroll:!0,enabled:o})]),L=f((e=>{u.current=e,O()}),[O]),N={top:"bottom",right:"left",bottom:"top",left:"right"}[null!==(s=null==C?void 0:C.split("-")[0])&&void 0!==s?s:"top"]||"top",P=h.createElement("div",{...M({className:R("x-3deye-popover-container",a),ref:y,style:{position:E,top:null!=v?v:0,left:null!=m?m:0}})},l&&h.createElement(Gt,{ref:L,width:24,height:8,placement:N,style:{position:"absolute",left:null===(c=x.arrow)||void 0===c?void 0:c.x,top:null===(d=x.arrow)||void 0===d?void 0:d.y,[N]:-7}}),r);return h.createElement(h.Fragment,null,g(n,T({ref:b,...n.props})),h.createElement(K,{id:"x-3deye-floating-ui-root"},o&&e&&h.createElement(Q,{context:w,modal:!1,order:["reference","content"],returnFocus:!1},P),!o&&e&&P))},Xt=({children:e,label:t,placement:r="bottom"})=>{const[n,i]=v(!1),{x:a,y:o,reference:l,floating:s,strategy:c,context:d}=V({placement:r,open:n,onOpenChange:i,middleware:[U(5),W(),G({padding:8})],whileElementsMounted:(e,t,r)=>X(e,t,r,{animationFrame:!0})}),{getReferenceProps:u,getFloatingProps:m}=Z([ee(d),q(d,{role:"tooltip"}),J(d,{referencePress:!0})]);return h.createElement(h.Fragment,null,g(e,u({ref:ne(l,e.ref),...e.props})),h.createElement(K,{id:"x-3deye-floating-ui-root"},n&&h.createElement("div",{...m({ref:s,className:"x-3deye-tooltip",style:{position:c,top:null!=o?o:0,left:null!=a?a:0}})},t)))};class Zt extends h.Component{render(){const{forwardedRef:e,children:t,className:r,fullWidth:n,variant:i,type:a,title:o,placement:l,...s}=this.props,c=R(r,"x-3deye-button",{"x-3deye-button--fullwidth":n},i?`x-3deye-button--${i}`:void 0),d=h.createElement("button",{ref:e,className:c,type:a||"button",...s},t,s.disabled?null:h.createElement(re,null));return o?h.createElement(Xt,{label:o,placement:l},d):d}}const qt=h.forwardRef(((e,t)=>h.createElement(Zt,{forwardedRef:t,...e}))),Jt=Pt({viewBox:"0 0 24 24",svg:h.createElement("g",null,h.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))});Jt.displayName="CloseIcon";const Kt=(e,t,r)=>Math.min(Math.max(e,t),r),Qt=()=>{};/Mac|iPod|iPhone|iPad/.test(window.navigator.platform);const er=(e,t,r,n)=>Kt(Math.floor((e-t)/r*n),0,n-1),tr=b({value:null,onPointerDown:Qt,setCurrentValue:Qt,state:{currentIdx:0,currentValue:null,options:[]}});class rr{constructor(e=0){Object.defineProperty(this,"currentIdx",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"setCurrentIdx",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.currentIdx=e}}),Object.defineProperty(this,"setOptions",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.options=e}}),this.currentIdx=e,T(this,{currentIdx:M,options:M.ref,currentValue:O,setCurrentIdx:L,setOptions:L})}get currentValue(){return this.options[this.currentIdx]}}const nr=$(h.forwardRef((({value:e,onChange:t,children:r,style:n},i)=>{const[a,o]=v(!1),l=p(null),s=y.map(r,(e=>null==e?void 0:e.props.value))||[],c=B((()=>new rr(s.indexOf(e))));c.setOptions(s);const d=y.count(r);E((()=>{c.setCurrentIdx(s.indexOf(e))}),[e]),E((()=>{var e;if(!a)return;const r=null===(e=l.current)||void 0===e?void 0:e.getBoundingClientRect();if(!r)return;const n=({clientX:e})=>{c.setCurrentIdx(er(e,r.left,r.width,d))},i=()=>{o(!1),t(s[c.currentIdx])};return document.addEventListener("pointermove",n),document.addEventListener("pointerup",i),()=>{document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",i)}}),[a,d]);return h.createElement(tr.Provider,{value:{value:e,state:c,onPointerDown:e=>{const t=l.current;if(!t)return;const{left:r,width:n}=t.getBoundingClientRect(),i=er(e.clientX,r,n,d);i!==c.currentIdx&&c.setCurrentIdx(i),o(!0)},setCurrentValue:e=>{c.setCurrentIdx(s.indexOf(e))}}},h.createElement("div",{className:"segmented-control-wrapper",style:n,ref:i},h.createElement("div",{role:"radiogroup",ref:l,className:"segmented-control",style:{"--indicator-offset":100*c.currentIdx+"%"}},h.createElement("div",{"aria-hidden":!0,className:R("segmented-control-indicator",{active:a}),style:{width:100/s.length+"%"}},h.createElement("div",{className:"segmented-control-indicator-inner"})),r)))})));nr.displayName="SegmentedControl";const ir=$(h.forwardRef((({value:e,children:t},r)=>{const n=m(tr);return h.createElement("button",{ref:r,role:"radio","aria-checked":n.state.currentValue===e,tabIndex:0,className:R("segmented-control-button",{current:n.state.currentValue===e}),onPointerDown:n.onPointerDown,onClick:()=>n.setCurrentValue(e)},t)})));ir.displayName="SegmentedControlOption";const ar=$((({store:e})=>{const{date:t,sortDirection:r}=e,n=B((()=>({opened:!1,toggle(){this.opened=!this.opened},setOpened(e){this.opened=e},close(){this.opened=!1,e.applyFilters()},onDateChange(t){e.date=t},clear(){e.date=null,e.applyFilters()}}))),i=h.createElement("div",{style:{flex:1,display:"flex",position:"relative"}},h.createElement(qt,{className:"date-button",style:{flex:1,alignItems:"flex-start",borderRadius:0,textTransform:"uppercase"},onClick:n.toggle},t?h.createElement("sup",null,"ASC"===r?ce.t("eventSearchFilter.from"):ce.t("eventSearchFilter.to")):null,h.createElement("span",null,t?de(t,"MMM d, HH:mm"):ce.t("eventSearchFilter.live"))),t?h.createElement(qt,{className:"x-3deye-button--icon",style:{position:"absolute",right:0},onClick:n.clear},h.createElement(Jt,{size:16})):null);return h.createElement("div",{className:"events-panel-datepicker"},h.createElement("div",{style:{position:"relative"}},h.createElement(Yt,{target:i,opened:n.opened,onOpenChange:e=>n.setOpened(e),withArrow:!0,className:"popover-datetimepicker"},h.createElement("div",{style:{display:"flex",flexDirection:"column",gap:8}},h.createElement(nr,{value:r,onChange:e.toggleSorting},h.createElement(ir,{value:"ASC"},ce.t("eventSearchFilter.from")),h.createElement(ir,{value:"DESC"},ce.t("eventSearchFilter.to"))),h.createElement(te,{selected:t,onChange:n.onDateChange,showTimeSelect:!0,dateFormat:"MMM d, HH:mm",timeFormat:"HH:mm",inline:!0}),h.createElement(qt,{onClick:n.close,variant:"filled",fullWidth:!0},ce.t("button.ok"))))))}));ar.displayName="EventsPanelDatepicker";const or=e=>Math.round(e),lr=h.forwardRef((({value:e,onChange:t,onChangeComplete:r,orientation:n="horizontal",disabled:i=!1,labelFormat:a=(e=>`${e}`),style:o},l)=>{const s=p(null),c=p(null),[d,u]=v(!1),[m,g]=v(e);E((()=>{if(!d)return;const e=s.current;if(!e)return;let i=0,a=0;const o=e.getBoundingClientRect();if(!o)return;const l=({clientX:e,clientY:r})=>{if(!c.current)return;let l=0;"horizontal"===n?(i=Kt(e-o.x,0,o.width),l=i/o.width*100,c.current.style.transform=`translateX(${i}px)`):(a=o.height-Kt(r-o.y,0,o.height),l=a/o.height*100,c.current.style.transform=`translateY(${-a}px)`),g(l),null==t||t(or(l))},h=({clientX:e,clientY:i})=>{if(u(!1),!c.current)return;const a="horizontal"===n?Kt(e-o.x,0,o.width)/o.width*100:100*(1-Kt(i-o.y,0,o.height)/o.height);c.current.style.transform="",g(a),null==t||t(or(a)),null==r||r(or(a))},m=()=>{if(u(!1),!c.current)return;const e="horizontal"===n?i/o.width*100:a/o.height*100;c.current.style.transform="",null==t||t(or(e)),null==r||r(or(e))};return e.addEventListener("pointercancel",m),e.addEventListener("pointermove",l),e.addEventListener("pointerup",h),()=>{e.removeEventListener("pointercancel",m),e.removeEventListener("pointermove",l),e.removeEventListener("pointerup",h)}}),[d,n,t]);const b=f((({clientX:e,clientY:r,pointerId:a})=>{if(!s.current||i)return;u(!0),s.current.setPointerCapture(a);const o=s.current.getBoundingClientRect();if(!o)return;if(!c.current)return;let l=0;if("horizontal"===n){const t=Kt(e-o.x,0,o.width);l=t/o.width*100,c.current.style.transform=`translateX(${t}px)`}else{const e=o.height-Kt(r-o.y,0,o.height);l=e/o.height*100,c.current.style.transform=`translateY(${-e}px)`}g(l),null==t||t(or(l))}),[n,i]),y=f((n=>{if(i)return;let a=null;"ArrowLeft"===n.code?a=Math.max(e-1,0):"ArrowRight"===n.code?a=Math.min(e+1,100):"ArrowDown"===n.code?a=Math.max(e-1,0):"ArrowUp"===n.code&&(a=Math.min(e+1,100)),null!==a&&(n.stopPropagation(),n.preventDefault(),null==t||t(a),null==r||r(a))}),[e,t,r,n,i]);return h.createElement("div",{ref:ne(l,s),tabIndex:0,onKeyDown:y,className:R("x-3deye-slider",n,{disabled:i}),onPointerDown:b,style:o},h.createElement("div",{className:"x-3deye-slider__track"},h.createElement("div",{className:"x-3deye-slider__bar",style:{width:"horizontal"===n?`${d?m:e}%`:void 0,height:"vertical"===n?`${d?m:e}%`:void 0}})),h.createElement("div",{ref:c,className:R("x-3deye-slider__thumb",{active:d}),style:{touchAction:"none",userSelect:"none",position:"absolute",left:"horizontal"===n?d?0:`${e}%`:"auto",bottom:"vertical"===n?d?0:`${e}%`:"auto"}},h.createElement("div",{className:"x-3deye-slider__label "+(d?"open":"")},a(d?or(m):e))))}));lr.displayName="Slider";const sr=$((({getter:e,setter:t})=>{const[r,n]=v(0),i=p(null),a=Math.floor(100*e());return E((()=>P(e,(e=>{n(Math.floor(100*e))}),{fireImmediately:!0})),[e]),h.createElement("div",{ref:i,style:{paddingLeft:8,paddingRight:8,marginTop:5}},h.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},h.createElement("div",null,"CONFIDENCE"),h.createElement("div",{style:{fontSize:"1.1em"}},a,"%")),h.createElement("div",{style:{padding:"0 10px"}},h.createElement(lr,{value:r,labelFormat:e=>`${e}%`,onChangeComplete:e=>{t(e/100)}})))}));sr.displayName="ProbabilitySlider";const cr=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),h.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}))});cr.displayName="DoneIcon";const dr=[{color:Ot[500],name:"red",highlightColor:Ot[100]},{color:xt[500],name:"green",highlightColor:xt[100]},{color:Et[500],name:"blue",highlightColor:Et[100]},{color:Tt[500],name:"yellow",highlightColor:Tt[900]},{color:"#000",name:"black",highlightColor:"#fff"},{color:"#fff",name:"white",highlightColor:"#000"},{color:Ct[500],name:"dimgrey",highlightColor:Ct[100]}],ur=$((({value:e,clear:t,toggle:r})=>h.createElement("div",{className:"color-selector"},h.createElement("div",null,"COLOR"),h.createElement("div",{className:"color-selector__items"},dr.map((({color:t,highlightColor:n,name:i})=>h.createElement("button",{key:i,className:R("color-selector__item",{selected:e.has(i)}),style:{backgroundColor:t},onClick:r.bind(null,i)},h.createElement(cr,{color:n,size:20})))),h.createElement(qt,{className:"color-selector__clear",disabled:!e.size,onClick:t},h.createElement(Jt,{size:20}))))));ur.displayName="ColorSelector";const hr=({size:e=48})=>h.createElement("svg",{width:e,height:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},h.createElement("rect",{x:"0",y:"0",width:"100",height:"100",fill:"none",className:"bk"}),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(0 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(30 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.08333333333333333s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(60 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.16666666666666666s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(90 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.25s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(120 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.3333333333333333s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(150 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.4166666666666667s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(180 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.5s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(210 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.5833333333333334s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(240 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.6666666666666666s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(270 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.75s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(300 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.8333333333333334s",repeatCount:"indefinite"})),h.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"currentColor",transform:"rotate(330 50 50) translate(0 -30)"},h.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.9166666666666666s",repeatCount:"indefinite"})));hr.displayName="Preloader";var mr,pr=Ce["__core-js_shared__"],fr=(mr=/[^.]+$/.exec(pr&&pr.keys&&pr.keys.IE_PROTO||""))?"Symbol(src)_1."+mr:"";var gr=function(e){return!!fr&&fr in e},vr=Function.prototype.toString;var br=He,yr=gr,Er=Fe,wr=function(e){if(null!=e){try{return vr.call(e)}catch(e){}try{return e+""}catch(e){}}return""},xr=/^\[object .+?Constructor\]$/,Cr=Function.prototype,Or=Object.prototype,Tr=Cr.toString,Mr=Or.hasOwnProperty,Lr=RegExp("^"+Tr.call(Mr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Nr=function(e){return!(!Er(e)||yr(e))&&(br(e)?Lr:xr).test(wr(e))},Pr=function(e,t){return null==e?void 0:e[t]};var jr=function(e,t){var r=Pr(e,t);return Nr(r)?r:void 0},Ir=jr(Object,"create"),_r=Ir;var kr=function(){this.__data__=_r?_r(null):{},this.size=0};var Sr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Dr=Ir,Fr=Object.prototype.hasOwnProperty;var zr=function(e){var t=this.__data__;if(Dr){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Fr.call(t,e)?t[e]:void 0},Ar=Ir,Hr=Object.prototype.hasOwnProperty;var Rr=function(e){var t=this.__data__;return Ar?void 0!==t[e]:Hr.call(t,e)},$r=Ir;var Br=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$r&&void 0===t?"__lodash_hash_undefined__":t,this},Vr=kr,Ur=Sr,Wr=zr,Gr=Rr,Yr=Br;function Xr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xr.prototype.clear=Vr,Xr.prototype.delete=Ur,Xr.prototype.get=Wr,Xr.prototype.has=Gr,Xr.prototype.set=Yr;var Zr=Xr;var qr=function(){this.__data__=[],this.size=0},Jr=Ee;var Kr=function(e,t){for(var r=e.length;r--;)if(Jr(e[r][0],t))return r;return-1},Qr=Kr,en=Array.prototype.splice;var tn=function(e){var t=this.__data__,r=Qr(t,e);return!(r<0)&&(r==t.length-1?t.pop():en.call(t,r,1),--this.size,!0)},rn=Kr;var nn=function(e){var t=this.__data__,r=rn(t,e);return r<0?void 0:t[r][1]},an=Kr;var on=Kr;var ln=function(e,t){var r=this.__data__,n=on(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},sn=qr,cn=tn,dn=nn,un=function(e){return an(this.__data__,e)>-1},hn=ln;function mn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mn.prototype.clear=sn,mn.prototype.delete=cn,mn.prototype.get=dn,mn.prototype.has=un,mn.prototype.set=hn;var pn=mn,fn=jr(Ce,"Map"),gn=Zr,vn=pn,bn=fn;var yn=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var En=function(e,t){var r=e.__data__;return yn(t)?r["string"==typeof t?"string":"hash"]:r.map},wn=En;var xn=En;var Cn=En;var On=En;var Tn=function(e,t){var r=On(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Mn=function(){this.size=0,this.__data__={hash:new gn,map:new(bn||vn),string:new gn}},Ln=function(e){var t=wn(this,e).delete(e);return this.size-=t?1:0,t},Nn=function(e){return xn(this,e).get(e)},Pn=function(e){return Cn(this,e).has(e)},jn=Tn;function In(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}In.prototype.clear=Mn,In.prototype.delete=Ln,In.prototype.get=Nn,In.prototype.has=Pn,In.prototype.set=jn;var _n=In;function kn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(kn.Cache||_n),r}kn.Cache=_n;const Sn=kn((()=>{const e=document.createElement("div");e.style.overflowY="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.append(e);const t=e.offsetWidth;return e.remove(),t})),Dn=$((({data:e,children:t,onClick:r,onAuxClick:n,menuComponent:i})=>{const a=p(null),o=p(null);return h.createElement("div",{ref:a,onDragStart:t=>{var r;if(!t.dataTransfer)return;t.dataTransfer.setData("x-3deye/event",""+e.id),t.dataTransfer.setData("x-3deye/camera",""+e.cameraId),t.dataTransfer.setData("x-3deye/starttime",e.startTime.toISOString()),t.dataTransfer.dropEffect="move";const n=null===(r=a.current)||void 0===r?void 0:r.querySelector("img");if(n){const{x:e,y:r}=n.getBoundingClientRect();t.dataTransfer.setDragImage(n,t.clientX-e,t.clientY-r)}},className:"event-list-item",onClick:()=>null==r?void 0:r(e),onAuxClick:t=>null==n?void 0:n(t,e),onContextMenu:e=>{var t;e.preventDefault(),a.current&&(null===(t=o.current)||void 0===t||t.toggleAt(a.current,{top:e.clientY,left:e.clientX}))},draggable:!0},t,i&&h.createElement(i,{ref:o,data:e}))}));function Fn(e,t,r,n){return e.Top<-n&&(e.Bottom=e.Bottom-e.Top+n,e.Top=-n),e.Left<-n&&(e.Right=e.Right-e.Left+n,e.Left=-n),e.Right+n>t&&(e.Left=e.Left-(e.Right-t)+n,e.Right=t-n),e.Bottom+n>r&&(e.Top=e.Top-(e.Bottom-r)+n,e.Bottom=r-n),e}Dn.displayName="EventListItem";const zn=({className:e,style:t,box:{Top:r,Left:n,Right:i,Bottom:a}})=>h.createElement(h.Fragment,null,h.createElement("div",{className:e,style:{position:"absolute",top:100*r+"%",left:100*n+"%",bottom:100*(1-a)+"%",right:100*(1-i)+"%",...t}}));function An({style:e}){return h.createElement("div",{className:"frame",style:e},h.createElement("div",{className:"corner-highlight-tl"}),h.createElement("div",{className:"corner-highlight-tr"}),h.createElement("div",{className:"corner-highlight-br"}),h.createElement("div",{className:"corner-highlight-bl"}))}function Hn({Top:e,Left:t,Bottom:r,Right:n},i,a,o,l){const s=l*e,c=l*r;return s>a?[0,-1]:c>a?[0,1]:o*t>i?[-1,0]:o*n>i?[1,0]:[0,s>c?1:-1]}function Rn(e,t){return{Top:e.Top+t[1],Left:e.Left+t[0],Bottom:e.Bottom+t[1],Right:e.Right+t[0]}}zn.displayName="LicensePlateLpr";const $n=({face:{Name:e,Box:t,Probability:r},url:n,thumbWidth:i,thumbHeight:a,width:o,height:l})=>{const{Top:s,Left:c,Right:d,Bottom:u}=t,m=100/i/(d-c),f={top:2},g=p(null);return w((()=>{if(!g.current)return;const{width:e,height:r}=g.current.getBoundingClientRect(),n=Hn(t,e,r,o,l);n[0]=n[0]*(e+(d-c)*o)/2,n[1]=n[1]*(r+(u-s)*l)/2;const i=Fn(Rn({Top:(s+u)/2*l-r/2,Left:(c+d)/2*o-e/2,Bottom:(s+u)/2*l+r/2,Right:(c+d)/2*o+e/2},n),o,l,0);g.current.style.top=`${i.Top+2*Math.sign(n[1])}px`,g.current.style.left=`${i.Left+2*Math.sign(n[0])}px`})),c>=1-d?f.left=2:f.right=2,h.createElement(h.Fragment,null,h.createElement("div",{ref:g,className:"event-list-item__detected-object-label trigger",title:`${e} ${Math.floor(100*r)}%`},h.createElement("div",{style:{padding:4,display:"flex",alignItems:"center",maxWidth:120,whiteSpace:"break-spaces"}},e),h.createElement("div",{className:"event-list-item__detected-object-label__caption",style:{color:"black",backgroundColor:"orange"}},Math.floor(100*r),"%")),h.createElement(zn,{className:"trigger",box:t,style:{outline:"1px solid orange"}}),h.createElement("div",{className:"event-list-item-face preview",style:{overflow:"hidden",width:i*(d-c)*m,height:a*(u-s)*m,...f}},h.createElement("img",{style:{width:i*m,height:a*m,transform:`translate(-${100*c}%, -${100*s}%)`},src:n}),h.createElement(An,null)))};$n.displayName="FaceHighlight";const Bn=h.memo((({value:e})=>e?h.createElement(h.Fragment,null,e.split("").map(((e,t)=>{const r=e.charCodeAt(0);return r<48||r>57?h.createElement(h.Fragment,{key:t},e):h.createElement("span",{key:t,className:"digit"},e)}))):null));Bn.displayName="LicensePlateNumber";const Vn=({detectedObject:e,height:t,width:r,url:n,thumbWidth:i,thumbHeight:a})=>{const{Type:o,Box:{Top:l,Left:s,Right:c,Bottom:d},Probability:u}=e,m=e.Value||e.Number,f=p(null);w((()=>{if(!f.current)return;const e=f.current.getBoundingClientRect();let n=(s+c)/2*r-e.width/2,i=l*t-e.height-4;i<0&&(i=d*t+4),n<0&&(n=0),n>r-e.width&&(n=r-e.width),f.current.style.top=`${i}px`,f.current.style.left=`${n}px`}));const g={top:2};s>=1-c?g.left=2:g.right=2;const v=100/i/(c-s);return h.createElement(h.Fragment,null,h.createElement("div",{ref:f,className:"event-list-item__license-plate-label trigger",title:`${o.toLowerCase()} ${Math.floor(100*u)}%`},h.createElement("div",{style:{padding:4}},h.createElement(Bn,{value:m})),h.createElement("div",{className:"event-list-item__license-plate-label__caption"},Math.floor(100*u),"%")),h.createElement(zn,{className:"event-list-item__license-plate-trigger trigger",box:e.Box}),h.createElement("div",{className:"event-list-item__license-plate preview",style:{overflow:"hidden",width:i*(c-s)*v,height:a*(d-l)*v+16,position:"absolute",...g}},h.createElement("img",{style:{width:i*v,height:a*v,transform:`translate(-${100*s}%, -${100*l}%)`},src:n}),h.createElement("div",{className:"plate-number"},h.createElement(Bn,{value:m})),h.createElement(An,{style:{height:a*(d-l)*v}})))};Vn.displayName="LicensePlateHighlight";const Un=Pt({viewBox:"0 0 24 24",svg:h.createElement(h.Fragment,null,h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),h.createElement("path",{d:"M15 13V5c0-1.66-1.34-3-3-3S9 3.34 9 5v8c-1.21.91-2 2.37-2 4 0 2.76 2.24 5 5 5s5-2.24 5-5c0-1.63-.79-3.09-2-4zm-4-8c0-.55.45-1 1-1s1 .45 1 1h-1v1h1v2h-1v1h1v2h-2V5z"}))});Un.displayName="ThermostatIcon";const Wn=$((({data:e})=>{if("Temperature"!==e.type)return null;let t=Number(e.raw.data);return t=5*(t-32)/9+273.15,h.createElement("div",{className:"event-list-item__temperature"},h.createElement(Un,null),(t-273.15).toFixed(1),"°C / ",(9*t/5-459.67).toFixed(1),"°F")}));Wn.displayName="Temperature";const Gn=$((({data:e,cameraNameHidden:t})=>{var r;const a=m(ue),{cameras:o}=a,l=o.loaded&&(null===(r=o.camerasById.get(e.cameraId))||void 0===r?void 0:r.name)||"...";return h.createElement("div",{className:"event-list-item-caption"},h.createElement("div",{className:"event-list-item__time"},function(e,t){let r="",a="";return n(e,new Date)?i(e,new Date)?r=a="HH:mm":i(e,t)?(r="EEE d MMM HH:mm",a="HH:mm"):r=a="EEE d MMM HH:mm":n(e,t)?(r="yyyy d MMM HH:mm",a="d MMM HH:mm"):r=a="yyyy d MMM HH:mm",(e.getSeconds()||t.getSeconds())&&(r+=":ss",a+=":ss"),+e==+t?`${de(e,r)}`:`${de(e,r)} - ${de(t,a)}`}(e.startTime,e.endTime)),t?null:h.createElement("div",{className:"event-list-item__camera-name",title:l},l),+e.endTime-+e.startTime>0&&h.createElement("div",{className:"event-list-item__duration"},function(e,t=!0){if((e=Math.round(e/1e3))<60)return`${e}s`;const r=e%60,n=t?`${r}`:`${r}`.padStart(2,"0");let i=(e-r)/60;if(i<60)return!r&&t?`${i}m`:`${i}m ${n}s`;const a=Math.floor(i/60);if(i-=60*a,!r&&!i&&t)return`${a}h`;const o=t?`${i}`:`${i}`.padStart(2,"0");return!r&&i&&t?`${a}h ${o}m`:`${a}h ${o}m ${n}s`}(+e.endTime-+e.startTime)),h.createElement(Wn,{data:e}))}));Gn.displayName="EventListItemCaption";const Yn=$((({url:e,noPreview:t,width:r})=>h.createElement(h.Fragment,null,e?h.createElement("img",{key:e,style:{position:"absolute",width:"100%",height:"100%",top:0,left:0},src:e}):null,h.createElement(re,{radius:r}),t?h.createElement("div",{className:"no-preview-overlay"}):null)));function Xn({Top:e,Left:t,Bottom:r,Right:n}){return[(t+n)/2,(e+r)/2]}function Zn(e,t){const[r,n]=Xn(e),[i,a]=Xn(t);return[i-r,a-n]}function qn(e,t){return!(e.Left>t.Right||e.Top>t.Bottom||e.Right<t.Left||e.Bottom<t.Top)}function Jn([e,t]){const r=Math.sqrt(e*e+t*t);return 0===r?[0,0]:[e/r,t/r]}Yn.displayName="EventThumbnail";const Kn=$((({data:e,width:t,height:r})=>{const n=p(null),{eventSchema:i}=m(ue);return w((()=>{if(!n.current)return;const i=[],a=[];for(let o=0;o<e.length;o++){const l=n.current.children[2*o+1],s=e[o].Box;i.push({Top:s.Top*r,Left:s.Left*t,Bottom:s.Bottom*r,Right:s.Right*t});const[c,d]=Xn(i[o]),{width:u,height:h}=l.getBoundingClientRect(),m=Hn(s,u,h,t,r);a.push(Rn({Top:d-h/2-4,Left:c-u/2-4,Bottom:d+h/2+4,Right:c+u/2+4},m))}let o=!0,l=0;for(;o;){if(o=!1,l++>1e3){console.warn("Reached max iterations for label positioning");break}for(let t=0;t<e.length;t++){const r=a[t],n=[0,0];for(let l=0;l<e.length;l++){const e=i[l],s=a[l];if(qn(r,e)){const t=Zn(e,r);n[0]=n[0]+t[0],n[1]=n[1]+t[1],o=!0}if(l!==t&&qn(r,s)){const e=Zn(s,r);n[0]=n[0]+e[0],n[1]=n[1]+e[1],o=!0}}[n[0],n[1]]=Jn(n),r.Top+=n[1],r.Left+=n[0],r.Bottom+=n[1],r.Right+=n[0]}}for(let i=0;i<e.length;i++){const e=n.current.children[2*i+1],{Top:o,Left:l}=Fn(a[i],t,r,4);e.style.top=o+4+"px",e.style.left=l+4+"px"}}),[e,t,r]),h.createElement("div",{ref:n},e.map((({Box:e,Probability:t,Type:r},n)=>h.createElement(h.Fragment,{key:n},h.createElement(zn,{box:e,style:{outline:`2px solid ${i.colorsByFoundObjectType.get(r)}`}}),h.createElement("div",{className:"event-list-item__detected-object-label",title:`${r.toLowerCase()} ${Math.floor(100*t)}%`},h.createElement("div",{style:{padding:4,lineHeight:"24px"}},r.toLowerCase()),h.createElement("div",{className:"event-list-item__detected-object-label__caption",style:{backgroundColor:i.colorsByFoundObjectType.get(r)}},Math.floor(100*t),"%"))))))}));Kn.displayName="DetectedObjects";const Qn=$((({data:e,width:t,height:r,cameraNameHidden:n,onClick:i,onAuxClick:a,menuComponent:o})=>{const l=m(ue),{eventSchema:s}=l,[c,d]=function(e){var t;const[r,n]=v(null),i=m(ue),{cameras:a,thumbnails:o}=i;E((()=>{if(e.thumbnailUrl)return void n(null);const t=o.fetchThumbnail(e.cameraId,e.startTime,e.startTime).subscribe((e=>{n(e||null)}));return()=>t.unsubscribe()}),[e.id]);let l="",s=!1;return e.thumbnailUrl?l=e.thumbnailUrl:null===r&&a.loaded?(l=(null===(t=a.camerasById.get(e.cameraId))||void 0===t?void 0:t.imageUrl)||"",s=!0):r&&(l=r.url),[l,s]}(e);let u=[],p=null,f=null;if(e.detectedObjects.length){let n,i;const{ThumbnailSize:a}=JSON.parse(e.raw.data);a&&(n=a.Width,i=a.Height),u=e.detectedObjects.filter((({Type:e})=>s.foundObjectTypes.includes(e)&&"LicensePlate"!==e)),p=e.detectedObjects.filter((({Type:e})=>"LicensePlate"===e)).map(((e,a)=>h.createElement(Vn,{key:a,detectedObject:e,width:t,height:r,thumbWidth:n,thumbHeight:i,url:c})))}if(e.faces){const{Width:n,Height:i}=JSON.parse(e.raw.data).ThumbnailSize;f=e.faces.map(((e,a)=>h.createElement($n,{key:a,face:e,url:c,thumbWidth:n,thumbHeight:i,width:t,height:r})))}return h.createElement(Dn,{onClick:i,onAuxClick:a,data:e,width:t,height:r,cameraNameHidden:n,menuComponent:o},h.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0}},h.createElement(Yn,{url:c,noPreview:d,width:t}),h.createElement(Kn,{data:u,width:t,height:r}),p,f,e.acknowledged?h.createElement("div",{className:"acknowledged-overlay"},"acknowledged"):null,h.createElement(Gn,{data:e,cameraNameHidden:n})))}));Qn.displayName="EventItem";class ei extends h.Component{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:{hasError:!1}})}componentDidCatch(e,t){this.setState({hasError:!0}),ie.withScope((r=>{Object.keys(t).forEach((e=>{r.setExtra(e,t[e])})),ie.captureException(e)})),console.error(e),console.log(t)}render(){if(!this.state.hasError)return this.props.children;const{style:e,children:t,...r}=this.props;return h.createElement("div",{style:{flex:1,padding:10,display:"grid",placeItems:"center",alignContent:"center",textAlign:"center",...this.props.style},...r},h.createElement("h1",null,"Oops. Something went wrong"),h.createElement("div",null,"We've been notified about this problem"),h.createElement(qt,{onClick:()=>this.setState({hasError:!1})},"retry"))}}function ti({count:e,overscan:t=1,itemSize:r,horizontal:n=!1,spacing:i=0}){const[a,o]=v(),[l,s]=v(0),c=f((e=>{o(e||void 0)}),[]);E((()=>{if(!a)return;const e=()=>{s(n?a.scrollLeft:a.scrollTop)};return a.addEventListener("scroll",e,{passive:!0,capture:!0}),()=>{a.removeEventListener("scroll",e)}}),[a,n]);return{parentRef:c,getItems:()=>{if(!a)return[];const o=[],{height:s,width:c}=a.getBoundingClientRect(),d=Math.max(0,Math.floor(l/(r+i))-t),u=Math.ceil((n?c:s)/(r+i))+2*t;for(let t=d;t<Math.min(e,d+u);t++)o.push({idx:t,start:t*(r+i),size:r});return o},getTotalSize:()=>r*e+Math.max(e-1,0)*i}}const ri=$((({columnIndex:e,rowIndex:t,style:r,store:n,columnCount:i,eventRenderer:a})=>{var o,l;const s=t*i+e,c=n.data[s];return s===n.data.length?n.error?h.createElement("div",{style:r},h.createElement("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"}},h.createElement("div",{style:{textAlign:"center"}},h.createElement("div",null,"Couldn't fetch more data"),h.createElement(qt,{onClick:n.loadMore},"Retry")))):(null===(o=n.pageInfo)||void 0===o?void 0:o.haveMore)?h.createElement("div",{style:r},h.createElement("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"}},h.createElement(hr,{size:32}))):h.createElement("div",{style:r}):!c&&(null===(l=n.pageInfo)||void 0===l?void 0:l.haveMore)?h.createElement("div",{style:r}):c?h.createElement("div",{style:r},h.createElement(ei,null,a({data:c,width:r.width,height:r.height}))):h.createElement("div",{style:r})})),ni=$((({store:e,scrollWidth:t,onClick:r})=>e.pendingData.length?h.createElement("div",{style:{position:"absolute",top:0,left:0,right:t,pointerEvents:"none",textAlign:"center",padding:8}},h.createElement(qt,{className:"x-3deye-button--overlay",style:{background:"rgba(0, 0, 0, 0.75)",padding:"8px 16px",backdropFilter:"blur(2px)",borderRadius:32,pointerEvents:"auto"},onClick:r},ce.t("showEvents",{count:e.pendingData.length}))):null)),ii=$((({store:e,width:t,height:r,captionHeight:n=0,minColumnWidth:i=180,aspectRatio:a=16/9,onEventClick:o,onEventAuxClick:l,eventRenderer:s})=>{const c=p(null),d=()=>{c.current&&(c.current.scrollTop=0)};if(e.error&&!e.data.length)return d(),h.createElement("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center"}},h.createElement("div",{style:{textAlign:"center"}},h.createElement("div",null,"Couldn't fetch data"),h.createElement(qt,{onClick:e.reload},"Retry")));if(e.loading)return d(),h.createElement("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center"}},h.createElement(hr,null));if(!e.data.length)return d(),h.createElement("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center"}},ce.t("noEventsFound"));const u={store:e,width:t,minColumnWidth:i,aspectRatio:a,captionHeight:n,height:r,onEventClick:o,onEventAuxClick:l,eventRenderer:s,containerRef:c,resetScroll:d};return h.createElement(ai,{...u})}));ii.displayName="EventGrid";const ai=$((({store:e,width:t,height:r,captionHeight:n=0,minColumnWidth:i=180,aspectRatio:a,containerRef:o,onEventClick:l,onEventAuxClick:s,eventRenderer:c=(({data:e,width:t,height:r})=>h.createElement(Qn,{data:e.data,cameraNameHidden:!1,onClick:l,onAuxClick:s,width:t,height:r})),resetScroll:d})=>{var u,m;const p=Math.floor(t/i)||1,f=t/p/a+n,g=p*Math.floor(r/f)>=e.data.length?0:Sn(),v=Math.max(1,Math.floor((t-g)/i));let b=Math.ceil(e.data.length/v);const y=(t-g-2*(v-1))/v,w=y/a+n;(null===(u=e.pageInfo)||void 0===u?void 0:u.haveMore)&&b*v===e.data.length&&b++;const{parentRef:x,getItems:C,getTotalSize:O}=ti({count:b,overscan:5,itemSize:w,spacing:2}),{parentRef:T,getItems:M,getTotalSize:L}=ti({count:v,overscan:5,itemSize:y,horizontal:!0,spacing:2}),N=C(),P=M();E((()=>{var t;e.error||(null===(t=e.pageInfo)||void 0===t?void 0:t.haveMore)&&(e.loading||N.length&&N.at(-1).idx+1===b&&e.loadMore())}),[e.error,null===(m=e.pageInfo)||void 0===m?void 0:m.haveMore,N]);const j=N.flatMap((({idx:t,size:r,start:n})=>P.map((({idx:i,size:a,start:o})=>{var l;const s=t*v+i;return s>e.data.length?null:s!==e.data.length||(null===(l=e.pageInfo)||void 0===l?void 0:l.haveMore)?h.createElement(ri,{key:e.data[s]?`${e.data[s].data.id}-${e.data[s].objectIdx}`:"loading",columnIndex:i,rowIndex:t,columnCount:v,style:{position:"absolute",top:0,left:0,height:r,width:a,transform:`translate(${o}px, ${n}px)`,display:"flex"},store:e,eventRenderer:c}):null}))));return h.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"relative"}},h.createElement("div",{ref:ne(o,x,T),style:{width:t,height:r,overflow:"auto"},onScroll:t=>{const{scrollTop:r}=t.target;"disabled"!==e.liveUpdateMode&&e.setLiveUpdateMode(r>=1||e.pendingData.length?"manual":"auto")}},h.createElement("div",{style:{position:"relative",height:O(),width:L()}},j)),h.createElement(ni,{store:e,scrollWidth:g,onClick:()=>{e.flushUpdates(),e.setLiveUpdateMode("auto"),d()}}))})),oi=({onEventClick:e,style:t,...r})=>{var n;const i=null!==(n=m(x))&&void 0!==n?n:C,[a,o]=v(),{ref:l,width:s,height:c}=(e=>{const{ref:t,width:r,height:n}=ae(),[i,a]=v(0);return E((()=>{a((e=>e+1))}),e),{ref:t,width:r,height:n,fix:i}})([a]);return E((()=>(null==a||a.dispose(),j((()=>i.initialized),(()=>{const e=new Mt(i.events);e.initWith(i.api),e.load(),o(e)})))),[i]),h.createElement(ue.Provider,{value:i},a?h.createElement("div",{style:{display:"flex",flexDirection:"column",textAlign:"left",...t},...r},h.createElement(Wt,{addionalFiltersEnabled:!0,store:a}),h.createElement(ar,{store:a}),a.someAnalyticsFilterSelected&&h.createElement(h.Fragment,null,h.createElement(sr,{getter:a.getProbabilityTreshold,setter:a.setProbabilityTreshold}),h.createElement(ur,{value:a.colors,toggle:a.toggleColor,clear:a.clearColors})),h.createElement("div",{ref:l,style:{flex:1,display:"flex"}},h.createElement(ii,{minColumnWidth:1/0,store:a.eventsLoader,width:s,height:c,eventRenderer:({data:t,width:r,height:n})=>h.createElement(Qn,{data:t.data,cameraNameHidden:!1,onClick:e,width:r,height:n})}))):null)};var li;oi.displayName="EventList",(li={resources:{en:{translation:oe}}})&&Object.assign(se,li),ce.isInitialized?(se.resources?Object.keys(se.resources).forEach((e=>{ce.addResourceBundle(e,"translation",se.resources[e].translation,!0)})):console.warn("i18n is already initialized"),o(ce.t)):l(ce.init(se));export{oi as default};
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.28.3"
9
+ }
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
- "name": "@3deye-toolkit/react-event-list",
3
- "version": "0.0.1-alpha.8",
4
- "module": "dist/event-list.js",
5
- "files": ["dist"],
6
- "dependencies": {
7
- "@3deye-toolkit/core": "0.0.1-alpha.8",
8
- "@material/react-ripple": "0.15.0",
9
- "@rmwc/slider": "5.7.2",
10
- "@seznam/compose-react-refs": "1.0.4",
11
- "classnames": "2.2.6",
12
- "date-fns": "2.8.1",
13
- "i18next-browser-languagedetector": "4.0.1",
14
- "i18next-xhr-backend": "3.2.2",
15
- "i18next": "19.0.2",
16
- "memoize-one": "5.1.1",
17
- "mobx-react-lite": "1.5.2",
18
- "mobx-react": "6.1.4",
19
- "mobx": "5.15.1",
20
- "react-datepicker": "2.10.1",
21
- "react-ink": "6.4.0",
22
- "react-spring": "8.0.27",
23
- "react": "16.12.0",
24
- "react-select": "3.0.8",
25
- "reconnecting-websocket": "4.2.0",
26
- "rematrix": "0.4.1",
27
- "resize-observer-polyfill": "1.5.1",
28
- "rxjs": "6.5.4",
29
- "tslib": "1.10.0"
2
+ "name": "@3deye-toolkit/react-event-list",
3
+ "version": "0.0.1",
4
+ "module": "dist/react-event-list.js",
5
+ "types": "dist/react-event-list.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "dependencies": {
10
+ "@3deye-toolkit/core": "0.0.1",
11
+ "@floating-ui/react": "^0.14.0",
12
+ "@mantine/hooks": "^5.5.6",
13
+ "@sentry/browser": "^5.15.5",
14
+ "@seznam/compose-react-refs": "^1.0.6",
15
+ "clsx": "^1.1.1",
16
+ "date-fns": "^2.28.0",
17
+ "earcut": "^2.2.3",
18
+ "i18next": "21.6.11",
19
+ "lodash": "4.17.21",
20
+ "mobx": "^6.3.13",
21
+ "mobx-react-lite": "^3.2.3",
22
+ "react-datepicker": "^4.6.0",
23
+ "react-ink": "^6.5.3",
24
+ "react-select": "^5.2.2",
25
+ "rxjs": "^7.5.3"
30
26
  },
31
27
  "peerDependencies": {
32
- "react": "16.12.0",
33
- "react-dom": "16.12.0"
28
+ "react": "^16.8.0 || ^17 || ^18",
29
+ "react-dom": "^16.8.0 || ^17 || ^18"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/"
34
34
  },
35
- "sideEffects": [
36
- "*.css"
35
+ "sideEffects": [
36
+ "*.css"
37
37
  ],
38
38
  "license": "mit"
39
39
  }
@@ -1 +0,0 @@
1
- import e,{createElement as t,PureComponent as n,Fragment as i}from"react";import{app as a}from"@3deye-toolkit/core";import{__decorate as r,__metadata as o,__rest as l}from"tslib";import{reaction as s,observable as c,action as h,computed as m}from"mobx";import{observer as d,disposeOnUnmount as p}from"mobx-react";import u,{registerLocale as f}from"react-datepicker";import v,{components as g}from"react-select";import z from"i18next";import"i18next-browser-languagedetector";import"i18next-xhr-backend";import{format as E,setYear as b,isAfter as y,setMonth as M,setDate as w,startOfDay as x,isBefore as C,getDaysInMonth as _,endOfDay as H,getYear as S,isSameYear as L,getMonth as V,isSameMonth as O,getDate as T,setHours as R,setMinutes as k,setSeconds as D,isSameDay as F,getHours as N,isSameHour as B,getMinutes as j,isSameMinute as A,getSeconds as I}from"date-fns";import{format as P,isSameYear as W,isSameDay as $}from"date-fns/esm";import{es as U,pt as q}from"date-fns/esm/locale";import{Subject as Y,empty as Z,Subscription as X}from"rxjs";import J from"classnames";import K from"react-ink";import G from"react-dom";import{useSpring as Q,animated as ee}from"react-spring";import{Slider as te}from"@rmwc/slider";import ne from"resize-observer-polyfill";import ie from"memoize-one";import{switchMap as ae,debounceTime as re}from"rxjs/operators";import{withRipple as oe}from"@material/react-ripple";import le from"@seznam/compose-react-refs";const se=e.createContext(null),ce=new Map,he="en";class me extends e.Component{constructor(){super(...arguments),this.state={head:0,tail:0}}componentWillReceiveProps(e){const{offset:t}=this.props,n=e.offset,{head:i,tail:a}=this.state;n-t>0&&this.setState({tail:Math.max(a,Math.ceil(n))}),this.setState({head:-1*Math.min(-i,Math.floor(n))})}render(){const{from:t,to:n,offset:i,transition:a}=this.props,r=n-t+1;let{tail:o,head:l}=this.state;return i<0?l=-1*Math.min(-l,Math.floor(i)):o=Math.max(o,Math.ceil(i)),e.createElement("div",{style:{position:"absolute",height:34,lineHeight:"34px",top:"calc(50% - 17px)",overflow:"hidden"}},e.createElement("div",{style:{backgroundColor:"white",width:100,fontSize:"1.6em",textAlign:"center",fontFamily:"Arial, Helvetica, sans-serif",transform:`translateY(${-34*i}px) translateZ(100px)`,transition:a,marginTop:-34*l}},Array.from({length:l+o+1},(n,i)=>e.createElement("div",{key:i},this.props.format(t+((i-l)%r+r)%r)))))}}me.defaultProps={format:e=>e};class de extends e.Component{constructor(e){super(e),this.tracker=null,this.velocity=0,this.amplitude=0,this.clickOccured=!1,this.ignoreClick=!1,this.preventAnimation=!1,this.rotationDirection=1,this.onWheel=({deltaY:e})=>{Math.abs(e)>=34?this.setState(t=>{const n=e/Math.abs(e),i=t.rotation+n;if(!(i>this.getMaxRotation()||i<this.getMinRotation()))return{rotation:i}},this.notifyValueChange):(this.rotationDirection=e/Math.abs(e),this.setState(t=>{const n=t.rotation+e/34;if(!(n>this.getMaxRotation()||n<this.getMinRotation()))return{rotation:n,dragging:!0}},this.finishRotation))},this.onMouseDown=e=>{const{clientY:t}=e,n=this.state.rotation;let i,a=Date.now(),r=n;clearInterval(this.tracker),this.velocity=this.amplitude=0,this.clickOccured=!1,this.ignoreClick=!1;const o=()=>{const e=Date.now(),t=e-a;a=e;const n=this.state.rotation-r;r=this.state.rotation;const i=1e3*n/(1+t);this.velocity=.8*i+.2*this.velocity},l=({clientY:e})=>{const i=n+(t-e)/34;i>this.getMaxRotation()||i<this.getMinRotation()||this.setState({rotation:i})},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),clearInterval(this.tracker),Math.abs(this.velocity)>=5?(this.amplitude=.8*this.velocity,i=this.state.rotation+this.amplitude,a=Date.now(),requestAnimationFrame(c)):this.setState(({rotation:e})=>({rotation:Math.round(e),dragging:!1}),this.notifyValueChange)},c=()=>{const e=Date.now()-a,t=-this.amplitude*Math.exp(-e/325);if(this.amplitude)if(t>.5||t<-.5){const e=i+t;if(e>this.getMaxRotation()||e<this.getMinRotation())return void this.setState(({rotation:e})=>({rotation:Math.round(e),dragging:!1}),this.notifyValueChange);this.setState({rotation:e}),requestAnimationFrame(c)}else this.setState(({rotation:e})=>({rotation:Math.round(e),dragging:!1}),this.notifyValueChange)},h=({clientY:e})=>{if(this.clickOccured)return document.removeEventListener("mousemove",h),void document.removeEventListener("mouseup",m);Math.abs(e-n)>=5&&(this.setState({dragging:!0}),this.ignoreClick=!0,document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",m),document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),this.tracker=window.setInterval(o,100))},m=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",m),this.clickOccured||(this.state.dragging&&(this.ignoreClick=!0),this.setState(({rotation:e})=>({rotation:Math.round(e),dragging:!1}),this.notifyValueChange))};document.addEventListener("mousemove",h),document.addEventListener("mouseup",m)},this.getRotationByValue=e=>{const{value:t,from:n,to:i,min:a,max:r}=e;if(void 0===r||void 0===a)return t-n;const o=Math.round(this.state?this.state.rotation:0),l=(o%18+18)%18;let s=o,c=l;for(;this.getCellValue(c,s,n,i)!==t;)c=((c-1)%18+18)%18,s--;let h=o,m=l;for(;this.getCellValue(m,h,n,i)!==t;)m=((m+1)%18+18)%18,h++;return h-o>o-s?s:h},this.getMaxRotation=()=>{const{max:e=1/0}=this.props;if(!isFinite(e))return e;const t=Math.round(this.state.rotation),n=(t%18+18)%18;return t+e-this.getCellValue(n,t)},this.getMinRotation=()=>{const{min:e=-1/0}=this.props;if(!isFinite(e))return e;const t=Math.round(this.state.rotation),n=(t%18+18)%18;return t+e-this.getCellValue(n,t)},this.getCellValue=(e,t,n=this.props.from,i=this.props.to)=>{const a=i-n+1;let r;return r=e<12?t>=0?t%18<9||e<2?(e+18*Math.round(t/18))%a:(e+18*Math.round((t-7)/18))%a:t%18<0&&e>4?(e+18*Math.round((t-9)/18))%a:(e+18*Math.round(t/18))%a:(e-(18-a)+18*Math.round(t/18))%a,n+(r+a)%a},this.renderCellValue=(e,t)=>{const n=this.getMaxRotation(),i=this.getMinRotation();if(Number.isFinite(n)){const a=(t%18+18)%18;let r;if(r=a<5&&e>13?t+e-a-18:a>13&&e<5?t+e-a+18:t+e-a,r=Math.round(r),r>n)return null;if(r<i)return null}return this.props.format?this.props.format(this.getCellValue(e,t)):this.getCellValue(e,t)},this.notifyValueChange=()=>{const e=Math.round(this.state.rotation),{onChange:t}=this.props;if(!t)return;const n=this.getCellValue((e%18+18)%18,e);this.value!==n&&(this.value=n,t(n))};const t=void 0!==e.value?this.getRotationByValue(e):0;this.value=void 0!==e.value?e.value:e.from,this.state={rotation:t,dragging:!1}}componentWillReceiveProps(e){if(void 0===e.value)return;const{rotation:t}=this.state,n=this.getCellValue((t%18+18)%18,t),i=this.getRotationByValue(e);n===e.value&&e.max===this.props.max&&e.min===this.props.min&&e.from===this.props.from&&e.to===this.props.to||(this.preventAnimation=n===e.value&&t!==i,this.setState({rotation:i},()=>{this.preventAnimation=!1}),this.value=e.value)}finishRotation(){this.setState(({rotation:e})=>({rotation:this.rotationDirection<0?Math.floor(e):Math.ceil(e),dragging:!1}),this.notifyValueChange)}componentWillUnmount(){}jumpTo(e){this.clickOccured=!0,this.ignoreClick?this.ignoreClick=!1:this.setState(({dragging:t,rotation:n})=>{if(t)return null;const i=(n%18+18)%18;let a;return a=i<5&&e>13?n+e-i-18:i>13&&e<5?n+e-i+18:n+e-i,a>this.getMaxRotation()||a<this.getMinRotation()?null:{rotation:a}},this.notifyValueChange)}render(){const{rotation:t,dragging:n}=this.state,i=n||this.preventAnimation?"none":"transform 1000ms cubic-bezier(0.165, 0.84, 0.44, 1)";return e.createElement("div",{style:{width:100,position:"relative",userSelect:"none",MozUserSelect:"none"},onWheel:this.onWheel,onMouseDown:this.onMouseDown,onTouchStart:({targetTouches:e})=>console.log(e)},e.createElement("div",{style:{background:"linear-gradient(\n\t\t\t\t\t\tto bottom,\n\t\t\t\t\t\trgba(255,255,255,1) 0%,\n\t\t\t\t\t\trgba(255,255,255,0.09) 40%,\n\t\t\t\t\t\trgba(255,255,255,0) 40%,\n\t\t\t\t\t\trgba(255,255,255,0) 60%,\n\t\t\t\t\t\trgba(255,255,255,0.07) 60%,\n\t\t\t\t\t\trgba(255,255,255,1) 100%\n\t\t\t\t\t)",position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:1,pointerEvents:"none"}},e.createElement("div",{style:{position:"absolute",height:34,top:76,left:0,right:0,borderTop:"1px solid #aaa",borderBottom:"1px solid #aaa"}})),e.createElement("div",{style:{height:187}},e.createElement("div",{style:{position:"absolute",top:"50%",left:0,right:0,transformStyle:"preserve-3d",height:34,marginTop:-17,transform:`rotateX(${20*t}deg)`,transition:i,textAlign:"center"}},Array.from({length:18}).map((n,i)=>e.createElement("div",{key:i,style:{height:34,lineHeight:"34px",transform:`rotateX(${-20*i}deg) translateZ(85px)`,position:"absolute",width:"100%",top:0,left:0,backfaceVisibility:"hidden",fontFamily:"Arial, Helvetica, sans-serif",fontSize:"1.6em",color:"#666"},onClick:()=>this.jumpTo(i)},this.renderCellValue(i,t))))),e.createElement(me,Object.assign({offset:t,transition:i},this.props)))}}r([function(e){let t;return(n,i,a)=>{void 0===a&&(a=Object.getOwnPropertyDescriptor(n,i));const r=a.value;return a.value=function(...n){clearTimeout(t),t=setTimeout(()=>{t=null,r.apply(this,n)},e)},a}}(200),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],de.prototype,"finishRotation",null);const pe=e=>e.toString().padStart(2,"0");class ue extends e.Component{constructor(){super(...arguments),this.formatMonth=e=>{const t=ce.get(this.props.locale||he);return E(new Date(2019,e,1),"MMM",{locale:t})},this.onYearChange=e=>{const{maxDate:t,minDate:n,date:i,onChange:a}=this.props;let r=b(i,e);y(r,t)&&(r=M(r,0),r=w(r,1),y(r,t)&&(r=x(r))),C(r,n)&&(r=M(r,11),r=w(r,_(r)),C(r,n)&&(r=H(r))),a(r)},this.onMonthChange=e=>{const{maxDate:t,minDate:n,date:i,onChange:a}=this.props;let r=M(i,e);y(r,t)&&(r=w(r,1),r=x(r)),C(r,n)&&(r=H(w(r,_(r)))),a(r)},this.onDayChange=e=>{const{date:t,onChange:n,maxDate:i,minDate:a}=this.props;let r=w(t,e);y(r,i)&&(r=x(r)),C(r,a)&&(r=H(r)),n(r)},this.getYearParams=()=>{const{maxDate:e,minDate:t}=this.props,n=S(t),i=S(e);return{from:n,to:i,min:n,max:i}},this.getMonthParams=()=>{const{maxDate:e,minDate:t,date:n}=this.props;let i,a;L(n,t)&&(a=V(t)),L(n,e)&&(i=V(e));const r={from:0,to:11};return void 0===a&&void 0===i||(r.min=void 0===a?0:a,r.max=void 0===i?11:i),r},this.getDayParams=()=>{const{maxDate:e,minDate:t,date:n}=this.props,i=_(n);let a,r;O(n,t)&&(a=T(t)),O(n,e)&&(r=T(e));const o={from:1,to:i};return void 0===a&&void 0===r||(o.min=void 0===a?1:a,o.max=void 0===r?i:r),o}}render(){const{date:t}=this.props;return e.createElement("div",{style:{perspective:1200,display:"flex",justifyContent:"center"}},e.createElement(de,Object.assign({onChange:this.onYearChange,value:S(t)},this.getYearParams())),e.createElement(de,Object.assign({onChange:this.onMonthChange,value:V(t),format:this.formatMonth},this.getMonthParams())),e.createElement(de,Object.assign({onChange:this.onDayChange,value:T(t),format:pe},this.getDayParams())))}}const fe=e=>e.toString().padStart(2,"0");class ve extends e.Component{constructor(){super(...arguments),this.onHoursChange=e=>{const{maxDate:t,minDate:n,date:i}=this.props;let a=R(i,e);y(a,t)&&(a=k(a,0),a=D(a,0)),C(a,n)&&(a=k(a,59),a=D(a,59)),this.props.onChange(a)},this.onMinutesChange=e=>{const{maxDate:t,minDate:n,date:i,onChange:a}=this.props;let r=k(i,e);y(r,t)&&(r=D(r,0)),C(r,n)&&(r=D(r,59)),a(r)},this.onSecondsChange=e=>{this.props.onChange(D(this.props.date,e))},this.getHoursParams=()=>{const{maxDate:e,minDate:t,date:n}=this.props;let i,a;F(n,t)&&(a=N(t)),F(n,e)&&(i=N(e));const r={from:0,to:23};return void 0===a&&void 0===i||(r.min=void 0===a?0:a,r.max=void 0===i?23:i),r},this.getMinutesParams=()=>{const{maxDate:e,minDate:t,date:n}=this.props;let i,a;B(n,t)&&(a=j(t)),B(n,e)&&(i=j(e));const r={from:0,to:59};return void 0===a&&void 0===i||(r.min=void 0===a?0:a,r.max=void 0===i?59:i),r},this.getSecondsParams=()=>{const{maxDate:e,minDate:t,date:n}=this.props;let i,a;A(n,t)&&(i=I(t)),A(n,e)&&(a=I(e));const r={from:0,to:59};return void 0===i&&void 0===a||(r.min=void 0===i?0:i,r.max=void 0===a?59:a),r}}render(){const{date:t}=this.props;return e.createElement("div",null,e.createElement("div",null,e.createElement("div",null,e.createElement("div",{style:{perspective:1200,display:"flex",justifyContent:"center"}},e.createElement(de,Object.assign({onChange:this.onHoursChange,value:N(t),format:fe},this.getHoursParams())),e.createElement(de,Object.assign({onChange:this.onMinutesChange,value:j(t),format:fe},this.getMinutesParams())),e.createElement(de,Object.assign({onChange:this.onSecondsChange,value:I(t),format:fe},this.getSecondsParams()))))))}}class ge extends e.Component{constructor(){super(...arguments),this.onChange=e=>{this.props.onChange(e)},this.requestDateMode=()=>{this.props.onModeChange("date")},this.requestTimeMode=()=>{this.props.onModeChange("time")}}shouldComponentUpdate(e){return+e.date!=+this.props.date||+e.minDate!=+this.props.minDate||+e.maxDate!=+this.props.maxDate||e.mode!==this.props.mode}render(){const{date:t,minDate:n,maxDate:i,mode:a,dateTitle:r,timeTitle:o}=this.props;return C(t,n)||y(t,i)?(console.error("incorrect params. date must be within given period"),null):e.createElement("div",{style:{width:300,backgroundColor:"white"}},e.createElement("div",{style:{display:"flex",fontSize:"1.6em",fontFamily:"Arial, Helvetica, sans-serif",textAlign:"center"}},e.createElement("div",{style:{flex:1,color:"date"===a?"#0091ff":"black"},onClick:this.requestDateMode},r),e.createElement("div",{style:{flex:1,color:"time"===a?"#0091ff":"black"},onClick:this.requestTimeMode},o)),"date"===a?e.createElement(ue,{minDate:n,maxDate:i,onChange:this.onChange,date:t}):e.createElement(ve,{minDate:n,maxDate:i,onChange:this.onChange,date:t}))}}ge.defaultProps={dateTitle:"Date",timeTitle:"Time"};const ze=new Map,Ee=z;function be(e,t){ze.set(e,t),f(e,t),function(e,t){ce.set(e,t)}(e,t)}function ye(e,t){const n=ze.get(Ee.language);return P(e,t,{locale:n})}be("es",U),be("pt",q);class Me extends e.Component{render(){const t=this.props,{forwardedRef:n,children:i,className:a,fullwidth:r,type:o}=t,s=l(t,["forwardedRef","children","className","fullwidth","type"]),c=J(a,{button:!0,fullwidth:r});return e.createElement("button",Object.assign({ref:n,className:c,type:o||"button"},s),i,s.disabled?null:e.createElement(K,null))}}var we=e.forwardRef((t,n)=>e.createElement(Me,Object.assign({forwardedRef:n},t)));const xe=t=>{const{className:n,children:i}=t,a=l(t,["className","children"]);return e.createElement("div",Object.assign({className:J("button-group",n)},a),i)};var Ce={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},_e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},He={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Se={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Le={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},Ve="#ffffff",Oe="#000000";const Te={add:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"chevron-down":{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),e.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))},"chevron-up":{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"chevron-right":{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},close:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"more-vert":{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))},sidebar:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M 19,17 H 10 V 7 h 9 M 21,5 H 3 v 14 h 18 z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},undock:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M7 5v10h14V5zM3 7v12h16v-2H5V7zm6 0h10v6H9z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},label:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M10.13 3.245a1.994 1.994 0 0 0-1.542.992l-5.491 9.53c-.55.954-.23 2.178.723 2.728l8.66 5c.953.55 2.174.216 2.724-.737l5.509-9.521c.335-.58.349-1.265.087-1.832L17.65 2.54z"}))},camera:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"}))},cancel:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"locate-scrubber":{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M19 16v-3h4v-2h-4V8l-4 4zM5 8v3H1v2h4v3l4-4zm6 12h2V2h-2z"}),e.createElement("circle",{cx:"12",cy:"19",r:"3"}))},rewind:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M18,9.86v4.28L14.97,12L18,9.86 M9,9.86v4.28L5.97,12L9,9.86 M20,6l-8.5,6l8.5,6V6L20,6z M11,6l-8.5,6l8.5,6V6L11,6z"}))},forward:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M15,9.86L18.03,12L15,14.14V9.86 M6,9.86L9.03,12L6,14.14V9.86 M13,6v12l8.5-6L13,6L13,6z M4,6v12l8.5-6L4,6L4,6z"}))},download:{viewBox:"0 0 24 24",svg:e.createElement("g",null,e.createElement("path",{fill:"none",d:"M0,0h24v24H0V0z"}),e.createElement("path",{d:"M19.35,10.04C18.67,6.59,15.64,4,12,4C9.11,4,6.6,5.64,5.35,8.04C2.34,8.36,0,10.91,0,14c0,3.31,2.69,6,6,6h13\n\t\t\tc2.76,0,5-2.24,5-5C24,12.36,21.95,10.22,19.35,10.04z M19,18H6c-2.21,0-4-1.79-4-4c0-2.05,1.53-3.76,3.56-3.97l1.07-0.11\n\t\t\tl0.5-0.95C8.08,7.14,9.94,6,12,6c2.62,0,4.88,1.86,5.39,4.43l0.3,1.5l1.53,0.11C20.78,12.14,22,13.45,22,15\n\t\t\tC22,16.65,20.65,18,19,18z"}),e.createElement("polygon",{points:"13.45,10 10.55,10 10.55,13 8,13 12,17 16,13 13.45,13"}))},delete:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("g",null,e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"})))},timelapse:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M16.24 7.76A5.974 5.974 0 0 0 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0a5.99 5.99 0 0 0-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},pause:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},play:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M8 5v14l11-7z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},playlist:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))},map:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},library:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"}))},notification:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M12 22c1.1 0 2-.9 2-2h-4a2 2 0 0 0 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"}))},categories:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"arrow-right":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M10 17l5-5-5-5v10z"}),e.createElement("path",{fill:"none",d:"M0 24V0h24v24H0z"}))},person:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"view-module":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},sync:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},unsync:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0zm0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33zm-7.14-.94l2.36 2.36a7.925 7.925 0 0 0 1.14 9.87L4 20h6v-6l-2.24 2.24A6.003 6.003 0 0 1 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14 2.86 5.41zM20 4h-6v6l2.24-2.24A6.003 6.003 0 0 1 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46a7.925 7.925 0 0 0-1.14-9.87L20 4z"}))},"volume-down":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M18.5 12A4.5 4.5 0 0 0 16 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"volume-off":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M16.5 12A4.5 4.5 0 0 0 14 7.97v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51A8.796 8.796 0 0 0 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06a8.99 8.99 0 0 0 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},fullscreen:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))},"fullscreen-exit":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))},thumbnails:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M4 4v2H0v12h4v2h16v-2h4V6h-4V4H4zm1.455 1.334h1.453v1.332H5.455V5.334zm2.908 0h1.455v1.332H8.363V5.334zm2.91 0h1.454v1.332h-1.454V5.334zm2.909 0h1.455v1.332h-1.455V5.334zm2.91 0h1.453v1.332h-1.453V5.334zM1.059 7h1.058v1H1.06V7zm2.117 0H4v1h-.824V7zM20 7h.824v1H20V7zm1.883 0h1.058v1h-1.058V7zM5.455 8h13.09v8H5.455V8zM1.06 9H4v6H1.059V9zM20 9h2.941v6H20V9zM1.059 16h1.058v1H1.06v-1zm2.117 0H4v1h-.824v-1zM20 16h.824v1H20v-1zm1.883 0h1.058v1h-1.058v-1zM5.455 17.334h1.453v1.332H5.455v-1.332zm2.908 0h1.455v1.332H8.363v-1.332zm2.91 0h1.454v1.332h-1.454v-1.332zm2.909 0h1.455v1.332h-1.455v-1.332zm2.91 0h1.453v1.332h-1.453v-1.332z"}))},"create-clip":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("g",{id:"g16",transform:"matrix(.7033 0 0 .66667 -.462 2.333)"},e.createElement("path",{d:"M31.937 25V3H3.5v22zM28.015 5h1.961v2h-1.961zm0 4h1.961v2h-1.961zm0 4h1.961v2h-1.961zm0 4h1.961v2h-1.961zm0 4h1.961v2h-1.961zM9.384 5h16.67v18H9.384zM5.5 5h2v2h-2zm0 4h2v2h-2zm0 4h2v2h-2zm0 4h2v2h-2zm0 4h2v2h-2z"}),e.createElement("path",{d:"M9.625 7.625h14.75v14.75H9.625z",id:"path6",fill:"none"}),e.createElement("circle",{cx:"13.313",cy:"18.688",r:"1.229",id:"circle8",fill:"none"}),e.createElement("circle",{cx:"17",cy:"15",r:".307",id:"circle10",fill:"none"}),e.createElement("circle",{cx:"13.313",cy:"11.313",r:"1.229",id:"circle12",fill:"none"}),e.createElement("path",{d:"M16.268 11.32c.141-.307.221-.645.221-1.008a2.457 2.457 0 1 0-2.458 2.458c.363 0 .701-.08 1.008-.221L16.49 14l-1.45 1.45a2.398 2.398 0 0 0-1.008-.221 2.457 2.457 0 1 0 2.458 2.458c0-.363-.08-.701-.221-1.008l1.45-1.45 4.302 4.302h1.844v-.615zm-2.237.222a1.229 1.229 0 1 1 0-2.457 1.229 1.229 0 0 1 0 2.457zm0 7.375a1.229 1.229 0 1 1 0-2.457 1.229 1.229 0 0 1 0 2.457zm3.688-4.61a.304.304 0 0 1-.307-.307c0-.172.135-.307.307-.307s.307.135.307.307a.304.304 0 0 1-.307.307zm4.302-5.838l-3.688 3.688 1.229 1.229 4.302-4.302v-.615z"})))},"jam-pause":{viewBox:"-4 -3 24 24",svg:e.createElement("path",{d:"M2 0h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 2v14h2V2H2zm10-2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 2v14h2V2h-2z"})},"jam-play":{viewBox:"-4 -3 24 24",svg:e.createElement("path",{d:"M13.82 9.523a.976.976 0 0 0-.324-1.363L3.574 2.128a1.031 1.031 0 0 0-.535-.149c-.56 0-1.013.443-1.013.99V15.03c0 .185.053.366.153.523.296.464.92.606 1.395.317l9.922-6.031c.131-.08.243-.189.325-.317zm.746 1.997l-9.921 6.031c-1.425.867-3.3.44-4.186-.951A2.918 2.918 0 0 1 0 15.03V2.97C0 1.329 1.36 0 3.04 0c.567 0 1.123.155 1.605.448l9.921 6.032c1.425.866 1.862 2.696.975 4.088-.246.386-.58.712-.975.952z"})},"jam-volume-down":{viewBox:"-1 -3 24 24",svg:e.createElement("path",{d:"M12 2h-.6a2 2 0 0 0-1.444.617L6.239 6.5H2v5h4.239l3.717 3.883A2 2 0 0 0 11.4 16H12V2zM5.385 4.5L8.51 1.234A4 4 0 0 1 11.401 0H13a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-1.6a4 4 0 0 1-2.889-1.234L5.385 13.5H2a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h3.385zM16 7a1 1 0 0 1 0-2 4 4 0 1 1 0 8 1 1 0 0 1 0-2 2 2 0 1 0 0-4z"})},"jam-volume-mute":{viewBox:"-1 -3 24 24",svg:e.createElement("path",{d:"M12 2h-.6a2 2 0 0 0-1.444.617L6.239 6.5H2v5h4.239l3.717 3.883A2 2 0 0 0 11.4 16H12V2zM5.385 4.5L8.51 1.234A4 4 0 0 1 11.401 0H13a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-1.6a4 4 0 0 1-2.889-1.234L5.385 13.5H2a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h3.385zM19.415 9l1.413 1.414a1 1 0 1 1-1.414 1.414L18 10.414l-1.414 1.414a1 1 0 1 1-1.414-1.414L16.586 9l-1.414-1.414a1 1 0 0 1 1.414-1.414L18 7.586l1.414-1.414a1 1 0 1 1 1.414 1.414L19.414 9z"})},"jam-grid":{viewBox:"-2 -2 24 24",svg:e.createElement("path",{d:"M2 2v4h4V2H2zm0-2h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm12 0h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 2v4h4V2h-4zm0 10h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2zm0 2v4h4v-4h-4zM2 12h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2zm0 2v4h4v-4H2z"})},"jam-map":{viewBox:"-2 -2 24 24",svg:e.createElement("path",{d:"M2 17.613l3.419-1.14A5 5 0 0 1 6 16.317V2.387L2 3.721v13.892zm-.662 2.328A1 1 0 0 1 0 19V3a1 1 0 0 1 .706-.956L5.419.473a5 5 0 0 1 3.162 0l3.47 1.157a3 3 0 0 0 1.898 0L18.662.059A1 1 0 0 1 20 1v16a1 1 0 0 1-.706.956l-4.713 1.571a5 5 0 0 1-3.162 0l-3.47-1.157a3 3 0 0 0-1.898 0l-4.713 1.571zM18 16.28V2.387l-3.419 1.14a5 5 0 0 1-.581.156v13.93l4-1.334zm-6 1.334V3.683a5 5 0 0 1-.581-.156L8 2.387v13.93a5 5 0 0 1 .581.156L12 17.613z"})},"jam-refresh":{viewBox:"-1.5 -2.5 24 24",svg:e.createElement("path",{d:"M17.83 4.194l.42-1.377a1 1 0 1 1 1.913.585l-1.17 3.825a1 1 0 0 1-1.248.664l-3.825-1.17a1 1 0 1 1 .585-1.912l1.672.511A7.381 7.381 0 0 0 3.185 6.584l-.26.633a1 1 0 1 1-1.85-.758l.26-.633A9.381 9.381 0 0 1 17.83 4.194zM2.308 14.807l-.327 1.311a1 1 0 1 1-1.94-.484l.967-3.88a1 1 0 0 1 1.265-.716l3.828.954a1 1 0 0 1-.484 1.941l-1.786-.445a7.384 7.384 0 0 0 13.216-1.792 1 1 0 1 1 1.906.608 9.381 9.381 0 0 1-5.38 5.831 9.386 9.386 0 0 1-11.265-3.328z"})},"jam-refresh-disabled":{viewBox:"0 0 1000 1000",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M771 596s3.135-13.72 14.295-23.678c9.824-8.766 26.766-14.393 40.705-8.322 44.209 19.254 23 63 23 63l-12 30z"}),e.createElement("path",{d:"M133.452 116.262l758.786 701.786a41.5 41.5 0 0 1-58.69 58.69s-35.084-35.415-92.561-87.766c-.177-.161-95.5 99.8-261.879 99.8-143.03 0-254.171-74.942-319.948-167.255-.1-.142-14.263 57.042-14.263 57.042s-13 33.184-40.876 29.887C54.347 802.568 63 759 63 759l40-160.913A47.86 47.86 0 0 1 116 573c15.984-15.716 36.986-10.037 36.986-10.037s114.6 29.361 162.946 40.5C339.544 608.9 352.755 634.365 348 652c-9.686 35.922-38.922 35.226-50.161 32.639-32-7.37-74.932-17.925-74.932-17.925s82.831 139 256.575 139c122.07 0 200.624-74.124 200.572-74.174C550.93 607.824 363.206 435.289 229.015 317.618c-.145-.128-20.291 26.919-46.939 91.71-6.913 16.81-32.914 31.275-56.676 17.9-18.277-10.289-26.105-31.266-20.326-48.937 24.3-74.3 62.612-117.389 62.572-117.432-53.078-55.995-92.884-85.906-92.884-85.906a41.5 41.5 0 0 1 58.69-58.691z"}),e.createElement("path",{d:"M358 213s51.052-26 121-26c178.393 0 257 139 257 139l-73-23s-34.43-8.448-48 25c-15.325 37.773 26 56 26 56l162 49s16.2 6.072 32-4 17-20 17-20l51-164s10.933-40.7-29-52c-34.45-9.748-50 23-50 23l-19 62S697.016 104 480 104c-108.167 0-187 49-187 49z"}))},"jam-close":{viewBox:"-6 -6 24 24",svg:e.createElement("path",{d:"M7.314 5.9l3.535-3.536A1 1 0 1 0 9.435.95L5.899 4.485 2.364.95A1 1 0 1 0 .95 2.364l3.535 3.535L.95 9.435a1 1 0 1 0 1.414 1.414l3.535-3.535 3.536 3.535a1 1 0 1 0 1.414-1.414L7.314 5.899z"})},"aspect-ratio":{viewBox:"0 0 1000 1000",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M786.864 166H208.241C145.638 166 83 221.33 83 285.047v428.3C83 776.157 139.182 834 209.869 834h582.1C860.579 834 917 773.784 917 713.533v-426.9C917 221.834 856.793 166 786.864 166zm44.776 115.431v437.2c0 13.086-20.229 30.649-35.5 30.649H200.32c-12.238 0-31.96-18.745-31.96-28.877V280.092c0-11.127 19.122-29.372 31.382-29.372h600.25c12.716 0 31.648 20.35 31.648 30.711z"}),e.createElement("path",{d:"M252.9 335.128V550h85.57V421.6h128.587v-86.472H252.9z"}),e.createElement("path",{d:"M747.1 663.872V449h-85.57v128.4H532.943v86.474H747.1z"}))},share:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"}))},peek:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}))},unpeek:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M1.455 11c-.165.326-.32.658-.455 1 1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-.135-.342-.29-.674-.455-1-1.95 3.853-5.935 6.5-10.545 6.5S3.405 14.853 1.455 11z"}))},"jam-camera":{viewBox:"-2 -4 24 24",svg:e.createElement("path",{d:"M5.676 5H4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1.676l-.387-1.501A2.002 2.002 0 0 0 12 2H8a2 2 0 0 0-1.937 1.499L5.676 5zm-1.55-2C4.57 1.275 6.136 0 8 0h4a4.002 4.002 0 0 1 3.874 3H16a4 4 0 0 1 4 4v5a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V7a4 4 0 0 1 4-4h.126zM10 13a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm6-3a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})},"jam-activity":{viewBox:"-2 -3 24 24",svg:e.createElement("path",{d:"M7.116 10.749L6 1.948l-1.116 8.8H1c-.552 0-1-.437-1-.976a.99.99 0 0 1 1-.978h2.116l.9-7.086C4.15.636 5.15-.124 6.245.008c.91.11 1.626.81 1.739 1.7l.899 7.086h1.974L12 16.04l1.142-7.245H19c.552 0 1 .438 1 .978s-.448.977-1 .977h-4.142l-.881 5.587a1.978 1.978 0 0 1-1.672 1.634c-1.092.165-2.113-.567-2.282-1.634l-.88-5.587H7.115z"})},search:{viewBox:"-2.5 -2.5 24 24",svg:e.createElement("path",{d:"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12zm6.32-1.094l3.58 3.58a1 1 0 1 1-1.415 1.413l-3.58-3.58a8 8 0 1 1 1.414-1.414z"})},help:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}))},"jam-play-circle":{viewBox:"-2 -2 24 24",svg:e.createElement("path",{d:"M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm4.126-6.254l-4.055 2.898c-.905.646-2.13.389-2.737-.576A2.201 2.201 0 0 1 7 12.898V7.102C7 5.942 7.883 5 8.972 5c.391 0 .774.124 1.099.356l4.055 2.898c.905.647 1.146 1.952.54 2.917a2.042 2.042 0 0 1-.54.575zM8.972 7.102v5.796L13.027 10 8.972 7.102z"})},pdf:{viewBox:"0 0 36 44",svg:e.createElement(e.Fragment,null,e.createElement("defs",null,e.createElement("clipPath",{id:"a"},e.createElement("path",{d:"M0 0h36v44H0z"}))),e.createElement("g",{clipPath:"url(#a)"},e.createElement("path",{d:"M11.33 24c-.76-.011-1.52.046-2.27.17V32h1.66v-2.84c.19.014.38.014.57 0a3.303 3.303 0 0 0 2.41-.83 2.63 2.63 0 0 0 .68-1.88 2.39 2.39 0 0 0-.79-1.83 3.38 3.38 0 0 0-2.26-.62zm0 3.81a2.384 2.384 0 0 1-.56 0v-2.38a2.67 2.67 0 0 1 .69-.07c.84 0 1.31.44 1.31 1.16a1.27 1.27 0 0 1-1.49 1.3l.05-.01zM23.06 32h1.68v-3.19h2.66v-1.46h-2.66v-1.81h2.85v-1.47h-4.53V32zm-5.73-8c-.76-.005-1.519.052-2.27.17V32c.63.084 1.265.124 1.9.12a5.08 5.08 0 0 0 3.42-1 4.15 4.15 0 0 0 1.23-3.21 3.61 3.61 0 0 0-1.25-3 4.538 4.538 0 0 0-3.03-.91zm0 6.67a2.958 2.958 0 0 1-.58 0v-5.21a3.29 3.29 0 0 1 .76-.07 2.2 2.2 0 0 1 2.33 2.52c-.01 1.89-1 2.78-2.51 2.77v-.01zM26 0H4a4 4 0 0 0-4 4v36a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4V11L26 0zm8 40a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18v10a2 2 0 0 0 2 2h10v26zM24 12V2h1l9 10H24z"})))},stop:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M6 6h12v12H6z"}))},"zoom-in":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))},"zoom-out":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"}))},control:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M15.54 5.54L13.77 7.3 12 5.54 10.23 7.3 8.46 5.54 12 2zm2.92 10l-1.76-1.77L18.46 12l-1.76-1.77 1.76-1.77L22 12zm-10 2.92l1.77-1.76L12 18.46l1.77-1.76 1.77 1.76L12 22zm-2.92-10l1.76 1.77L5.54 12l1.76 1.77-1.76 1.77L2 12z"}),e.createElement("circle",{cx:"12",cy:"12",r:"3"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))},mic:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"arrow-forward":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))},"jam-shield":{viewBox:"-4 -2 24 24",svg:e.createElement("path",{d:"M2 4.386V8a9.02 9.02 0 0 0 3.08 6.787L8 17.342l2.92-2.555A9.019 9.019 0 0 0 14 8V4.386l-6-2.25-6 2.25zM.649 2.756L8 0l7.351 2.757a1 1 0 0 1 .649.936V8c0 3.177-1.372 6.2-3.763 8.293L8 20l-4.237-3.707A11.019 11.019 0 0 1 0 8V3.693a1 1 0 0 1 .649-.936z"})},"jam-shield-filled":{viewBox:"-4 -1.5 24 24",svg:e.createElement("path",{d:"M.649 3.322L8 .565l7.351 2.757a1 1 0 0 1 .649.936v4.307c0 3.177-1.372 6.2-3.763 8.292L8 20.565l-4.237-3.708A11.019 11.019 0 0 1 0 8.565V4.258a1 1 0 0 1 .649-.936z"})},"jam-shield-check-filled":{viewBox:"-4 -1.5 24 24",svg:e.createElement("path",{d:"M.649 3.322L8 .565l7.351 2.757a1 1 0 0 1 .649.936v4.307c0 3.177-1.372 6.2-3.763 8.292L8 20.565l-4.237-3.708A11.019 11.019 0 0 1 0 8.565V4.258a1 1 0 0 1 .649-.936zm6.29 7.51L5.525 9.42a1 1 0 1 0-1.414 1.414l2.121 2.121a1 1 0 0 0 1.414 0l4.243-4.243a1 1 0 1 0-1.414-1.414l-3.536 3.536z"})},"directions-run":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{d:"M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"}))},"directions-car":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},done:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}))},"blur-on":{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},alien:{viewBox:"0 0 1050 1280",svg:e.createElement("g",{transform:"translate(0.000000,1280.000000) scale(0.100000,-0.100000)"},e.createElement("path",{d:"M4845 12789 c-822 -47 -1550 -229 -2210 -554 -483 -237 -826 -483 -1205 -864 -291 -292 -481 -535 -679 -866 -417 -698 -653 -1484 -733 -2435 -26 -315 -14 -1132 23 -1535 95 -1033 356 -1798 909 -2670 316 -497 846 -1183 1521 -1965 989 -1148 1752 -1724 2479 -1871 165 -34 435 -34 600 0 581 118 1206 526 1911 1249 551 564 1406 1597 1872 2263 575 821 889 1535 1042 2369 77 422 111 821 121 1415 13 719 -46 1276 -196 1851 -154 591 -423 1176 -751 1637 -253 353 -601 712 -941 968 -899 677 -2058 1025 -3388 1017 -129 0 -298 -5 -375 -9z m-2630 -6149 c446 -64 1102 -602 1700 -1395 564 -748 893 -1494 836 -1896 -28 -203 -125 -313 -318 -363 -165 -43 -449 -41 -678 5 -900 180 -1888 974 -2265 1819 -127 285 -191 596 -176 855 36 615 318 961 801 983 17 1 62 -3 100 -8z m6350 -17 c202 -43 385 -195 492 -408 99 -196 150 -516 124 -775 -52 -512 -313 -1015 -771 -1484 -638 -654 -1491 -1050 -2149 -997 -220 18 -327 56 -411 148 -194 212 -122 680 199 1298 461 888 1292 1814 1901 2120 237 119 400 145 615 98z m-2255 -4823 c0 -36 -120 -181 -203 -243 -179 -138 -403 -212 -714 -238 -385 -32 -766 58 -1000 238 -83 62 -203 207 -203 243 0 7 336 10 1060 10 724 0 1060 -3 1060 -10z"}))},flame:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},palette:{viewBox:"0 0 24 24",svg:e.createElement(e.Fragment,null,e.createElement("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},"selection-multiple-marker":{viewBox:"0 0 24 24",svg:e.createElement("path",{d:"M7 4H9V6H8V7H6V5C6 4.45 6.45 4 7 4M19 4C19.55 4 20 4.45 20 5V7H18V6H17V4H19M11 6V4H15V6H11M7 18C6.45 18 6 17.55 6 17V15H8V16H9V18H7M6 9H8V13H6V9M3 8H4V20H14.58L16.03 22L3 22C2.45 22 2 21.55 2 21V9C2 8.45 2.45 8 3 8M18.5 12C20.4 12 22 13.6 22 15.5C22 18.1 18.5 22 18.5 22C18.5 22 15 18.1 15 15.5C15 13.6 16.6 12 18.5 12M18.5 16.8C19.2 16.8 19.8 16.2 19.7 15.6C19.7 15 19.1 14.4 18.5 14.4C17.9 14.4 17.3 14.9 17.3 15.6C17.3 16.2 17.8 16.8 18.5 16.8M11 18V16H13C13.09 16.66 13.27 17.33 13.5 18H11M20 9V10.23C19.5 10.08 19 10 18.5 10L18 10.03V9H20Z"})},overscan:{viewBox:"0 0 24 24",svg:e.createElement("path",{d:"M12 5.5L10 8H14L12 5.5M18 10V14L20.5 12L18 10M6 10L3.5 12L6 14V10M14 16H10L12 18.5L14 16M21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 21 3 21H21C22.1 21 23 20.1 23 19V5C23 3.9 22.1 3 21 3M21 19H3V5H21V19Z"})}};class Re extends e.Component{render(){const t=this.props,{name:n,size:i=24,color:a="currentColor"}=t,r=l(t,["name","size","color"]),o=Te[n].viewBox||"0 0 24 24",s=Te[n].svg||Te[n];return e.createElement("svg",Object.assign({preserveAspectRatio:"xMinYMin",className:"icon",width:i,fill:a,viewBox:o,height:i},r),s)}}const ke=[{color:Ce[500],name:"red",highlightColor:Ce[100]},{color:He[500],name:"green",highlightColor:He[100]},{color:_e[500],name:"blue",highlightColor:_e[100]},{color:Se[500],name:"yellow",highlightColor:Se[900]},{color:Oe,name:"black",highlightColor:Ve},{color:Ve,name:"white",highlightColor:Oe},{color:Le[500],name:"dimgrey",highlightColor:Le[100]}];let De=class extends e.Component{constructor(){super(...arguments),this.toggleColor=e=>{this.props.toggle(e)}}render(){const{value:t,clear:n}=this.props;return e.createElement("div",{className:"color-selector"},e.createElement("div",null,"COLOR"),e.createElement("div",{className:"color-selector__items"},ke.map(({color:n,highlightColor:i,name:a})=>e.createElement("button",{key:a,className:J("color-selector__item",{selected:t.has(a)}),style:{backgroundColor:n,color:i,outlineColor:i},onClick:this.toggleColor.bind(null,a)},e.createElement(Re,{name:"done",size:20}))),e.createElement(we,{disabled:!t.size,onClick:n},e.createElement(Re,{name:"close",size:20}))))}};De=r([d],De);var Fe=De;const Ne=e=>`scale(${e})`,Be=({children:e,from:n,style:i}={from:"bottom"})=>{const a=Q({opacity:1,from:{opacity:0},config:{tension:300}});return t(ee.div,{style:Object.assign(Object.assign(Object.assign({},i),a),{transform:a.opacity.interpolate(Ne),transformOrigin:`${n} center`,width:"max-content"})},e)},je=document.body;class Ae extends e.Component{constructor(e){super(e),this.el=document.createElement("div")}componentDidMount(){je.appendChild(this.el)}componentWillUnmount(){je.removeChild(this.el)}render(){return G.createPortal(this.props.children,this.el)}}const Ie=({width:t,height:n,color:i,position:a="top",style:r})=>{const o=[0,"top"===a?n:0],l=[t,o[1]],s=[t/2,n-o[1]],c=[t/4,n*("top"===a?3:1)/4],h=[.325*t,n-o[1]],m=[t-h[0],h[1]],d=[t-c[0],c[1]],p=e=>e.join(","),u=`M ${p(o)} `+`C ${p(c)} ${p(h)} ${p(s)} `+`${p(m)} ${p(d)} ${p(l)} Z`;return e.createElement("svg",{className:"tip",style:r,width:t,height:n,fill:i},e.createElement("path",{d:u}))};class Pe extends e.Component{constructor(){super(...arguments),this.state={top:0,left:0,bottom:"auto",tipPosition:"bottom",tipOffset:0},this.targetRef=e.createRef(),this.popoverRef=e.createRef(),this.outsideClickListener=e=>{const t=e.target;if(this.popoverRef.current.contains(t))return;const n=G.findDOMNode(this.targetRef.current);n&&n.contains(t)||this.props.onCloseRequest()},this.updatePosition=()=>{if(!this.popoverRef)return;const{disablePortal:e}=this.props,t=G.findDOMNode(this.targetRef.current);if(!t)return void console.warn("popover: no target element found");const{top:n,left:i,bottom:a,height:r,width:o}=t.getBoundingClientRect();let l="calc(50% - 12px)",s="auto";const c=this.popoverRef.current;let h="bottom"===this.props.position?a+10:n-c.clientHeight-10,m=i+o/2-c.clientWidth/2,d="bottom"===this.props.position?"top":"bottom";h<0&&(h=a+10,d="top"),m<0&&(m=0,l=i+o/2-12),m+c.clientWidth>window.innerWidth&&(m=window.innerWidth-c.clientWidth,l=i-m+o/2-12),e&&(h=r+10,m=0,l=8,"top"===this.props.position&&(s=h,h="auto")),this.setState({top:h,bottom:s,left:m,tipPosition:d,tipOffset:l},()=>{this.forceUpdate()})}}componentWillUnmount(){this.stopOutsideClickListening()}componentDidUpdate(e){const{ignoreOutsideClick:t}=this.props;this.props.opened&&!e.opened&&(t||this.startOutsideClickListening(),requestAnimationFrame(this.updatePosition)),!this.props.opened&&e.opened&&this.stopOutsideClickListening()}render(){const{top:t,left:n,bottom:i,tipPosition:a,tipOffset:r}=this.state,{className:o,opened:l,disablePortal:s,disableAnimation:c}=this.props,h={position:"absolute",left:r};"bottom"===a?h.bottom=-8:h.top=-8;const m=J(o,"popover-body");let d=null;if(l){const r={zIndex:s?1:100000001,position:"absolute",top:t,bottom:i,left:n},o=e.createElement("div",{className:m,ref:this.popoverRef},this.props.children,e.createElement(Ie,{width:24,height:8,position:a,color:"white",style:h}));d=c?e.createElement("div",{className:"popover-wrapper",style:r},o):e.createElement(Be,{from:a,style:r},o)}const p=e.cloneElement(this.props.target,{ref:this.targetRef});if(s)return e.createElement("div",{className:"popover",onMouseLeave:this.props.onMouseLeave},p,d);const u=l&&e.createElement(Ae,null,d);return e.createElement(e.Fragment,null,p,u)}startOutsideClickListening(){document.addEventListener("mousedown",this.outsideClickListener,!0)}stopOutsideClickListening(){document.removeEventListener("mousedown",this.outsideClickListener,!0)}}let We=class extends e.Component{constructor(){super(...arguments),this.containerRef=e.createRef(),this.sliderRef=e.createRef(),this.probabilityThreshold=0,this.width=0,this.resizeObserver=null}onSliderInput(e){this.probabilityThreshold=e.detail.value}onSliderChange(){this.props.setter(this.probabilityThreshold/100)}reactToValueChange(){this.disposeReactionToValue&&this.disposeReactionToValue(),this.disposeReactionToValue=s(this.props.getter,e=>{this.probabilityThreshold=Math.floor(100*e)},{fireImmediately:!0})}componentDidMount(){this.reactToValueChange(),this.resizeObserver=new ne(e=>{for(const t of e){const e=t.contentRect.width;this.width=e}}),this.resizeObserver.observe(this.containerRef.current),p(this,s(()=>this.width,()=>{this.sliderRef.current.layout()}))}componentDidUpdate(e){e.getter!==this.props.getter&&this.reactToValueChange()}componentWillUnmount(){this.disposeReactionToValue()}render(){const t=Math.floor(100*this.props.getter());return e.createElement("div",{ref:this.containerRef,style:{paddingLeft:8,paddingRight:8,marginTop:5}},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",null,"CONFIDENCE"),e.createElement("div",{style:{fontSize:"1.1em"}},t,"%")),e.createElement(te,{ref:this.sliderRef,onInput:this.onSliderInput,onChange:this.onSliderChange,value:this.probabilityThreshold,discrete:!0,displayMarkers:!0,min:0,max:100,step:5}))}};r([c],We.prototype,"probabilityThreshold",void 0),r([c],We.prototype,"width",void 0),r([h.bound],We.prototype,"onSliderInput",null),r([h.bound],We.prototype,"onSliderChange",null),We=r([d],We);var $e=We,Ue={control:(e,t)=>Object.assign(Object.assign({},e),{borderRadius:0,backgroundColor:t.isFocused?"white":"rgba(0, 0, 0, 0.5)",borderColor:"transparent transparent rgba(255, 255, 255, 0.25) transparent",boxShadow:null,"&:hover":{borderColor:null}}),menu:e=>Object.assign(Object.assign({},e),{borderRadius:"0 0 4px 4px",marginTop:0}),option:e=>Object.assign(Object.assign({},e),{color:"black"}),multiValueRemove:e=>Object.assign(Object.assign({},e),{color:"black"})};function qe(e){var t;t="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;var n,i,a="undefined"!=typeof document&&document.attachEvent;if(!a){var r=(i=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(e){return t.setTimeout(e,20)},function(e){return i(e)}),o=(n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.clearTimeout,function(e){return n(e)}),l=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,i=t.lastElementChild,a=n.firstElementChild;i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight,a.style.width=n.offsetWidth+1+"px",a.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},s=function(e){if(!(e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;l(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=r((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}},c=!1,h="",m="animationstart",d="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),u=document.createElement("fakeelement");if(void 0!==u.style.animationName&&(c=!0),!1===c)for(var f=0;f<d.length;f++)if(void 0!==u.style[d[f]+"AnimationName"]){h="-"+d[f].toLowerCase()+"-",m=p[f],c=!0;break}var v="resizeanim",g="@"+h+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",z=h+"animation: 1ms "+v+"; "}return{addResizeListener:function(n,i){if(a)n.attachEvent("onresize",i);else{if(!n.__resizeTriggers__){var r=n.ownerDocument,o=t.getComputedStyle(n);o&&"static"==o.position&&(n.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var n=(g||"")+".resize-triggers { "+(z||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=t.head||t.getElementsByTagName("head")[0],a=t.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(t.createTextNode(n)),i.appendChild(a)}}(r),n.__resizeLast__={},n.__resizeListeners__=[],(n.__resizeTriggers__=r.createElement("div")).className="resize-triggers",n.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',n.appendChild(n.__resizeTriggers__),l(n),n.addEventListener("scroll",s,!0),m&&(n.__resizeTriggers__.__animationListener__=function(e){e.animationName==v&&l(n)},n.__resizeTriggers__.addEventListener(m,n.__resizeTriggers__.__animationListener__))}n.__resizeListeners__.push(i)}},removeResizeListener:function(e,t){if(a)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(m,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}var Ye=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ze=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Je=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Ke=function(e){function i(){var e,t,n;Ye(this,i);for(var a=arguments.length,r=Array(a),o=0;o<a;o++)r[o]=arguments[o];return t=n=Je(this,(e=i.__proto__||Object.getPrototypeOf(i)).call.apply(e,[this].concat(r))),n.state={height:n.props.defaultHeight||0,width:n.props.defaultWidth||0},n._onResize=function(){var e=n.props,t=e.disableHeight,i=e.disableWidth,a=e.onResize;if(n._parentNode){var r=n._parentNode.offsetHeight||0,o=n._parentNode.offsetWidth||0,l=window.getComputedStyle(n._parentNode)||{},s=parseInt(l.paddingLeft,10)||0,c=parseInt(l.paddingRight,10)||0,h=parseInt(l.paddingTop,10)||0,m=parseInt(l.paddingBottom,10)||0,d=r-h-m,p=o-s-c;(!t&&n.state.height!==d||!i&&n.state.width!==p)&&(n.setState({height:r-h-m,width:o-s-c}),a({height:r,width:o}))}},n._setRef=function(e){n._autoSizer=e},Je(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,n),Ze(i,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=qe(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,n=e.children,i=e.className,a=e.disableHeight,r=e.disableWidth,o=e.style,l=this.state,s=l.height,c=l.width,h={overflow:"visible"},m={},d=!1;return a||(0===s&&(d=!0),h.height=0,m.height=s),r||(0===c&&(d=!0),h.width=0,m.width=c),t("div",{className:i,ref:this._setRef,style:Xe({},h,o)},!d&&n(m))}}]),i}();function Ge(){return(Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Qe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ke.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}};var et="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function tt(e){cancelAnimationFrame(e.id)}var nt=null;function it(e){if(void 0===e&&(e=!1),null===nt||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),a=i.style;return a.width="100px",a.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?nt="positive-descending":(t.scrollLeft=1,nt=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),nt}return nt}process.env.NODE_ENV;var at=function(e,t){return e},rt=null,ot=null;function lt(e){var i,a,r=e.getItemOffset,o=e.getEstimatedTotalSize,l=e.getItemSize,s=e.getOffsetForIndexAndAlignment,c=e.getStartIndexForOffset,h=e.getStopIndexForStartIndex,m=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,p=e.validateProps;return a=i=function(e){var n,i;function a(t){var n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,Qe(Qe(n))),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:Qe(Qe(n)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=ie((function(e,t,i,a){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:i,visibleStopIndex:a})})),n._callOnScroll=void 0,n._callOnScroll=ie((function(e,t,i){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:i})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,o=i.itemSize,s=i.layout,c=n._getItemStyleCache(d&&o,d&&s,d&&a);if(c.hasOwnProperty(e))t=c[e];else{var h,m=r(n.props,e,n._instanceProps),p=l(n.props,e,n._instanceProps),u="horizontal"===a||"horizontal"===s;c[e]=((h={position:"absolute"})["rtl"===a?"right":"left"]=u?m:0,h.top=u?0:m,h.height=u?"100%":p,h.width=u?p:"100%",t=h)}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=ie((function(e,t,n){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,i=t.clientWidth,a=t.scrollLeft,r=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===a)return null;var t=n.props.direction,o=a;if("rtl"===t)switch(it()){case"negative":o=-a;break;case"positive-descending":o=r-i-a}return o=Math.max(0,Math.min(o,r-i)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:o,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,i=t.clientHeight,a=t.scrollHeight,r=t.scrollTop;n.setState((function(e){if(e.scrollOffset===r)return null;var t=Math.max(0,Math.min(r,a-i));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,i,a;null!==n._resetIsScrollingTimeoutId&&tt(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=150,i=et(),a={id:requestAnimationFrame((function n(){et()-i>=t?e.call(null):a.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}i=e,(n=a).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,a.getDerivedStateFromProps=function(e,t){return st(e,t),p(e),null};var u=a.prototype;return u.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},u.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props.itemCount,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(s(this.props,e,t,i,this._instanceProps))},u.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,i=e.layout;if("number"==typeof n&&null!=this._outerRef){var a=this._outerRef;"horizontal"===t||"horizontal"===i?a.scrollLeft=n:a.scrollTop=n}this._callPropsCallbacks()},u.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,i=this.state,a=i.scrollOffset;if(i.scrollUpdateWasRequested&&null!=this._outerRef){var r=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(it()){case"negative":r.scrollLeft=-a;break;case"positive-ascending":r.scrollLeft=a;break;default:var o=r.clientWidth,l=r.scrollWidth;r.scrollLeft=l-o-a}else r.scrollLeft=a;else r.scrollTop=a}this._callPropsCallbacks()},u.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&tt(this._resetIsScrollingTimeoutId)},u.render=function(){var e=this.props,n=e.children,i=e.className,a=e.direction,r=e.height,l=e.innerRef,s=e.innerElementType,c=e.innerTagName,h=e.itemCount,m=e.itemData,d=e.itemKey,p=void 0===d?at:d,u=e.layout,f=e.outerElementType,v=e.outerTagName,g=e.style,z=e.useIsScrolling,E=e.width,b=this.state.isScrolling,y="horizontal"===a||"horizontal"===u,M=y?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),x=w[0],C=w[1],_=[];if(h>0)for(var H=x;H<=C;H++)_.push(t(n,{data:m,key:p(H,m),index:H,isScrolling:z?b:void 0,style:this._getItemStyle(H)}));var S=o(this.props,this._instanceProps);return t(f||v||"div",{className:i,onScroll:M,ref:this._outerRefSetter,style:Ge({position:"relative",height:r,width:E,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:a},g)},t(s||c||"div",{children:_,ref:l,style:{height:y?"100%":S,pointerEvents:b?"none":void 0,width:y?S:"100%"}}))},u._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],i=e[2],a=e[3];this._callOnItemsRendered(t,n,i,a)}if("function"==typeof this.props.onScroll){var r=this.state,o=r.scrollDirection,l=r.scrollOffset,s=r.scrollUpdateWasRequested;this._callOnScroll(o,l,s)}},u._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,i=this.state,a=i.isScrolling,r=i.scrollDirection,o=i.scrollOffset;if(0===t)return[0,0,0,0];var l=c(this.props,o,this._instanceProps),s=h(this.props,l,o,this._instanceProps),m=a&&"backward"!==r?1:Math.max(1,n),d=a&&"forward"!==r?1:Math.max(1,n);return[Math.max(0,l-m),Math.max(0,Math.min(t-1,s+d)),l,s]},a}(n),i.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},a}"production"!==process.env.NODE_ENV&&"undefined"!=typeof window&&void 0!==window.WeakSet&&(rt=new WeakSet,ot=new WeakSet);var st=function(e,t){var n=e.children,i=e.direction,a=e.height,r=e.layout,o=e.innerTagName,l=e.outerTagName,s=e.width,c=t.instance;if("production"!==process.env.NODE_ENV){null==o&&null==l||ot&&!ot.has(c)&&(ot.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h="horizontal"===i||"horizontal"===r;switch(i){case"horizontal":case"vertical":rt&&!rt.has(c)&&(rt.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". "'+i+'" was specified.')}switch(r){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". "'+r+'" was specified.')}if(null==n)throw Error('An invalid "children" prop has been specified. Value should be a React component. "'+(null===n?"null":typeof n)+'" was specified.');if(h&&"number"!=typeof s)throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. "'+(null===s?"null":typeof s)+'" was specified.');if(!h&&"number"!=typeof a)throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. "'+(null===a?"null":typeof a)+'" was specified.')}},ct=lt({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,i){var a=e.direction,r=e.height,o=e.itemCount,l=e.itemSize,s=e.layout,c=e.width,h="horizontal"===a||"horizontal"===s?c:r,m=Math.max(0,o*l-h),d=Math.min(m,t*l),p=Math.max(0,t*l-h+l);switch("smart"===n&&(n=i>=p-h&&i<=d+h?"auto":"center"),n){case"start":return d;case"end":return p;case"center":var u=Math.round(p+(d-p)/2);return u<Math.ceil(h/2)?0:u>m+Math.floor(h/2)?m:u;case"auto":default:return i>=p&&i<=d?i:i<p?p:d}},getStartIndexForOffset:function(e,t){var n=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/i)))},getStopIndexForStartIndex:function(e,t,n){var i=e.direction,a=e.height,r=e.itemCount,o=e.itemSize,l=e.layout,s=e.width,c=t*o,h="horizontal"===i||"horizontal"===l?s:a,m=Math.ceil((h+n-c)/o);return Math.max(0,Math.min(r-1,t+m-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var t=e.itemSize;if("production"!==process.env.NODE_ENV&&"number"!=typeof t)throw Error('An invalid "itemSize" prop has been specified. Value should be a number. "'+(null===t?"null":typeof t)+'" was specified.')}}),ht=()=>e.createElement("svg",{width:"48px",height:"48px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},e.createElement("rect",{x:"0",y:"0",width:"100",height:"100",fill:"none",className:"bk"}),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(0 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(30 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.08333333333333333s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(60 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.16666666666666666s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(90 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.25s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(120 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.3333333333333333s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(150 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.4166666666666667s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(180 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.5s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(210 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.5833333333333334s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(240 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.6666666666666666s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(270 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.75s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(300 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.8333333333333334s",repeatCount:"indefinite"})),e.createElement("rect",{x:"46.5",y:"38",width:"7",height:"24",rx:"5",ry:"5",fill:"#ffffff",transform:"rotate(330 50 50) translate(0 -30)"},e.createElement("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1s",begin:"0.9166666666666666s",repeatCount:"indefinite"})));"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var mt,dt=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){var n;"undefined"!=typeof self&&self,n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}({18:function(e,t){}})},e.exports=n()}));(mt=dt)&&mt.__esModule&&Object.prototype.hasOwnProperty.call(mt,"default")&&mt.default;let pt=class extends e.Component{constructor(t){super(t),this.containerRef=e.createRef(),this.thumbnail=null,this.thumbnailRequests=new Y,this.onDragStart=e=>{e.dataTransfer&&(e.dataTransfer.setData("x-3deye/event",""+this.props.data.id),e.dataTransfer.dropEffect="move")},this.onClick=()=>{this.props.onClick(this.props.data)},this.thumbnailSubscription=this.thumbnailRequests.pipe(ae(e=>e?this.context.thumbnails.fetchThumbnail(e[0],e[1],e[2]):Z())).subscribe(e=>{this.thumbnail=e||null})}get camerasStore(){return this.context.cameras}get eventSchema(){return this.context.eventSchema}componentDidMount(){this.containerRef.current.addEventListener("dragstart",this.onDragStart);const{cameraId:e,startTime:t,thumbnailUrl:n}=this.props.data;n||this.thumbnailRequests.next([e,t,t])}componentWillReceiveProps(e){if(e.data.id===this.props.data.id)return;const{cameraId:t,startTime:n,thumbnailUrl:i}=e.data;i?this.thumbnailRequests.next(null):(this.thumbnail=null,this.thumbnailRequests.next([t,n,n]))}componentWillUnmount(){this.thumbnailRequests.unsubscribe(),this.thumbnailSubscription.unsubscribe(),this.containerRef.current.removeEventListener("dragstart",this.onDragStart)}render(){var t,n;const{camerasStore:a,eventSchema:r}=this,o=this.props,{data:s,hideCameraName:c,onClick:h,className:m="",initRipple:d,unbounded:p}=o,u=l(o,["data","hideCameraName","onClick","className","initRipple","unbounded"]);if(!s)return null;let f=null;s.foundObjects.length&&(f=s.foundObjects.filter(({Type:e})=>r.foundObjectTypes.includes(e)).map(({Type:t,Box:{Top:n,Left:i,Right:a,Bottom:o},Probability:l},s)=>e.createElement("div",{key:s,style:{position:"absolute",top:100*n+"%",left:100*i+"%",bottom:100*(1-o)+"%",right:100*(1-a)+"%",outline:`2px solid ${r.colorsByFoundObjectType.get(t)}`}},e.createElement("div",{style:{color:r.colorsByFoundObjectType.get(t),backgroundColor:"rgba(0, 0, 0, 0.8)",position:"absolute",top:-12,left:-2,fontSize:10,fontFamily:"monospace"},title:`${t}&nbsp;${Math.floor(100*l)}%`},t," ",Math.floor(100*l),"%"))));let v="",g=!1;if(s.thumbnailUrl?v=s.thumbnailUrl:null===this.thumbnail&&a.loaded?(v=(null===(t=a.camerasById.get(s.cameraId))||void 0===t?void 0:t.imageUrl)||"",g=!0):this.thumbnail&&(v=this.thumbnail.url),s.faces){const{Width:t,Height:n}=JSON.parse(this.props.data.raw.data).ThumbnailSize;f||(f=[]);const a=100,r=f.length;f=f.concat(s.faces.map(({Name:o,Box:{Top:l,Left:s,Right:c,Bottom:h},Probability:m},d)=>{const p=a/t/(c-s),u={top:2},f={};return s>=1-c?(u.left=2,f.right=-2):(u.right=2,f.left=-2),l>=1-h?f.bottom="calc(100% + 1px)":f.top="calc(100% + 1px)",e.createElement(i,{key:r+d},e.createElement("div",{className:"event-list-item-face-trigger",style:{position:"absolute",top:100*l+"%",left:100*s+"%",bottom:100*(1-h)+"%",right:100*(1-c)+"%",outline:"1px solid orange"}},e.createElement("div",{style:Object.assign({color:"orange",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"absolute",fontSize:10,fontFamily:"monospace"},f),title:`${o} ${Math.floor(100*m)}%`},o," ",Math.floor(100*m),"%")),e.createElement("div",{className:"event-list-item-face",style:Object.assign({overflow:"hidden",width:t*(c-s)*p,height:n*(h-l)*p},u)},e.createElement("img",{style:{width:t*p,height:n*p,transform:`translate(-${100*s}%, -${100*l}%)`},src:v}),e.createElement("div",{className:"frame"},e.createElement("div",{className:"corner-highlight-tl"}),e.createElement("div",{className:"corner-highlight-tr"}),e.createElement("div",{className:"corner-highlight-br"}),e.createElement("div",{className:"corner-highlight-bl"}))))}))}const z=a.loaded&&(null===(n=a.camerasById.get(s.cameraId))||void 0===n?void 0:n.name)||"...",E=`event-list-item ${m} mdc-ripple-surface mdc-ripple-surface--primary`;return e.createElement("div",Object.assign({ref:le(d,this.containerRef),className:E,onClick:this.onClick,draggable:!0},u),v&&e.createElement("img",{key:v,style:{position:"absolute",width:"100%",height:"100%",top:0,left:0},src:v}),g?e.createElement("div",{className:"no-preview-overlay"}):null,f,e.createElement("div",{className:"event-list-item-caption"},c?null:e.createElement("div",{title:z,style:{fontWeight:"bold",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textShadow:"0 1px 2px black"}},z),e.createElement("div",null,function(e,t){let n="",i="";return W(e,new Date)?$(e,new Date)?n=i="HH:mm":$(e,t)?(n="EEE d MMM HH:mm",i="HH:mm"):n=i="EEE d MMM HH:mm":W(e,t)?(n="yyyy d MMM HH:mm",i="d MMM HH:mm"):n=i="yyyy d MMM HH:mm",(e.getSeconds()||t.getSeconds())&&(n+=":ss",i+=":ss"),+e==+t?`${ye(e,n)}`:`${ye(e,n)} - ${ye(t,i)}`}(s.startTime,s.endTime)),+s.endTime-+s.startTime>0&&e.createElement("div",{className:"event-list-item-duration"},function(e){if((e=Math.round(e/1e3))<60)return`${e}s`;const t=e%60;let n=(e-t)/60;if(n<60)return t?`${n}m ${t}s`:`${n}m`;const i=Math.floor(n/60);return n-=60*i,t||n?!t&&n?`${i}h ${n}m`:`${i}h ${n}m ${t}s`:`${i}h`}(+s.endTime-+s.startTime))))}};pt.contextType=se,r([c],pt.prototype,"thumbnail",void 0),pt=r([d],pt);var ut=oe(pt);let ft=class extends e.Component{constructor(){super(...arguments),this.disposables=[],this.listRef=e.createRef(),this.updates=-1,this.scrolls=new Y,this.lastScrollEventTimestamp=0,this.rowRenderer=({index:t,style:n})=>e.createElement("div",{style:n},e.createElement(ut,{data:this.eventListStore.data[t],onClick:this.props.onItemClick})),this.onScroll=({scrollOffset:e})=>{this.scrollTop=e,this.lastScrollEventTimestamp=Date.now(),this.scrolls.next(e),this.eventListStore.paused=!!this.scrollTop}}get eventListStore(){return"eventList"in this.context?this.context.eventList:null}componentDidMount(){const e=this.eventListStore;this.disposables.push(this.scrolls.pipe(re(200)).subscribe(t=>{if(!e.pendingData.length)return;const n=Math.floor(t/this.getRowHeightByWidth(this.width)),i=e.data[n].startTime;this.updates=e.pendingData.filter(e=>e.startTime>i).length,e.flushUpdates()})),p(this,s(()=>e.pendingData,t=>{if(!t.length)return;if(Date.now()-this.lastScrollEventTimestamp<200)return;const n=Math.floor(this.scrollTop/this.getRowHeightByWidth(this.width)),i=e.data[n].startTime;this.updates=t.filter(e=>e.startTime>i).length,e.flushUpdates()}))}componentWillUnmount(){this.disposables.forEach(e=>{e instanceof X?e.closed||e.unsubscribe():e()})}componentDidUpdate(){0!==this.scrollTop&&this.listRef.current&&(this.updates>0?(this.listRef.current.scrollTo(this.scrollTop+this.updates*this.getRowHeightByWidth(this.width)),this.updates=-1):this.updates&&this.listRef.current.scrollTo(0))}getRowHeightByWidth(e){return e/16*9+2}render(){const{data:t,loading:n}=this.eventListStore;return n?e.createElement("div",{className:"preloader-container"},e.createElement(ht,null)):e.createElement(Ke,null,({width:n,height:i})=>(this.width=n,e.createElement(ct,{ref:this.listRef,width:n,height:i,itemCount:t.length,itemSize:this.getRowHeightByWidth(n),onScroll:this.onScroll},this.rowRenderer)))}};ft.contextType=se,ft=r([d],ft);var vt=ft,gt=t=>{const{children:n,innerProps:i}=t,a=l(t,["children","innerProps"]),{Option:r}=g,{data:o}=t;if(!o.isEventType)return e.createElement(r,Object.assign({},t));const s=Object.assign(Object.assign({},i),{style:{display:"inline-flex",alignItems:"center",width:"auto"}});return e.createElement(r,Object.assign({innerProps:s},a),e.createElement(Re,{name:"label",size:16,color:"currentColor"}),n)},zt=t=>{const{children:n,innerProps:i}=t,a=l(t,["children","innerProps"]),{MultiValueLabel:r}=g,{data:o}=t,s=Object.assign(Object.assign({},i),{style:{display:"flex",alignItems:"center"}});return e.createElement(r,Object.assign({innerProps:s},a),e.createElement(Re,{name:o.isEventType?"label":"camera",size:16,color:"currentColor"}),n)};let Et=class extends e.Component{constructor(){super(...arguments),this.value=[],this.onSelectChange=e=>{this.eventListStore.setFilters(e)},this.onFromChange=e=>{this.eventListStore.from=e},this.onToChange=e=>{this.eventListStore.to=e},this.clearTo=()=>{this.eventListStore.to=null},this.closeDatepickerTo=()=>{this.datepickerToOpened=!1},this.closeDatepickerFrom=()=>{this.datepickerFromOpened=!1},this.toggleDatepickerTo=()=>{this.datepickerToOpened=!this.datepickerToOpened},this.toggleDatepickerFrom=()=>{this.datepickerFromOpened=!this.datepickerFromOpened}}get camerasStore(){return"cameras"in this.context?this.context.cameras:null}get eventSchema(){return"eventSchema"in this.context?this.context.eventSchema:null}get eventListStore(){return"eventList"in this.context?this.context.eventList:null}get options(){const{camerasStore:e,eventSchema:t,eventListStore:n}=this,i=n.onlyFaces?[]:t.foundObjectTypesForSelect;return e.loaded?[].concat(i,e.data.slice()):i}render(){const{eventListStore:t}=this,{filters:n,from:i,to:a,onlyFaces:r}=t,{onEventClick:o}=this.props,l=e.createElement(we,{className:"date-button",style:{flex:1,textAlign:"left"},onClick:this.toggleDatepickerFrom},i?ye(i,"MMM d, HH:mm"):""),s=a?e.createElement("div",{style:{flex:1,display:"flex"}},e.createElement(we,{className:"date-button",style:{flex:1,textAlign:"right"},onClick:this.toggleDatepickerTo},ye(a,"MMM d, HH:mm")),e.createElement(we,{onClick:this.clearTo},e.createElement(Re,{name:"close",size:16}))):e.createElement("div",{style:{flex:1,display:"flex"}},e.createElement(we,{className:"date-button",style:{flex:1,textAlign:"right"},onClick:this.toggleDatepickerTo},"now"));return e.createElement(e.Fragment,null,e.createElement("div",{style:{color:"black",zIndex:3}},e.createElement(v,{closeMenuOnSelect:!1,isMulti:!0,onChange:this.onSelectChange,getOptionLabel:e=>e.name,getOptionValue:e=>e.id,options:this.options,placeholder:Ee.t("search"),value:n,components:{MultiValueLabel:zt,Option:gt},styles:Object.assign(Object.assign({},Ue),{multiValue:(e,{data:t})=>t.color?Object.assign(Object.assign({},e),{backgroundColor:t.color,color:"white"}):e,multiValueLabel:(e,{data:t})=>t.color?Object.assign(Object.assign({},e),{color:"white"}):e,multiValueRemove:(e,{data:t})=>t.color?Object.assign(Object.assign({},e),{color:"white"}):e,option:(e,{data:t})=>t.color?Object.assign(Object.assign({},e),{color:t.color}):e})})),e.createElement("div",{className:"events-panel-datepicker"},e.createElement("div",{style:{position:"relative"}},e.createElement(Pe,{target:l,opened:this.datepickerFromOpened,onCloseRequest:this.closeDatepickerFrom,disableAnimation:!0,className:"popover-datepicker"},e.createElement(u,{selected:i,onChange:this.onFromChange,showTimeSelect:!0,dateFormat:"MMM d, HH:mm",timeFormat:"HH:mm",inline:!0}),e.createElement(we,{onClick:this.closeDatepickerFrom,className:"button-save"},"Ok"))),e.createElement("div",{style:{position:"relative"}},e.createElement(Pe,{target:s,opened:this.datepickerToOpened,onCloseRequest:this.closeDatepickerTo,disableAnimation:!0,className:"popover-datepicker"},e.createElement(u,{selected:a||new Date,onChange:this.onToChange,showTimeSelect:!0,dateFormat:"MMM d, HH:mm",timeFormat:"HH:mm",inline:!0}),e.createElement(we,{onClick:this.closeDatepickerTo,className:"button-save"},"Ok")))),(t.someAnalyticsFilterSelected||t.onlyFaces)&&e.createElement($e,{getter:r?t.getFacesProbabilityTreshold:t.getProbabilityTreshold,setter:r?t.setFacesProbabilityTreshold:t.setProbabilityTreshold}),!r&&t.someAnalyticsFilterSelected?e.createElement(Fe,{value:t.colors,toggle:t.toggleColor,clear:t.clearColors}):null,e.createElement("div",{style:{display:"flex",flex:1}},e.createElement(vt,{onItemClick:o})),e.createElement(xe,null,e.createElement(we,{className:r?"button-unselected":"button-selected",onClick:t.toggleFaces},"ALL ",t.totalCount?e.createElement("sup",null,t.totalCount):null),e.createElement(we,{className:r?"button-selected":"button-unselected",onClick:t.toggleFaces},"Faces ",t.facesCount?e.createElement("sup",null,t.facesCount):null)))}};Et.contextType=se,r([c],Et.prototype,"datepickerToOpened",void 0),r([c],Et.prototype,"datepickerFromOpened",void 0),r([c.ref],Et.prototype,"value",void 0),r([c],Et.prototype,"from",void 0),r([m],Et.prototype,"options",null),r([h],Et.prototype,"onFromChange",void 0),r([h],Et.prototype,"onToChange",void 0),r([h],Et.prototype,"clearTo",void 0),r([h],Et.prototype,"closeDatepickerTo",void 0),r([h],Et.prototype,"closeDatepickerFrom",void 0),r([h],Et.prototype,"toggleDatepickerTo",void 0),r([h],Et.prototype,"toggleDatepickerFrom",void 0),Et=r([d],Et);var bt=Et;class yt extends e.PureComponent{render(){return e.createElement(se.Provider,{value:a},e.createElement(bt,{onEventClick:this.props.onEventClick}))}}export default yt;