|
|
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=83)}([function(t,e,n){(function(e){var n="object",r=function(t){return t&&t.Math==Math&&t};t.exports=r(typeof globalThis==n&&globalThis)||r(typeof window==n&&window)||r(typeof self==n&&self)||r(typeof e==n&&e)||Function("return this")()}).call(this,n(34))},function(t,e,n){var r=n(0),o=n(27),i=n(50),s=n(89),a=r.Symbol,c=o("wks");t.exports=function(t){return c[t]||(c[t]=s&&a[t]||(s?a:i)("Symbol."+t))}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(10);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){"use strict";var r=n(26),o=n(100),i=n(22),s=n(16),a=n(66),c=s.set,u=s.getterFor("Array Iterator");t.exports=a(Array,"Array",function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})},function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){"use strict";var r=n(72),o=n(117),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function a(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(0),o=n(104),i=n(4),s=n(11),a=n(1),c=a("iterator"),u=a("toStringTag"),l=i.values;for(var p in o){var f=r[p],h=f&&f.prototype;if(h){if(h[c]!==l)try{s(h,c,l)}catch(t){h[c]=l}if(h[u]||s(h,u,p),o[p])for(var d in i)if(h[d]!==i[d])try{s(h,d,i[d])}catch(t){h[d]=i[d]}}}},function(t,e,n){"use strict";var r,o,i,s=n(12),a=n(19),c=n(0),u=n(52),l=n(56),p=n(20),f=n(90),h=n(10),d=n(21),b=n(42),g=n(14),m=n(91),v=n(93),w=n(94),y=n(59).set,x=n(95),O=n(96),j=n(97),k=n(62),S=n(98),E=n(61),A=n(16),T=n(55),I=n(1)("species"),P="Promise",C=A.get,F=A.set,_=A.getterFor(P),N=c.Promise,M=c.TypeError,R=c.document,$=c.process,D=c.fetch,L=$&&$.versions,B=L&&L.v8||"",z=k.f,U=z,W="process"==g($),G=!!(R&&R.createEvent&&c.dispatchEvent),q=T(P,function(){var t=N.resolve(1),e=function(){},n=(t.constructor={})[I]=function(t){t(e,e)};return!((W||"function"==typeof PromiseRejectionEvent)&&(!a||t.finally)&&t.then(e)instanceof n&&0!==B.indexOf("6.6")&&-1===E.indexOf("Chrome/66"))}),J=q||!v(function(t){N.all(t).catch(function(){})}),V=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},X=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;x(function(){for(var o=e.value,i=1==e.state,s=0;r.length>s;){var a,c,u,l=r[s++],p=i?l.ok:l.fail,f=l.resolve,h=l.reject,d=l.domain;try{p?(i||(2===e.rejection&&Y(t,e),e.rejection=1),!0===p?a=o:(d&&d.enter(),a=p(o),d&&(d.exit(),u=!0)),a===l.promise?h(M("Promise-chain cycle")):(c=V(a))?c.call(a,f,h):f(a)):h(o)}catch(t){d&&!u&&d.exit(),h(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&K(t,e)})}},H=function(t,e,n){var r,o;G?((r=R.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},(o=c["on"+t])?o(r):"unhandledrejection"===t&&j("Unhandled promise rejection",n)},K=function(t,e){y.call(c,function(){var n,r=e.value;if(Z(e)&&(n=S(function(){W?$.emit("unhandledRejection",r,t):H("unhandledrejection",t,r)}),e.rejection=W||Z(e)?2:1,n.error))throw n.value})},Z=function(t){return 1!==t.rejection&&!t.parent},Y=function(t,e){y.call(c,function(){W?$.emit("rejectionHandled",t):H("rejectionhandled",t,e.value)})},Q=function(t,e,n,r){return function(o){t(e,n,o,r)}},tt=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,X(t,e,!0))},et=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw M("Promise can't be resolved itself");var o=V(n);o?x(function(){var r={done:!1};try{o.call(n,Q(et,t,r,e),Q(tt,t,r,e))}catch(n){tt(t,r,n,e)}}):(e.value=n,e.state=1,X(t,e,!1))}catch(n){tt(t,{done:!1},n,e)}}};q&&(N=function(t){b(this,N,P),d(t),r.call(this);var e=C(this);try{t(Q(et,this,e),Q(tt,this,e))}catch(t){tt(this,e,t)}},(r=function(t){F(this,{type:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=l(N.prototype,{then:function(t,e){var n=_(this),r=z(w(this,N));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=W?$.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=C(t);this.promise=t,this.resolve=Q(et,t,e),this.reject=Q(tt,t,e)},k.f=z=function(t){return t===N||t===i?new o(t):U(t)},a||"function"!=typeof D||s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return O(N,D.apply(c,arguments))}})),s({global:!0,wrap:!0,forced:q},{Promise:N}),p(N,P,!1,!0),f(P),i=u.Promise,s({target:P,stat:!0,forced:q},{reject:function(t){var e=z(this);return e.reject.call(void 0,t),e.promise}}),s({target:P,stat:!0,forced:a||q},{resolve:function(t){return O(a&&this===i?N:this,t)}}),s({target:P,stat:!0,forced:J},{all:function(t){var e=this,n=z(e),r=n.resolve,o=n.reject,i=S(function(){var n=d(e.resolve),i=[],s=0,a=1;m(t,function(t){var c=s++,u=!1;i.push(void 0),a++,n.call(e,t).then(function(t){u||(u=!0,i[c]=t,--a||r(i))},o)}),--a||r(i)});return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=z(e),r=n.reject,o=S(function(){var o=d(e.resolve);m(t,function(t){o.call(e,t).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(2);t.exports=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(9),o=n(13),i=n(25);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(35).f,i=n(11),s=n(15),a=n(38),c=n(51),u=n(55);t.exports=function(t,e){var n,l,p,f,h,d=t.target,b=t.global,g=t.stat;if(n=b?r:g?r[d]||a(d,{}):(r[d]||{}).prototype)for(l in e){if(f=e[l],p=t.noTargetGet?(h=o(n,l))&&h.value:n[l],!u(b?l:d+(g?".":"#")+l,t.forced)&&void 0!==p){if(typeof f==typeof p)continue;c(f,p)}(t.sham||p&&p.sham)&&i(f,"sham",!0),s(n,l,f,t)}}},function(t,e,n){var r=n(9),o=n(48),i=n(3),s=n(36),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(i(t),e=s(e,!0),i(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(0),o=n(27),i=n(11),s=n(6),a=n(38),c=n(49),u=n(16),l=u.get,p=u.enforce,f=String(c).split("toString");o("inspectSource",function(t){return c.call(t)}),(t.exports=function(t,e,n,o){var c=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||s(n,"name")||i(n,"name",e),p(n).source=f.join("string"==typeof e?e:"")),t!==r?(c?!l&&t[e]&&(u=!0):delete t[e],u?t[e]=n:i(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&l(this).source||c.call(this)})},function(t,e,n){var r,o,i,s=n(84),a=n(0),c=n(10),u=n(11),l=n(6),p=n(39),f=n(40),h=a.WeakMap;if(s){var d=new h,b=d.get,g=d.has,m=d.set;r=function(t,e){return m.call(d,t,e),e},o=function(t){return b.call(d,t)||{}},i=function(t){return g.call(d,t)}}else{var v=p("state");f[v]=!0,r=function(t,e){return u(t,v,e),e},o=function(t){return l(t,v)?t[v]:{}},i=function(t){return l(t,v)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){n(4),n(8),n(109),n(7),(()=>{const e=new class{constructor(){const t=n(114),e=n(115);function r(t){e.defaults.headers.delete["X-CSRFToken"]=t,e.defaults.headers.patch["X-CSRFToken"]=t,e.defaults.headers.post["X-CSRFToken"]=t,e.defaults.headers.put["X-CSRFToken"]=t,e.defaults.withCredentials=!0}async function o(t=""){const{backendAPI:n}=window.cvat.config;let r=null;try{r=await e.get(`${n}/tasks?${t}`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not get tasks from a server",e)}return r.data.results.count=r.data.count,r.data.results}async function i(t){const{backendAPI:n}=window.cvat.config;try{await e.delete(`${n}/tasks/${t}`)}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not delete the task from the server",e)}}const s=t.get("csrftoken");s&&r(s),Object.defineProperties(this,Object.freeze({server:{value:Object.freeze({about:async function(){const{backendAPI:t}=window.cvat.config;let n=null;try{n=await e.get(`${t}/server/about`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError('Could not get "about" information from the server',e)}return n.data},share:async function(t){const{backendAPI:n}=window.cvat.config;t=encodeURIComponent(t);let r=null;try{r=await e.get(`${n}/server/share?directory=${t}`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError('Could not get "share" information from the server',e)}return r.data},exception:async function(t){const{backendAPI:n}=window.cvat.config;try{await e.post(`${n}/server/exception`,JSON.stringify(t),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not send an exception to the server",e)}},login:async function(n,o){function i(n){if(n.headers["set-cookie"]){let o="";for(let e of n.headers["set-cookie"]){[e]=e.split(";");const n=e.split("=")[0],i=e.split("=")[1];"csrftoken"===n&&r(i),t.set(n,i),o+=`${e};`}e.defaults.headers.common.Cookie=o}else{let e=n.data.csrf;if(e)r(e),t.set("csrftoken",e);else{if(!(e=t.get("csrftoken")))throw new window.cvat.exceptions.ScriptingError("An environment has been detected as a browser, but CSRF token has not been found in cookies");r(e)}}}const s=window.cvat.config.backendAPI.slice(0,-7);let a=null;try{a=await e.get(`${s}/auth/csrf`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not get CSRF token from a server",e)}i(a);const c=[`${encodeURIComponent("username")}=${encodeURIComponent(n)}`,`${encodeURIComponent("password")}=${encodeURIComponent(o)}`].join("&").replace(/%20/g,"+");let u=null;try{u=await e.post(`${s}/auth/login`,c,{"Content-Type":"application/x-www-form-urlencoded",proxy:window.cvat.config.proxy,maxRedirects:0})}catch(t){if(302!==t.response.status){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not login on a server",e)}u=t.response}if(u.data.includes("didn't match"))throw new window.cvat.exceptions.ServerError("The pair login/password is invalid",403);i(u)},logout:async function(){const t=window.cvat.config.backendAPI.slice(0,-7);try{await e.get(`${t}/auth/logout`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not logout from the server",e)}}}),writable:!1},tasks:{value:Object.freeze({getTasks:o,saveTask:async function(t,n){const{backendAPI:r}=window.cvat.config;try{await e.patch(`${r}/tasks/${t}`,JSON.stringify(n),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not save the task on the server",e)}},createTask:async function(t,n,r){const{backendAPI:s}=window.cvat.config,a=new window.FormData;for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t))for(let e=0;e<n[t].length;e++)a.append(`${t}[${e}]`,n[t][e]);let c=null;r("The task is being created on the server..");try{c=await e.post(`${s}/tasks`,JSON.stringify(t),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not put task to the server",e)}r("The data is being uploaded to the server..");try{await e.post(`${s}/tasks/${c.data.id}/data`,a,{proxy:window.cvat.config.proxy})}catch(t){await i(c.data.id);const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not put data to the server",e)}try{await async function(t){return new Promise((n,o)=>{setTimeout(async function i(){try{const a=await e.get(`${s}/tasks/${t}/status`);["Queued","Started"].includes(a.data.state)?(""!==a.data.message&&r(a.data.message),setTimeout(i,1e3)):"Finished"===a.data.state?n():"Failed"===a.data.state?o(new window.cvat.exceptions.ServerError("Could not create the task on the server",400)):o(new window.cvat.exceptions.ServerError(`Unknown task state has been recieved: ${a.data.state}`,500))}catch(t){const e=t.response?t.response.status:t.code;o(new window.cvat.exceptions.ServerError("Data uploading error occured",e))}},1e3)})}(c.data.id)}catch(t){throw await i(c.data.id),t}return(await o(`?id=${c.id}`))[0]},deleteTask:i}),writable:!1},jobs:{value:Object.freeze({getJob:async function(t){const{backendAPI:n}=window.cvat.config;let r=null;try{r=await e.get(`${n}/jobs/${t}`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not get jobs from a server",e)}return r.data},saveJob:async function(t,n){const{backendAPI:r}=window.cvat.config;try{await e.patch(`${r}/jobs/${t}`,JSON.stringify(n),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not save the job on the server",e)}}}),writable:!1},users:{value:Object.freeze({getUsers:async function(){const{backendAPI:t}=window.cvat.config;let n=null;try{n=await e.get(`${t}/users`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not get users from the server",e)}return n.data.results},getSelf:async function(){const{backendAPI:t}=window.cvat.config;let n=null;try{n=await e.get(`${t}/users/self`,{proxy:window.cvat.config.proxy})}catch(t){const e=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError("Could not get users from the server",e)}return n.data}}),writable:!1},frames:{value:Object.freeze({getData:async function(t,n){const{backendAPI:r}=window.cvat.config;let o=null;try{o=await e.get(`${r}/tasks/${t}/frames/${n}`,{proxy:window.cvat.config.proxy,responseType:"blob"})}catch(e){const r=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError(`Could not get frame ${n} for the task ${t} from the server`,r)}return o.data},getMeta:async function(t){const{backendAPI:n}=window.cvat.config;let r=null;try{r=await e.get(`${n}/tasks/${t}/frames/meta`,{proxy:window.cvat.config.proxy})}catch(e){const n=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError(`Could not get frame meta info for the task ${t} from the server`,n)}return r.data}}),writable:!1},annotations:{value:Object.freeze({updateAnnotations:async function(t,n,r,o){const{backendAPI:i}=window.cvat.config;let s=null,a=null;"PUT"===o.toUpperCase()?(s=e.put.bind(e),a=`${i}/${t}s/${n}/annotations`):(s=e.patch.bind(e),a=`${i}/${t}s/${n}/annotations?action=${o}`);let c=null;try{c=await s(a,JSON.stringify(r),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(e){const r=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError(`Could not updated annotations for the ${t} ${n} on the server`,r)}return c.data},getAnnotations:async function(t,n){const{backendAPI:r}=window.cvat.config;let o=null;try{o=await e.get(`${r}/${t}s/${n}/annotations`,{proxy:window.cvat.config.proxy})}catch(e){const r=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError(`Could not get annotations for the ${t} ${n} from the server`,r)}return o.data},dumpAnnotations:async function(t,n,r){const{backendAPI:o}=window.cvat.config,i=n.replace(/\//g,"_");let s=`${o}/tasks/${t}/annotations/${i}?dump_format=${r}`;return new Promise((n,r)=>{setTimeout(async function o(){try{202===(await e.get(`${s}`,{proxy:window.cvat.config.proxy})).status?setTimeout(o,3e3):n(s=`${s}&action=download`)}catch(e){const n=e.response?e.response.status:e.code,o=new window.cvat.exceptions.ServerError(`Could not dump annotations for the task ${t} from the server`,n);r(o)}})})},uploadAnnotations:async function(t,n,r,o){const{backendAPI:i}=window.cvat.config;let s=new FormData;return s.append("annotation_file",r),new Promise((r,a)=>{setTimeout(async function c(){try{202===(await e.post(`${i}/${t}s/${n}/annotations?upload_format=${o}`,s,{proxy:window.cvat.config.proxy})).status?(s=new FormData,setTimeout(c,3e3)):r()}catch(e){const r=e.response?e.response.status:e.code,o=new window.cvat.exceptions.ServerError(`Could not upload annotations for the ${t} ${n}`,r);a(o)}})})}}),writable:!1}}))}};t.exports=e})()},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!1},function(t,e,n){var r=n(13).f,o=n(6),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e){t.exports={}},function(t,e,n){n(99),n(4),n(8),n(7),(()=>{const{PluginError:e}=n(70),r=[];t.exports=class{static async apiWrapper(t,...n){const r=await window.cvat.plugins.list.implementation();for(const o of r){const r=o.functions.filter(e=>e.callback===t)[0];if(r&&r.enter)try{await r.enter.call(this,o,...n)}catch(t){throw t instanceof e?t:new e(`Exception in plugin ${o.name}: ${t.toString()}`)}}let o=await t.implementation.call(this,...n);for(const i of r){const r=i.functions.filter(e=>e.callback===t)[0];if(r&&r.leave)try{o=await r.leave.call(this,i,o,...n)}catch(t){throw t instanceof e?t:new e(`Exception in plugin ${i.name}: ${t.toString()}`)}}return o}static async register(t){const n=[];if("object"!=typeof t)throw new e(`Plugin should be an object, but got "${typeof t}"`);if(!("name"in t)||"string"!=typeof t.name)throw new e('Plugin must contain a "name" field and it must be a string');if(!("description"in t)||"string"!=typeof t.description)throw new e('Plugin must contain a "description" field and it must be a string');if("functions"in t)throw new e('Plugin must not contain a "functions" field');!function t(e,r){const o={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]?Object.prototype.hasOwnProperty.call(r,n)&&t(e[n],r[n]):["enter","leave"].includes(n)&&"function"==typeof r&&(e[n],1)&&(o.callback=r,o[n]=e[n]));Object.keys(o).length&&n.push(o)}(t,{cvat:window.cvat}),Object.defineProperty(t,"functions",{value:n,writable:!1}),r.push(t)}static async list(){return r}}})()},function(t,e,n){var r=n(18);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(47),o=n(18);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(0),o=n(38),i=n(19),s=r["__core-js_shared__"]||o("__core-js_shared__",{});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.1.3",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(52),o=n(0),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r=n(30),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(92),o=n(22),i=n(1)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e){(()=>{t.exports={isBoolean:function(t){return"boolean"==typeof t},isInteger:function(t){return"number"==typeof t&&Number.isInteger(t)},isEnum:function(t){for(const e in this)if(Object.prototype.hasOwnProperty.call(this,e)&&this[e]===t)return!0;return!1},isString:function(t){return"string"==typeof t},checkFilter:function(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(!(n in e))throw new window.cvat.exceptions.ArgumentError(`Unsupported filter property has been recieved: "${n}"`);if(!e[n](t[n]))throw new window.cvat.exceptions.ArgumentError(`Received filter property "${n}" is not satisfied for checker`)}},checkObjectType:function(t,e,n,r){if(n){if(typeof e!==n){if("integer"===n&&Number.isInteger(e))return;throw new window.cvat.exceptions.ArgumentError(`"${t}" is expected to be "${n}", but "${typeof e}" has been got.`)}}else if(r&&!(e instanceof r)){if(void 0!==e)throw new window.cvat.exceptions.ArgumentError(`"${t}" is expected to be ${r.name}, but `+`"${e.constructor.name}" has been got`);throw new window.cvat.exceptions.ArgumentError(`"${t}" is expected to be ${r.name}, but "undefined" has been got.`)}}}})()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(9),o=n(46),i=n(25),s=n(26),a=n(36),c=n(6),u=n(48),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=a(e,!0),u)try{return l(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var r=n(10);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(0),o=n(10),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,n){var r=n(0),o=n(11);t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(27),o=n(50),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){var r=n(30),o=n(18),i=function(t){return function(e,n){var i,s,a=String(o(e)),c=r(n),u=a.length;return c<0||c>=u?t?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):i:t?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,e,n){"use strict";(function(e){var r=n(5),o=n(120),i={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,c={adapter:("undefined"!=typeof XMLHttpRequest?a=n(73):void 0!==e&&(a=n(73)),a),transformRequest:[function(t,e){return o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(i)}),t.exports=c}).call(this,n(119))},function(t,e,n){"use strict";n(12)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(2),o=n(14),i="".split;t.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,e,n){var r=n(9),o=n(2),i=n(37);t.exports=!r&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(27);t.exports=r("native-function-to-string",Function.toString)},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(6),o=n(85),i=n(35),s=n(13);t.exports=function(t,e){for(var n=o(e),a=s.f,c=i.f,u=0;u<n.length;u++){var l=n[u];r(t,l)||a(t,l,c(e,l))}}},function(t,e,n){t.exports=n(0)},function(t,e,n){var r=n(6),o=n(26),i=n(87).indexOf,s=n(40);t.exports=function(t,e){var n,a=o(t),c=0,u=[];for(n in a)!r(s,n)&&r(a,n)&&u.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(2),o=/#|\.prototype\./,i=function(t,e){var n=a[s(t)];return n==u||n!=c&&("function"==typeof e?r(e):!!e)},s=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},function(t,e,n){var r=n(15);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){var r=n(1),o=n(22),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},function(t,e,n){var r=n(3);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r,o,i,s=n(0),a=n(2),c=n(14),u=n(31),l=n(60),p=n(37),f=s.location,h=s.setImmediate,d=s.clearImmediate,b=s.process,g=s.MessageChannel,m=s.Dispatch,v=0,w={},y=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},x=function(t){return function(){y(t)}},O=function(t){y(t.data)},j=function(t){s.postMessage(t+"",f.protocol+"//"+f.host)};h&&d||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return w[++v]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(v),v},d=function(t){delete w[t]},"process"==c(b)?r=function(t){b.nextTick(x(t))}:m&&m.now?r=function(t){m.now(x(t))}:g?(i=(o=new g).port2,o.port1.onmessage=O,r=u(i.postMessage,i,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(j)?r="onreadystatechange"in p("script")?function(t){l.appendChild(p("script")).onreadystatechange=function(){l.removeChild(this),y(t)}}:function(t){setTimeout(x(t),0)}:(r=j,s.addEventListener("message",O,!1))),t.exports={set:h,clear:d}},function(t,e,n){var r=n(28);t.exports=r("document","documentElement")},function(t,e,n){var r=n(28);t.exports=r("navigator","userAgent")||""},function(t,e,n){"use strict";var r=n(21),o=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(3),o=n(64),i=n(41),s=n(40),a=n(60),c=n(37),u=n(39)("IE_PROTO"),l=function(){},p=function(){var t,e=c("iframe"),n=i.length;for(e.style.display="none",a.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),p=t.F;n--;)delete p.prototype[i[n]];return p()};t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=r(t),n=new l,l.prototype=null,n[u]=t):n=p(),void 0===e?n:o(n,e)},s[u]=!0},function(t,e,n){var r=n(9),o=n(13),i=n(3),s=n(65);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=s(e),a=r.length,c=0;a>c;)o.f(t,n=r[c++],e[n]);return t}},function(t,e,n){var r=n(53),o=n(41);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(12),o=n(67),i=n(69),s=n(102),a=n(20),c=n(11),u=n(15),l=n(1),p=n(19),f=n(22),h=n(68),d=h.IteratorPrototype,b=h.BUGGY_SAFARI_ITERATORS,g=l("iterator"),m=function(){return this};t.exports=function(t,e,n,l,h,v,w){o(n,e,l);var y,x,O,j=function(t){if(t===h&&T)return T;if(!b&&t in E)return E[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},k=e+" Iterator",S=!1,E=t.prototype,A=E[g]||E["@@iterator"]||h&&E[h],T=!b&&A||j(h),I="Array"==e&&E.entries||A;if(I&&(y=i(I.call(new t)),d!==Object.prototype&&y.next&&(p||i(y)===d||(s?s(y,d):"function"!=typeof y[g]&&c(y,g,m)),a(y,k,!0,!0),p&&(f[k]=m))),"values"==h&&A&&"values"!==A.name&&(S=!0,T=function(){return A.call(this)}),p&&!w||E[g]===T||c(E,g,T),f[e]=T,h)if(x={values:j("values"),keys:v?T:j("keys"),entries:j("entries")},w)for(O in x)!b&&!S&&O in E||u(E,O,x[O]);else r({target:e,proto:!0,forced:b||S},x);return x}},function(t,e,n){"use strict";var r=n(68).IteratorPrototype,o=n(63),i=n(25),s=n(20),a=n(22),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),s(t,u,!1,!0),a[u]=c,t}},function(t,e,n){"use strict";var r,o,i,s=n(69),a=n(11),c=n(6),u=n(1),l=n(19),p=u("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):f=!0),null==r&&(r={}),l||c(r,p)||a(r,p,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},function(t,e,n){var r=n(6),o=n(24),i=n(39),s=n(101),a=i("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){n(8),(()=>{const e=n(105),r=n(107);class o extends Error{constructor(t){super(t);const n=(new Date).toISOString(),o=e.os.toString(),i=`${e.name} ${e.version}`,s=r.parse(this)[0],a=`${s.fileName}`,c=s.lineNumber,u=s.columnNumber,{jobID:l,taskID:p,clientID:f}=window.cvat.config;Object.defineProperties(this,Object.freeze({system:{get:()=>o},client:{get:()=>i},time:{get:()=>n},jobID:{get:()=>l},taskID:{get:()=>p},projID:{get:()=>void 0},clientID:{get:()=>f},filename:{get:()=>a},line:{get:()=>c},column:{get:()=>u}}))}async save(){const t={system:this.system,client:this.client,time:this.time,job_id:this.jobID,task_id:this.taskID,proj_id:this.projID,client_id:this.clientID,message:this.message,filename:this.filename,line:this.line,column:this.column,stack:this.stack};try{const e=n(17);await e.server.exception(t)}catch(t){}}}t.exports={Exception:o,ArgumentError:class extends o{constructor(t){super(t)}},DataError:class extends o{constructor(t){super(t)}},ScriptingError:class extends o{constructor(t){super(t)}},PluginError:class extends o{constructor(t){super(t)}},ServerError:class extends o{constructor(t,e){super(t),Object.defineProperties(this,Object.freeze({code:{get:()=>e}}))}}}})()},function(t,e,n){"use strict";var r,o,i=n(111),s=RegExp.prototype.exec,a=String.prototype.replace,c=s,u=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(t){var e,n,r,o,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),u&&(e=c.lastIndex),r=s.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&a.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=c},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(5),o=n(121),i=n(123),s=n(124),a=n(125),c=n(74);t.exports=function(t){return new Promise(function(e,u){var l=t.data,p=t.headers;r.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",d=t.auth.password||"";p.Authorization="Basic "+btoa(h+":"+d)}if(f.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};o(e,u,r),f=null}},f.onerror=function(){u(c("Network Error",t,null,f)),f=null},f.ontimeout=function(){u(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var b=n(126),g=(t.withCredentials||a(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;g&&(p[t.xsrfHeaderName]=g)}if("setRequestHeader"in f&&r.forEach(p,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:f.setRequestHeader(e,t)}),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){f&&(f.abort(),u(t),f=null)}),void 0===l&&(l=null),f.send(l)})}},function(t,e,n){"use strict";var r=n(122);t.exports=function(t,e,n,o,i){var s=new Error(t);return r(s,e,n,o,i)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){n(4),n(8),n(7),(()=>{const e=n(23);class r{constructor(t){const e={label:null,attributes:{},points:null,outside:null,occluded:null,keyframe:null,group:null,zOrder:null,lock:null,color:null,clientID:t.clientID,serverID:t.serverID,frame:t.frame,objectType:t.objectType,shapeType:t.shapeType,updateFlags:{}};Object.defineProperty(e.updateFlags,"reset",{value:function(){this.label=!1,this.attributes=!1,this.points=!1,this.outside=!1,this.occluded=!1,this.keyframe=!1,this.group=!1,this.zOrder=!1,this.lock=!1,this.color=!1},writable:!1}),Object.defineProperties(this,Object.freeze({updateFlags:{get:()=>e.updateFlags},frame:{get:()=>e.frame},objectType:{get:()=>e.objectType},shapeType:{get:()=>e.shapeType},clientID:{get:()=>e.clientID},serverID:{get:()=>e.serverID},label:{get:()=>e.label,set:t=>{e.updateFlags.label=!0,e.label=t}},color:{get:()=>e.color,set:t=>{e.updateFlags.color=!0,e.color=t}},points:{get:()=>e.points,set:t=>{if(!Array.isArray(t))throw new window.cvat.exceptions.ArgumentError("Points are expected to be an array "+`but got ${"object"==typeof t?t.constructor.name:typeof t}`);e.updateFlags.points=!0,e.points=[...t]}},group:{get:()=>e.group,set:t=>{e.updateFlags.group=!0,e.group=t}},zOrder:{get:()=>e.zOrder,set:t=>{e.updateFlags.zOrder=!0,e.zOrder=t}},outside:{get:()=>e.outside,set:t=>{e.updateFlags.outside=!0,e.outside=t}},keyframe:{get:()=>e.keyframe,set:t=>{e.updateFlags.keyframe=!0,e.keyframe=t}},occluded:{get:()=>e.occluded,set:t=>{e.updateFlags.occluded=!0,e.occluded=t}},lock:{get:()=>e.lock,set:t=>{e.updateFlags.lock=!0,e.lock=t}},attributes:{get:()=>e.attributes,set:t=>{if("object"!=typeof t)throw new window.cvat.exceptions.ArgumentError("Attributes are expected to be an object "+`but got ${"object"==typeof t?t.constructor.name:typeof t}`);for(const n of Object.keys(t))e.updateFlags.attributes=!0,e.attributes[n]=t[n]}}})),this.label=t.label,this.group=t.group,this.zOrder=t.zOrder,this.outside=t.outside,this.keyframe=t.keyframe,this.occluded=t.occluded,this.color=t.color,this.lock=t.lock,void 0!==t.points&&(this.points=t.points),void 0!==t.attributes&&(this.attributes=t.attributes),e.updateFlags.reset()}async save(){return await e.apiWrapper.call(this,r.prototype.save)}async delete(t=!1){return await e.apiWrapper.call(this,r.prototype.delete,t)}async up(){return await e.apiWrapper.call(this,r.prototype.up)}async down(){return await e.apiWrapper.call(this,r.prototype.down)}}r.prototype.save.implementation=async function(){return this.hidden&&this.hidden.save?this.hidden.save():this},r.prototype.delete.implementation=async function(t){return!(!this.hidden||!this.hidden.delete)&&this.hidden.delete(t)},r.prototype.up.implementation=async function(){return!(!this.hidden||!this.hidden.up)&&this.hidden.up()},r.prototype.down.implementation=async function(){return!(!this.hidden||!this.hidden.down)&&this.hidden.down()},t.exports=r})()},function(t,e){(()=>{t.exports=class{constructor(t,e){Object.defineProperties(this,Object.freeze({label:{get:()=>JSON.parse(JSON.stringify(t))},total:{get:()=>JSON.parse(JSON.stringify(e))}}))}}})()},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){"use strict";n(140);var r,o=n(12),i=n(9),s=n(81),a=n(0),c=n(64),u=n(15),l=n(42),p=n(6),f=n(141),h=n(142),d=n(43).codeAt,b=n(144),g=n(20),m=n(145),v=n(16),w=a.URL,y=m.URLSearchParams,x=m.getState,O=v.set,j=v.getterFor("URL"),k=Math.floor,S=Math.pow,E=/[A-Za-z]/,A=/[\d+\-.A-Za-z]/,T=/\d/,I=/^(0x|0X)/,P=/^[0-7]+$/,C=/^\d+$/,F=/^[\dA-Fa-f]+$/,_=/[\u0000\u0009\u000A\u000D #%\/:?@[\\]]/,N=/[\u0000\u0009\u000A\u000D #\/:?@[\\]]/,M=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,R=/[\u0009\u000A\u000D]/g,$=function(t,e){var n,r,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(n=L(e.slice(1,-1))))return"Invalid host";t.host=n}else if(V(t)){if(e=b(e),_.test(e))return"Invalid host";if(null===(n=D(e)))return"Invalid host";t.host=n}else{if(N.test(e))return"Invalid host";for(n="",r=h(e),o=0;o<r.length;o++)n+=q(r[o],z);t.host=n}},D=function(t){var e,n,r,o,i,s,a,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(o=c[r]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=I.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)s=0;else{if(!(10==i?C:8==i?P:F).test(o))return t;s=parseInt(o,i)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=S(256,5-e))return null}else if(s>255)return null;for(a=n.pop(),r=0;r<n.length;r++)a+=n[r]*S(256,3-r);return a},L=function(t){var e,n,r,o,i,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,p=0,f=function(){return t.charAt(p)};if(":"==f()){if(":"!=t.charAt(1))return;p+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(e=n=0;n<4&&F.test(f());)e=16*e+parseInt(f(),16),p++,n++;if("."==f()){if(0==n)return;if(p-=n,u>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;p++}if(!T.test(f()))return;for(;T.test(f());){if(i=parseInt(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;p++}c[u]=256*c[u]+o,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(p++,!f())return}else if(f())return;c[u++]=e}else{if(null!==l)return;p++,l=++u}}if(null!==l)for(s=u-l,u=7;0!=u&&s>0;)a=c[u],c[u--]=c[l+s-1],c[l+--s]=a;else if(8!=u)return;return c},B=function(t){var e,n,r,o;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=k(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,o=0,i=0;i<8;i++)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),e}(t),n=0;n<8;n++)o&&0===t[n]||(o&&(o=!1),r===n?(e+=n?":":"::",o=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},z={},U=f({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),W=f({},U,{"#":1,"?":1,"{":1,"}":1}),G=f({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),q=function(t,e){var n=d(t,0);return n>32&&n<127&&!p(e,t)?t:encodeURIComponent(t)},J={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},V=function(t){return p(J,t.scheme)},X=function(t){return""!=t.username||""!=t.password},H=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},K=function(t,e){var n;return 2==t.length&&E.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},Z=function(t){var e;return t.length>1&&K(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},Y=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&K(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},nt={},rt={},ot={},it={},st={},at={},ct={},ut={},lt={},pt={},ft={},ht={},dt={},bt={},gt={},mt={},vt={},wt={},yt={},xt=function(t,e,n,o){var i,s,a,c,u,l=n||tt,f=0,d="",b=!1,g=!1,m=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(M,"")),e=e.replace(R,""),i=h(e);f<=i.length;){switch(s=i[f],l){case tt:if(!s||!E.test(s)){if(n)return"Invalid scheme";l=nt;continue}d+=s.toLowerCase(),l=et;break;case et:if(s&&(A.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(n)return"Invalid scheme";d="",l=nt,f=0;continue}if(n&&(V(t)!=p(J,d)||"file"==d&&(X(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=d,n)return void(V(t)&&J[t.scheme]==t.port&&(t.port=null));d="","file"==t.scheme?l=ht:V(t)&&o&&o.scheme==t.scheme?l=rt:V(t)?l=at:"/"==i[f+1]?(l=ot,f++):(t.cannotBeABaseURL=!0,t.path.push(""),l=vt)}break;case nt:if(!o||o.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(o.cannotBeABaseURL&&"#"==s){t.scheme=o.scheme,t.path=o.path.slice(),t.query=o.query,t.fragment="",t.cannotBeABaseURL=!0,l=yt;break}l="file"==o.scheme?ht:it;continue;case rt:if("/"!=s||"/"!=i[f+1]){l=it;continue}l=ct,f++;break;case ot:if("/"==s){l=ut;break}l=mt;continue;case it:if(t.scheme=o.scheme,s==r)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query;else if("/"==s||"\\"==s&&V(t))l=st;else if("?"==s)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query="",l=wt;else{if("#"!=s){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.path.pop(),l=mt;continue}t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query,t.fragment="",l=yt}break;case st:if(!V(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,l=mt;continue}l=ut}else l=ct;break;case at:if(l=ct,"/"!=s||"/"!=d.charAt(f+1))continue;f++;break;case ct:if("/"!=s&&"\\"!=s){l=ut;continue}break;case ut:if("@"==s){b&&(d="%40"+d),b=!0,a=h(d);for(var v=0;v<a.length;v++){var w=a[v];if(":"!=w||m){var y=q(w,G);m?t.password+=y:t.username+=y}else m=!0}d=""}else if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&V(t)){if(b&&""==d)return"Invalid authority";f-=h(d).length+1,d="",l=lt}else d+=s;break;case lt:case pt:if(n&&"file"==t.scheme){l=bt;continue}if(":"!=s||g){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&V(t)){if(V(t)&&""==d)return"Invalid host";if(n&&""==d&&(X(t)||null!==t.port))return;if(c=$(t,d))return c;if(d="",l=gt,n)return;continue}"["==s?g=!0:"]"==s&&(g=!1),d+=s}else{if(""==d)return"Invalid host";if(c=$(t,d))return c;if(d="",l=ft,n==pt)return}break;case ft:if(!T.test(s)){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&V(t)||n){if(""!=d){var x=parseInt(d,10);if(x>65535)return"Invalid port";t.port=V(t)&&x===J[t.scheme]?null:x,d=""}if(n)return;l=gt;continue}return"Invalid port"}d+=s;break;case ht:if(t.scheme="file","/"==s||"\\"==s)l=dt;else{if(!o||"file"!=o.scheme){l=mt;continue}if(s==r)t.host=o.host,t.path=o.path.slice(),t.query=o.query;else if("?"==s)t.host=o.host,t.path=o.path.slice(),t.query="",l=wt;else{if("#"!=s){Z(i.slice(f).join(""))||(t.host=o.host,t.path=o.path.slice(),Y(t)),l=mt;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",l=yt}}break;case dt:if("/"==s||"\\"==s){l=bt;break}o&&"file"==o.scheme&&!Z(i.slice(f).join(""))&&(K(o.path[0],!0)?t.path.push(o.path[0]):t.host=o.host),l=mt;continue;case bt:if(s==r||"/"==s||"\\"==s||"?"==s||"#"==s){if(!n&&K(d))l=mt;else if(""==d){if(t.host="",n)return;l=gt}else{if(c=$(t,d))return c;if("localhost"==t.host&&(t.host=""),n)return;d="",l=gt}continue}d+=s;break;case gt:if(V(t)){if(l=mt,"/"!=s&&"\\"!=s)continue}else if(n||"?"!=s)if(n||"#"!=s){if(s!=r&&(l=mt,"/"!=s))continue}else t.fragment="",l=yt;else t.query="",l=wt;break;case mt:if(s==r||"/"==s||"\\"==s&&V(t)||!n&&("?"==s||"#"==s)){if(".."===(u=(u=d).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(Y(t),"/"==s||"\\"==s&&V(t)||t.path.push("")):Q(d)?"/"==s||"\\"==s&&V(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&K(d)&&(t.host&&(t.host=""),d=d.charAt(0)+":"),t.path.push(d)),d="","file"==t.scheme&&(s==r||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",l=wt):"#"==s&&(t.fragment="",l=yt)}else d+=q(s,W);break;case vt:"?"==s?(t.query="",l=wt):"#"==s?(t.fragment="",l=yt):s!=r&&(t.path[0]+=q(s,z));break;case wt:n||"#"!=s?s!=r&&("'"==s&&V(t)?t.query+="%27":t.query+="#"==s?"%23":q(s,z)):(t.fragment="",l=yt);break;case yt:s!=r&&(t.fragment+=q(s,U))}f++}},Ot=function(t){var e,n,r=l(this,Ot,"URL"),o=arguments.length>1?arguments[1]:void 0,s=String(t),a=O(r,{type:"URL"});if(void 0!==o)if(o instanceof Ot)e=j(o);else if(n=xt(e={},String(o)))throw TypeError(n);if(n=xt(a,s,null,e))throw TypeError(n);var c=a.searchParams=new y,u=x(c);u.updateSearchParams(a.query),u.updateURL=function(){a.query=String(c)||null},i||(r.href=kt.call(r),r.origin=St.call(r),r.protocol=Et.call(r),r.username=At.call(r),r.password=Tt.call(r),r.host=It.call(r),r.hostname=Pt.call(r),r.port=Ct.call(r),r.pathname=Ft.call(r),r.search=_t.call(r),r.searchParams=Nt.call(r),r.hash=Mt.call(r))},jt=Ot.prototype,kt=function(){var t=j(this),e=t.scheme,n=t.username,r=t.password,o=t.host,i=t.port,s=t.path,a=t.query,c=t.fragment,u=e+":";return null!==o?(u+="//",X(t)&&(u+=n+(r?":"+r:"")+"@"),u+=B(o),null!==i&&(u+=":"+i)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},St=function(){var t=j(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&V(t)?e+"://"+B(t.host)+(null!==n?":"+n:""):"null"},Et=function(){return j(this).scheme+":"},At=function(){return j(this).username},Tt=function(){return j(this).password},It=function(){var t=j(this),e=t.host,n=t.port;return null===e?"":null===n?B(e):B(e)+":"+n},Pt=function(){var t=j(this).host;return null===t?"":B(t)},Ct=function(){var t=j(this).port;return null===t?"":String(t)},Ft=function(){var t=j(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},_t=function(){var t=j(this).query;return t?"?"+t:""},Nt=function(){return j(this).searchParams},Mt=function(){var t=j(this).fragment;return t?"#"+t:""},Rt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(i&&c(jt,{href:Rt(kt,function(t){var e=j(this),n=String(t),r=xt(e,n);if(r)throw TypeError(r);x(e.searchParams).updateSearchParams(e.query)}),origin:Rt(St),protocol:Rt(Et,function(t){var e=j(this);xt(e,String(t)+":",tt)}),username:Rt(At,function(t){var e=j(this),n=h(String(t));if(!H(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=q(n[r],G)}}),password:Rt(Tt,function(t){var e=j(this),n=h(String(t));if(!H(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=q(n[r],G)}}),host:Rt(It,function(t){var e=j(this);e.cannotBeABaseURL||xt(e,String(t),lt)}),hostname:Rt(Pt,function(t){var e=j(this);e.cannotBeABaseURL||xt(e,String(t),pt)}),port:Rt(Ct,function(t){var e=j(this);H(e)||(""==(t=String(t))?e.port=null:xt(e,t,ft))}),pathname:Rt(Ft,function(t){var e=j(this);e.cannotBeABaseURL||(e.path=[],xt(e,t+"",gt))}),search:Rt(_t,function(t){var e=j(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",xt(e,t,wt)),x(e.searchParams).updateSearchParams(e.query)}),searchParams:Rt(Nt),hash:Rt(Mt,function(t){var e=j(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",xt(e,t,yt)):e.fragment=null})}),u(jt,"toJSON",function(){return kt.call(this)},{enumerable:!0}),u(jt,"toString",function(){return kt.call(this)},{enumerable:!0}),w){var $t=w.createObjectURL,Dt=w.revokeObjectURL;$t&&u(Ot,"createObjectURL",function(t){return $t.apply(w,arguments)}),Dt&&u(Ot,"revokeObjectURL",function(t){return Dt.apply(w,arguments)})}g(Ot,"URL"),o({global:!0,forced:!s,sham:!i},{URL:Ot})},function(t,e,n){var r=n(2),o=n(1),i=n(19),s=o("iterator");t.exports=!r(function(){var t=new URL("b?e=1","http://a"),e=t.searchParams;return t.pathname="c%20d",i&&!t.toJSON||!e.sort||"http://a/c%20d?e=1"!==t.href||"1"!==e.get("e")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash})},function(t,e,n){"use strict";var r=n(12),o=n(21),i=n(24),s=n(2),a=n(149),c=[].sort,u=[1,2,3],l=s(function(){u.sort(void 0)}),p=s(function(){u.sort(null)}),f=a("sort");r({target:"Array",proto:!0,forced:l||!p||f},{sort:function(t){return void 0===t?c.call(i(this)):c.call(i(this),o(t))}})},function(t,e,n){n(8),(()=>{const t=n(23),e=n(134),r=n(77),o=n(78),{Job:i,Task:s}=n(135),{Attribute:a,Label:c}=n(152),{ShareFileType:u,TaskStatus:l,TaskMode:p,AttributeType:f,ObjectType:h,ObjectShape:d,LogType:b,EventType:g}=n(153),{Exception:m,ArgumentError:v,DataError:w,ScriptingError:y,PluginError:x,ServerError:O}=n(70),j=n(154),k=+Date.now().toString().substr(-6),S={server:{about:async()=>await t.apiWrapper(S.server.about),share:async(e="/")=>await t.apiWrapper(S.server.share,e),login:async(e,n)=>await t.apiWrapper(S.server.login,e,n),logout:async()=>await t.apiWrapper(S.server.logout)},tasks:{get:async(e={})=>await t.apiWrapper(S.tasks.get,e)},jobs:{get:async(e={})=>await t.apiWrapper(S.jobs.get,e)},users:{get:async(e={})=>await t.apiWrapper(S.users.get,e)},plugins:{list:async()=>await t.apiWrapper(S.plugins.list),register:async e=>await t.apiWrapper(S.plugins.register,e)},config:{backendAPI:"http://localhost:7000/api/v1",proxy:!1,taskID:void 0,jobID:void 0,clientID:{get:()=>k}},client:{version:`${j.version}`},enums:{ShareFileType:u,TaskStatus:l,TaskMode:p,AttributeType:f,ObjectType:h,ObjectShape:d,LogType:b,EventType:g},exceptions:{Exception:m,ArgumentError:v,DataError:w,ScriptingError:y,PluginError:x,ServerError:O},classes:{Task:s,User:e,Job:i,Attribute:a,Label:c,Statistics:o,ObjectState:r}};S.server=Object.freeze(S.server),S.tasks=Object.freeze(S.tasks),S.jobs=Object.freeze(S.jobs),S.users=Object.freeze(S.users),S.plugins=Object.freeze(S.plugins),S.client=Object.freeze(S.client),S.enums=Object.freeze(S.enums),S.Job=Object.freeze(S.Job),S.Task=Object.freeze(S.Task);const E=n(155);"undefined"==typeof window&&n(!function(){var t=new Error("Cannot find module 'browser-env'");throw t.code="MODULE_NOT_FOUND",t}())(),Math.clamp=function(t,e,n){return Math.min(Math.max(t,e),n)},window.cvat=Object.freeze(E(S))})()},function(t,e,n){var r=n(0),o=n(49),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o.call(i))},function(t,e,n){var r=n(28),o=n(86),i=n(54),s=n(3);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(53),o=n(41).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(26),o=n(29),i=n(88),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c.length),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,n){var r=n(30),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){var r=n(2);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(t,e,n){"use strict";var r=n(28),o=n(13),i=n(1),s=n(9),a=i("species");t.exports=function(t){var e=r(t),n=o.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(3),o=n(57),i=n(29),s=n(31),a=n(32),c=n(58),u=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,p){var f,h,d,b,g,m,v=s(e,n,l?2:1);if(p)f=t;else{if("function"!=typeof(h=a(t)))throw TypeError("Target is not iterable");if(o(h)){for(d=0,b=i(t.length);b>d;d++)if((g=l?v(r(m=t[d])[0],m[1]):v(t[d]))&&g instanceof u)return g;return new u(!1)}f=h.call(t)}for(;!(m=f.next()).done;)if((g=c(f,v,m.value,l))&&g instanceof u)return g;return new u(!1)}).stop=function(t){return new u(!0,t)}},function(t,e,n){var r=n(14),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(1)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[r]=function(){return this},Array.from(s,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r=n(3),o=n(21),i=n(1)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){var r,o,i,s,a,c,u,l=n(0),p=n(35).f,f=n(14),h=n(59).set,d=n(61),b=l.MutationObserver||l.WebKitMutationObserver,g=l.process,m=l.Promise,v="process"==f(g),w=p(l,"queueMicrotask"),y=w&&w.value;y||(r=function(){var t,e;for(v&&(t=g.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?s():i=void 0,t}}i=void 0,t&&t.enter()},v?s=function(){g.nextTick(r)}:b&&!/(iphone|ipod|ipad).*applewebkit/i.test(d)?(a=!0,c=document.createTextNode(""),new b(r).observe(c,{characterData:!0}),s=function(){c.data=a=!a}):m&&m.resolve?(u=m.resolve(void 0),s=function(){u.then(r)}):s=function(){h.call(l,r)}),t.exports=y||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,s()),i=e}},function(t,e,n){var r=n(3),o=n(10),i=n(62);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(0);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){"use strict";var r=n(12),o=n(9),i=n(0),s=n(6),a=n(10),c=n(13).f,u=n(51),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var p={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new l(t):void 0===t?l():l(t);return""===t&&(p[e]=!0),e};u(f,l);var h=f.prototype=l.prototype;h.constructor=f;var d=h.toString,b="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;c(h,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=d.call(t);if(s(p,t))return"";var n=b?e.slice(7,-1):e.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:f})}},function(t,e,n){var r=n(1),o=n(63),i=n(11),s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,o(null)),t.exports=function(t){a[s][t]=!0}},function(t,e,n){var r=n(2);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},function(t,e,n){var r=n(3),o=n(103);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){var r=n(10);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){(function(t,r){var o;
|
|
|
/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var i={function:!0,object:!0},s=i[typeof window]&&window||this,a=i[typeof e]&&e,c=i[typeof t]&&t&&!t.nodeType&&t,u=a&&c&&"object"==typeof r&&r;!u||u.global!==u&&u.window!==u&&u.self!==u||(s=u);var l=Math.pow(2,53)-1,p=/\bOpera/,f=Object.prototype,h=f.hasOwnProperty,d=f.toString;function b(t){return(t=String(t)).charAt(0).toUpperCase()+t.slice(1)}function g(t){return t=x(t),/^(?:webOS|i(?:OS|P))/.test(t)?t:b(t)}function m(t,e){for(var n in t)h.call(t,n)&&e(t[n],n,t)}function v(t){return null==t?b(t):d.call(t).slice(8,-1)}function w(t){return String(t).replace(/([ -])(?!$)/g,"$1?")}function y(t,e){var n=null;return function(t,e){var n=-1,r=t?t.length:0;if("number"==typeof r&&r>-1&&r<=l)for(;++n<r;)e(t[n],n,t);else m(t,e)}(t,function(r,o){n=e(n,r,o,t)}),n}function x(t){return String(t).replace(/^ +| +$/g,"")}var O=function t(e){var n=s,r=e&&"object"==typeof e&&"String"!=v(e);r&&(n=e,e=null);var o=n.navigator||{},i=o.userAgent||"";e||(e=i);var a,c,u,l,f,h=r?!!o.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(d.toString()),b=r?"Object":"ScriptBridgingProxyObject",O=r?"Object":"Environment",j=r&&n.java?"JavaPackage":v(n.java),k=r?"Object":"RuntimeObject",S=/\bJava/.test(j)&&n.java,E=S&&v(n.environment)==O,A=S?"a":"α",T=S?"b":"β",I=n.document||{},P=n.operamini||n.opera,C=p.test(C=r&&P?P["[[Class]]"]:v(P))?C:P=null,F=e,_=[],N=null,M=e==i,R=M&&P&&"function"==typeof P.version&&P.version(),$=y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,n){return t||RegExp("\\b"+(n.pattern||w(n))+"\\b","i").exec(e)&&(n.label||n)}),D=function(t){return y(t,function(t,n){return t||RegExp("\\b"+(n.pattern||w(n))+"\\b","i").exec(e)&&(n.label||n)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),L=U([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),B=function(t){return y(t,function(t,n,r){return t||(n[L]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(L)]||RegExp("\\b"+w(r)+"(?:\\b|\\w*\\d)","i").exec(e))&&r})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),z=function(t){return y(t,function(t,n){var r=n.pattern||w(n);return!t&&(t=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=function(t,e,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return e&&n&&/^Win/i.test(t)&&!/^Windows Phone /i.test(t)&&(r=r[/[\d.]+$/.exec(t)])&&(t="Windows "+r),t=String(t),e&&n&&(t=t.replace(RegExp(e,"i"),n)),t=g(t.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(t,r,n.label||n)),t})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function U(t){return y(t,function(t,n){var r=n.pattern||w(n);return!t&&(t=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),n=n.label||n,t=g(t[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t})}if($&&($=[$]),B&&!L&&(L=U([B])),(a=/\bGoogle TV\b/.exec(L))&&(L=a[0]),/\bSimulator\b/i.test(e)&&(L=(L?L+" ":"")+"Simulator"),"Opera Mini"==D&&/\bOPiOS\b/.test(e)&&_.push("running in Turbo/Uncompressed mode"),"IE"==D&&/\blike iPhone OS\b/.test(e)?(B=(a=t(e.replace(/like iPhone OS/,""))).manufacturer,L=a.product):/^iP/.test(L)?(D||(D="Safari"),z="iOS"+((a=/ OS ([\d_]+)/i.exec(e))?" "+a[1].replace(/_/g,"."):"")):"Konqueror"!=D||/buntu/i.test(z)?B&&"Google"!=B&&(/Chrome/.test(D)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(L))||/\bAndroid\b/.test(z)&&/^Chrome/.test(D)&&/\bVersion\//i.test(e)?(D="Android Browser",z=/\bAndroid\b/.test(z)?z:"Android"):"Silk"==D?(/\bMobi/i.test(e)||(z="Android",_.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&_.unshift("accelerated")):"PaleMoon"==D&&(a=/\bFirefox\/([\d.]+)\b/.exec(e))?_.push("identifying as Firefox "+a[1]):"Firefox"==D&&(a=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(z||(z="Firefox OS"),L||(L=a[1])):!D||(a=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(D))?(D&&!L&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(a+"/")+8))&&(D=null),(a=L||B||z)&&(L||B||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(z))&&(D=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(z)?z:a)+" Browser")):"Electron"==D&&(a=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&_.push("Chromium "+a):z="Kubuntu",R||(R=y(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(D),"(?:Firefox|Minefield|NetFront)"],function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})),(a=("iCab"==$&&parseFloat(R)>3?"WebKit":/\bOpera\b/.test(D)&&(/\bOPR\b/.test(e)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test($)&&"WebKit"||!$&&/\bMSIE\b/i.test(e)&&("Mac OS"==z?"Tasman":"Trident")||"WebKit"==$&&/\bPlayStation\b(?! Vita\b)/i.test(D)&&"NetFront")&&($=[a]),"IE"==D&&(a=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(D+=" Mobile",z="Windows Phone "+(/\+$/.test(a)?a:a+".x"),_.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(D="IE Mobile",z="Windows Phone 8.x",_.unshift("desktop mode"),R||(R=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=D&&"Trident"==$&&(a=/\brv:([\d.]+)/.exec(e))&&(D&&_.push("identifying as "+D+(R?" "+R:"")),D="IE",R=a[1]),M){if(l="global",f=null!=(u=n)?typeof u[l]:"number",/^(?:boolean|number|string|undefined)$/.test(f)||"object"==f&&!u[l])v(a=n.runtime)==b?(D="Adobe AIR",z=a.flash.system.Capabilities.os):v(a=n.phantom)==k?(D="PhantomJS",R=(a=a.version||null)&&a.major+"."+a.minor+"."+a.patch):"number"==typeof I.documentMode&&(a=/\bTrident\/(\d+)/i.exec(e))?(R=[R,I.documentMode],(a=+a[1]+4)!=R[1]&&(_.push("IE "+R[1]+" mode"),$&&($[1]=""),R[1]=a),R="IE"==D?String(R[1].toFixed(1)):R[0]):"number"==typeof I.documentMode&&/^(?:Chrome|Firefox)\b/.test(D)&&(_.push("masking as "+D+" "+R),D="IE",R="11.0",$=["Trident"],z="Windows");else if(S&&(F=(a=S.lang.System).getProperty("os.arch"),z=z||a.getProperty("os.name")+" "+a.getProperty("os.version")),E){try{R=n.require("ringo/engine").version.join("."),D="RingoJS"}catch(t){(a=n.system)&&a.global.system==n.system&&(D="Narwhal",z||(z=a[0].os||null))}D||(D="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(a=n.process)&&("object"==typeof a.versions&&("string"==typeof a.versions.electron?(_.push("Node "+a.versions.node),D="Electron",R=a.versions.electron):"string"==typeof a.versions.nw&&(_.push("Chromium "+R,"Node "+a.versions.node),D="NW.js",R=a.versions.nw)),D||(D="Node.js",F=a.arch,z=a.platform,R=(R=/[\d.]+/.exec(a.version))?R[0]:null));z=z&&g(z)}if(R&&(a=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(R)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(M&&o.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(N=/b/i.test(a)?"beta":"alpha",R=R.replace(RegExp(a+"\\+?$"),"")+("beta"==N?T:A)+(/\d+\+?/.exec(a)||"")),"Fennec"==D||"Firefox"==D&&/\b(?:Android|Firefox OS)\b/.test(z))D="Firefox Mobile";else if("Maxthon"==D&&R)R=R.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(L))"Xbox 360"==L&&(z=null),"Xbox 360"==L&&/\bIEMobile\b/.test(e)&&_.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(D)&&(!D||L||/Browser|Mobi/.test(D))||"Windows CE"!=z&&!/Mobi/i.test(e))if("IE"==D&&M)try{null===n.external&&_.unshift("platform preview")}catch(t){_.unshift("embedded")}else(/\bBlackBerry\b/.test(L)||/\bBB10\b/.test(e))&&(a=(RegExp(L.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||R)?(z=((a=[a,/BB10/.test(e)])[1]?(L=null,B="BlackBerry"):"Device Software")+" "+a[0],R=null):this!=m&&"Wii"!=L&&(M&&P||/Opera/.test(D)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==D&&/\bOS X (?:\d+\.){2,}/.test(z)||"IE"==D&&(z&&!/^Win/.test(z)&&R>5.5||/\bWindows XP\b/.test(z)&&R>8||8==R&&!/\bTrident\b/.test(e)))&&!p.test(a=t.call(m,e.replace(p,"")+";"))&&a.name&&(a="ing as "+a.name+((a=a.version)?" "+a:""),p.test(D)?(/\bIE\b/.test(a)&&"Mac OS"==z&&(z=null),a="identify"+a):(a="mask"+a,D=C?g(C.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(a)&&(z=null),M||(R=null)),$=["Presto"],_.push(a));else D+=" Mobile";(a=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(a=[parseFloat(a.replace(/\.(\d)$/,".0$1")),a],"Safari"==D&&"+"==a[1].slice(-1)?(D="WebKit Nightly",N="alpha",R=a[1].slice(0,-1)):R!=a[1]&&R!=(a[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(R=null),a[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==a[0]&&537.36==a[2]&&parseFloat(a[1])>=28&&"WebKit"==$&&($=["Blink"]),M&&(h||a[1])?($&&($[1]="like Chrome"),a=a[1]||((a=a[0])<530?1:a<532?2:a<532.05?3:a<533?4:a<534.03?5:a<534.07?6:a<534.1?7:a<534.13?8:a<534.16?9:a<534.24?10:a<534.3?11:a<535.01?12:a<535.02?"13+":a<535.07?15:a<535.11?16:a<535.19?17:a<536.05?18:a<536.1?19:a<537.01?20:a<537.11?"21+":a<537.13?23:a<537.18?24:a<537.24?25:a<537.36?26:"Blink"!=$?"27":"28")):($&&($[1]="like Safari"),a=(a=a[0])<400?1:a<500?2:a<526?3:a<533?4:a<534?"4+":a<535?5:a<537?6:a<538?7:a<601?8:"8"),$&&($[1]+=" "+(a+="number"==typeof a?".x":/[.+]/.test(a)?"":"+")),"Safari"==D&&(!R||parseInt(R)>45)&&(R=a)),"Opera"==D&&(a=/\bzbov|zvav$/.exec(z))?(D+=" ",_.unshift("desktop mode"),"zvav"==a?(D+="Mini",R=null):D+="Mobile",z=z.replace(RegExp(" *"+a+"$"),"")):"Safari"==D&&/\bChrome\b/.exec($&&$[1])&&(_.unshift("desktop mode"),D="Chrome Mobile",R=null,/\bOS X\b/.test(z)?(B="Apple",z="iOS 4.3+"):z=null),R&&0==R.indexOf(a=/[\d.]+$/.exec(z))&&e.indexOf("/"+a+"-")>-1&&(z=x(z.replace(a,""))),$&&!/\b(?:Avant|Nook)\b/.test(D)&&(/Browser|Lunascape|Maxthon/.test(D)||"Safari"!=D&&/^iOS/.test(z)&&/\bSafari\b/.test($[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(D)&&$[1])&&(a=$[$.length-1])&&_.push(a),_.length&&(_=["("+_.join("; ")+")"]),B&&L&&L.indexOf(B)<0&&_.push("on "+B),L&&_.push((/^on /.test(_[_.length-1])?"":"on ")+L),z&&(a=/ ([\d.+]+)$/.exec(z),c=a&&"/"==z.charAt(z.length-a[0].length-1),z={architecture:32,family:a&&!c?z.replace(a[0],""):z,version:a?a[1]:null,toString:function(){var t=this.version;return this.family+(t&&!c?" "+t:"")+(64==this.architecture?" 64-bit":"")}}),(a=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(F))&&!/\bi686\b/i.test(F)?(z&&(z.architecture=64,z.family=z.family.replace(RegExp(" *"+a),"")),D&&(/\bWOW64\b/i.test(e)||M&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(e))&&_.unshift("32-bit")):z&&/^OS X/.test(z.family)&&"Chrome"==D&&parseFloat(R)>=39&&(z.architecture=64),e||(e=null);var W={};return W.description=e,W.layout=$&&$[0],W.manufacturer=B,W.name=D,W.prerelease=N,W.product=L,W.ua=e,W.version=D&&R,W.os=z||{architecture:null,family:null,version:null,toString:function(){return"null"}},W.parse=t,W.toString=function(){return this.description||""},W.version&&_.unshift(R),W.name&&_.unshift(D),z&&D&&(z!=String(z).split(" ")[0]||z!=D.split(" ")[0]&&!L)&&_.push(L?"("+z+")":"on "+z),_.length&&(W.description=_.join(" ")),W}();s.platform=O,void 0===(o=function(){return O}.call(e,n,e,t))||(t.exports=o)}).call(this)}).call(this,n(106)(t),n(34))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r,o,i;!function(s,a){"use strict";o=[n(108)],void 0===(i="function"==typeof(r=function(t){var e=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(t.replace(/[\(\)]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){var r=e.stack.split("\n").filter(function(t){return!!t.match(n)},this);return r.map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),o=n.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new t({functionName:o,fileName:i,lineNumber:r[1],columnNumber:r[2],source:e})},this)},parseFFOrSafari:function(e){var n=e.stack.split("\n").filter(function(t){return!t.match(r)},this);return n.map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(n),o=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(n,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),o=[],i=2,s=r.length;i<s;i+=2){var a=n.exec(r[i]);a&&o.push(new t({fileName:a[2],lineNumber:a[1],source:r[i]}))}return o},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),o=[],i=0,s=r.length;i<s;i+=2){var a=n.exec(r[i]);a&&o.push(new t({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:r[i]}))}return o},parseOpera11:function(n){var r=n.stack.split("\n").filter(function(t){return!!t.match(e)&&!t.match(/^Error created at/)},this);return r.map(function(e){var n,r=e.split("@"),o=this.extractLocation(r.pop()),i=r.shift()||"",s=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var a=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})},this)}}})?r.apply(e,o):r)||(t.exports=i)}()},function(t,e,n){var r,o,i;!function(n,s){"use strict";o=[],void 0===(i="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function n(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=r.concat(o,i,["args"]);function a(t){if(t instanceof Object)for(var n=0;n<s.length;n++)t.hasOwnProperty(s[n])&&void 0!==t[s[n]]&&this["set"+e(s[n])](t[s[n]])}a.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof a)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new a(t)}},toString:function(){var e=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+n+r+o+i}};for(var c=0;c<r.length;c++)a.prototype["get"+e(r[c])]=n(r[c]),a.prototype["set"+e(r[c])]=function(t){return function(e){this[t]=Boolean(e)}}(r[c]);for(var u=0;u<o.length;u++)a.prototype["get"+e(o[u])]=n(o[u]),a.prototype["set"+e(o[u])]=function(e){return function(n){if(!t(n))throw new TypeError(e+" must be a Number");this[e]=Number(n)}}(o[u]);for(var l=0;l<i.length;l++)a.prototype["get"+e(i[l])]=n(i[l]),a.prototype["set"+e(i[l])]=function(t){return function(e){this[t]=String(e)}}(i[l]);return a})?r.apply(e,o):r)||(t.exports=i)}()},function(t,e,n){"use strict";var r=n(110),o=n(3),i=n(24),s=n(29),a=n(30),c=n(18),u=n(112),l=n(113),p=Math.max,f=Math.min,h=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g;r("replace",2,function(t,e,n){return[function(n,r){var o=c(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,i){var c=n(e,t,this,i);if(c.done)return c.value;var h=o(t),d=String(this),b="function"==typeof i;b||(i=String(i));var g=h.global;if(g){var m=h.unicode;h.lastIndex=0}for(var v=[];;){var w=l(h,d);if(null===w)break;if(v.push(w),!g)break;""===String(w[0])&&(h.lastIndex=u(d,s(h.lastIndex),m))}for(var y,x="",O=0,j=0;j<v.length;j++){w=v[j];for(var k=String(w[0]),S=p(f(a(w.index),d.length),0),E=[],A=1;A<w.length;A++)E.push(void 0===(y=w[A])?y:String(y));var T=w.groups;if(b){var I=[k].concat(E,S,d);void 0!==T&&I.push(T);var P=String(i.apply(void 0,I))}else P=r(k,d,S,E,T,i);S>=O&&(x+=d.slice(O,S)+P,O=S+k.length)}return x+d.slice(O)}];function r(t,n,r,o,s,a){var c=r+t.length,u=o.length,l=b;return void 0!==s&&(s=i(s),l=d),e.call(a,l,function(e,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":a=s[i.slice(1,-1)];break;default:var l=+i;if(0===l)return e;if(l>u){var p=h(l/10);return 0===p?e:p<=u?void 0===o[p-1]?i.charAt(1):o[p-1]+i.charAt(1):e}a=o[l-1]}return void 0===a?"":a})}})},function(t,e,n){"use strict";var r=n(11),o=n(15),i=n(2),s=n(1),a=n(71),c=s("species"),u=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=!i(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});t.exports=function(t,e,n,p){var f=s(t),h=!i(function(){var e={};return e[f]=function(){return 7},7!=""[t](e)}),d=h&&!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e});if(!h||!d||"replace"===t&&!u||"split"===t&&!l){var b=/./[f],g=n(f,""[t],function(t,e,n,r,o){return e.exec===a?h&&!o?{done:!0,value:b.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),m=g[0],v=g[1];o(String.prototype,t,m),o(RegExp.prototype,f,2==e?function(t,e){return v.call(t,this,e)}:function(t){return v.call(t,this)}),p&&r(RegExp.prototype[f],"sham",!0)}}},function(t,e,n){"use strict";var r=n(3);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(43).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(14),o=n(71);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){var r,o;
|
|
|
/*!
|
|
|
* JavaScript Cookie v2.2.0
|
|
|
* https://github.com/js-cookie/js-cookie
|
|
|
*
|
|
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
|
* Released under the MIT license
|
|
|
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var s=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=s,a}}}(function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function e(n){function r(e,o,i){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=t({path:"/"},r.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{s=JSON.stringify(o),/^[\{\[]/.test(s)&&(o=s)}catch(t){}o=n.write?n.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u]));return document.cookie=e+"="+o+c}e||(s={});for(var l=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,f=0;f<l.length;f++){var h=l[f].split("="),d=h.slice(1).join("=");this.json||'"'!==d.charAt(0)||(d=d.slice(1,-1));try{var b=h[0].replace(p,decodeURIComponent);if(d=n.read?n.read(d,b):n(d,b)||d.replace(p,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(t){}if(e===b){s=d;break}e||(s[b]=d)}catch(t){}}return s}}return r.set=r,r.get=function(t){return r.call(r,t)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(e,n){r(e,"",t(n,{expires:-1}))},r.withConverter=e,r}(function(){})})},function(t,e,n){t.exports=n(116)},function(t,e,n){"use strict";var r=n(5),o=n(72),i=n(118),s=n(44);function a(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var c=a(s);c.Axios=i,c.create=function(t){return a(r.merge(s,t))},c.Cancel=n(76),c.CancelToken=n(132),c.isCancel=n(75),c.all=function(t){return Promise.all(t)},c.spread=n(133),t.exports=c,t.exports.default=c},function(t,e){
|
|
|
/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/
|
|
|
t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";var r=n(44),o=n(5),i=n(127),s=n(128);function a(t){this.defaults=t,this.interceptors={request:new i,response:new i}}a.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),(t=o.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){a.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){a.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=a},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,u=[],l=!1,p=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):p=-1,u.length&&h())}function h(){if(!l){var t=a(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++p<e;)c&&c[p].run();p=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function b(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||l||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(74);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";var r=n(5);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))}))}),i=s.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";var r=n(5),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,s={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}}),s):s}},function(t,e,n){"use strict";var r=n(5);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(5);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(5);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},function(t,e,n){"use strict";var r=n(5),o=n(129),i=n(75),s=n(44),a=n(130),c=n(131);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!a(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(76);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e){(()=>{t.exports=class{constructor(t){const e={id:null,username:null,email:null,first_name:null,last_name:null,groups:null,last_login:null,date_joined:null,is_staff:null,is_superuser:null,is_active:null};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&n in t&&(e[n]=t[n]);Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},username:{get:()=>e.username},email:{get:()=>e.email},firstName:{get:()=>e.first_name},lastName:{get:()=>e.last_name},groups:{get:()=>JSON.parse(JSON.stringify(e.groups))},lastLogin:{get:()=>e.last_login},dateJoined:{get:()=>e.date_joined},isStaff:{get:()=>e.is_staff},isSuperuser:{get:()=>e.is_superuser},isActive:{get:()=>e.is_active}}))}}})()},function(t,e,n){n(4),n(8),n(136),n(7),n(45),(()=>{const e=n(23),r=n(17),{getFrame:o}=n(139),{getAnnotations:i,putAnnotations:s,saveAnnotations:a,hasUnsavedChanges:c,mergeAnnotations:u,splitAnnotations:l,groupAnnotations:p,clearAnnotations:f,selectObject:h,annotationsStatistics:d,uploadAnnotations:b,dumpAnnotations:g}=n(147);function m(t){Object.defineProperties(t,{annotations:Object.freeze({value:{async upload(n,r){return await e.apiWrapper.call(this,t.annotations.upload,n,r)},async save(){return await e.apiWrapper.call(this,t.annotations.save)},async clear(n=!1){return await e.apiWrapper.call(this,t.annotations.clear,n)},async dump(n,r){return await e.apiWrapper.call(this,t.annotations.dump,n,r)},async statistics(){return await e.apiWrapper.call(this,t.annotations.statistics)},async put(n=[]){return await e.apiWrapper.call(this,t.annotations.put,n)},async get(n,r={}){return await e.apiWrapper.call(this,t.annotations.get,n,r)},async search(n,r,o){return await e.apiWrapper.call(this,t.annotations.search,n,r,o)},async select(n,r,o){return await e.apiWrapper.call(this,t.annotations.select,n,r,o)},async hasUnsavedChanges(){return await e.apiWrapper.call(this,t.annotations.hasUnsavedChanges)},async merge(n){return await e.apiWrapper.call(this,t.annotations.merge,n)},async split(n,r){return await e.apiWrapper.call(this,t.annotations.split,n,r)},async group(n,r=!1){return await e.apiWrapper.call(this,t.annotations.group,n,r)}},writable:!0}),frames:Object.freeze({value:{async get(n){return await e.apiWrapper.call(this,t.frames.get,n)}},writable:!0}),logs:Object.freeze({value:{async put(n,r){return await e.apiWrapper.call(this,t.logs.put,n,r)},async save(n){return await e.apiWrapper.call(this,t.logs.save,n)}},writable:!0}),actions:Object.freeze({value:{async undo(n){return await e.apiWrapper.call(this,t.actions.undo,n)},async redo(n){return await e.apiWrapper.call(this,t.actions.redo,n)},async clear(){return await e.apiWrapper.call(this,t.actions.clear)}},writable:!0}),events:Object.freeze({value:{async subscribe(n,r){return await e.apiWrapper.call(this,t.events.subscribe,n,r)},async unsubscribe(n,r=null){return await e.apiWrapper.call(this,t.events.unsubscribe,n,r)}},writable:!0})})}class v{constructor(){}}class w extends v{constructor(t){super();const e={id:void 0,assignee:void 0,status:void 0,start_frame:void 0,stop_frame:void 0,task:void 0};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&(n in t&&(e[n]=t[n]),void 0===e[n]))throw new window.cvat.exceptions.ArgumentError(`Job field "${n}" was not initialized`);Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},assignee:{get:()=>e.assignee,set:()=>t=>{if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError("Value must be a non negative integer");e.assignee=t}},status:{get:()=>e.status,set:t=>{const n=window.cvat.enums.TaskStatus;let r=!1;for(const e in n)if(n[e]===t){r=!0;break}if(!r)throw new window.cvat.exceptions.ArgumentError("Value must be a value from the enumeration cvat.enums.TaskStatus");e.status=t}},startFrame:{get:()=>e.start_frame},stopFrame:{get:()=>e.stop_frame},task:{get:()=>e.task}})),this.annotations={get:Object.getPrototypeOf(this).annotations.get.bind(this),put:Object.getPrototypeOf(this).annotations.put.bind(this),save:Object.getPrototypeOf(this).annotations.save.bind(this),dump:Object.getPrototypeOf(this).annotations.dump.bind(this),merge:Object.getPrototypeOf(this).annotations.merge.bind(this),split:Object.getPrototypeOf(this).annotations.split.bind(this),group:Object.getPrototypeOf(this).annotations.group.bind(this),clear:Object.getPrototypeOf(this).annotations.clear.bind(this),upload:Object.getPrototypeOf(this).annotations.upload.bind(this),select:Object.getPrototypeOf(this).annotations.select.bind(this),statistics:Object.getPrototypeOf(this).annotations.statistics.bind(this),hasUnsavedChanges:Object.getPrototypeOf(this).annotations.hasUnsavedChanges.bind(this)},this.frames={get:Object.getPrototypeOf(this).frames.get.bind(this)}}async save(){return await e.apiWrapper.call(this,w.prototype.save)}}m(w.prototype),w.prototype.save.implementation=async function(){if(this.id){const t={status:this.status};return await r.jobs.saveJob(this.id,t),this}throw new window.cvat.exceptions.ArgumentError("Can not save job without and id")},w.prototype.frames.get.implementation=async function(t){if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError(`Frame must be a positive integer. Got: "${t}"`);if(t<this.startFrame||t>this.stopFrame)throw new window.cvat.exceptions.ArgumentError(`The frame with number ${t} is out of the job`);return await o(this.task.id,this.task.mode,t)},w.prototype.annotations.get.implementation=async function(t,e){if(t<this.startFrame||t>this.stopFrame)throw new window.cvat.exceptions.ArgumentError(`Frame ${t} does not exist in the job`);return await i(this,t,e)},w.prototype.annotations.save.implementation=async function(t){return await a(this,t)},w.prototype.annotations.merge.implementation=async function(t){return await u(this,t)},w.prototype.annotations.split.implementation=async function(t,e){return await l(this,t,e)},w.prototype.annotations.group.implementation=async function(t,e){return await p(this,t,e)},w.prototype.annotations.hasUnsavedChanges.implementation=function(){return c(this)},w.prototype.annotations.clear.implementation=async function(t){return await f(this,t)},w.prototype.annotations.select.implementation=function(t,e,n){return h(this,t,e,n)},w.prototype.annotations.statistics.implementation=function(){return d(this)},w.prototype.annotations.put.implementation=function(t){return s(this,t)},w.prototype.annotations.upload.implementation=async function(t,e){return await b(this,t,e)},w.prototype.annotations.dump.implementation=async function(t,e){return await g(this,t,e)};class y extends v{constructor(t){super();const e={id:void 0,name:void 0,status:void 0,size:void 0,mode:void 0,owner:void 0,assignee:void 0,created_date:void 0,updated_date:void 0,bug_tracker:void 0,overlap:void 0,segment_size:void 0,z_order:void 0,image_quality:void 0};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&n in t&&(e[n]=t[n]);if(e.labels=[],e.jobs=[],e.files=Object.freeze({server_files:[],client_files:[],remote_files:[]}),Array.isArray(t.segments))for(const n of t.segments)if(Array.isArray(n.jobs))for(const t of n.jobs){const r=new window.cvat.classes.Job({url:t.url,id:t.id,assignee:t.assignee,status:t.status,start_frame:n.start_frame,stop_frame:n.stop_frame,task:this});e.jobs.push(r)}if(Array.isArray(t.labels))for(const n of t.labels){const t=new window.cvat.classes.Label(n);e.labels.push(t)}Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},name:{get:()=>e.name,set:t=>{if(!t.trim().length)throw new window.cvat.exceptions.ArgumentError("Value must not be empty");e.name=t}},status:{get:()=>e.status},size:{get:()=>e.size},mode:{get:()=>e.mode},owner:{get:()=>e.owner},assignee:{get:()=>e.assignee,set:()=>t=>{if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError("Value must be a non negative integer");e.assignee=t}},createdDate:{get:()=>e.created_date},updatedDate:{get:()=>e.updated_date},bugTracker:{get:()=>e.bug_tracker,set:t=>{e.bug_tracker=t}},overlap:{get:()=>e.overlap,set:t=>{if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError("Value must be a non negative integer");e.overlap=t}},segmentSize:{get:()=>e.segment_size,set:t=>{if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError("Value must be a positive integer");e.segment_size=t}},zOrder:{get:()=>e.z_order,set:t=>{if("boolean"!=typeof t)throw new window.cvat.exceptions.ArgumentError("Value must be a boolean");e.z_order=t}},imageQuality:{get:()=>e.image_quality,set:t=>{if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError("Value must be a positive integer");e.image_quality=t}},labels:{get:()=>[...e.labels],set:t=>{if(!Array.isArray(t))throw new window.cvat.exceptions.ArgumentError("Value must be an array of Labels");for(const e of t)if(!(e instanceof window.cvat.classes.Label))throw new window.cvat.exceptions.ArgumentError("Each array value must be an instance of Label. "+`${typeof e} was found`);void 0===e.id?e.labels=[...t]:e.labels=e.labels.concat([...t])}},jobs:{get:()=>[...e.jobs]},serverFiles:{get:()=>[...e.files.server_files],set:t=>{if(!Array.isArray(t))throw new window.cvat.exceptions.ArgumentError(`Value must be an array. But ${typeof t} has been got.`);for(const e of t)if("string"!=typeof e)throw new window.cvat.exceptions.ArgumentError(`Array values must be a string. But ${typeof e} has been got.`);Array.prototype.push.apply(e.files.server_files,t)}},clientFiles:{get:()=>[...e.files.client_files],set:t=>{if(!Array.isArray(t))throw new window.cvat.exceptions.ArgumentError(`Value must be an array. But ${typeof t} has been got.`);for(const e of t)if(!(e instanceof window.File))throw new window.cvat.exceptions.ArgumentError(`Array values must be a File. But ${e.constructor.name} has been got.`);Array.prototype.push.apply(e.files.client_files,t)}},remoteFiles:{get:()=>[...e.files.remote_files],set:t=>{if(!Array.isArray(t))throw new window.cvat.exceptions.ArgumentError(`Value must be an array. But ${typeof t} has been got.`);for(const e of t)if("string"!=typeof e)throw new window.cvat.exceptions.ArgumentError(`Array values must be a string. But ${typeof e} has been got.`);Array.prototype.push.apply(e.files.remote_files,t)}}})),this.annotations={get:Object.getPrototypeOf(this).annotations.get.bind(this),put:Object.getPrototypeOf(this).annotations.put.bind(this),save:Object.getPrototypeOf(this).annotations.save.bind(this),dump:Object.getPrototypeOf(this).annotations.dump.bind(this),merge:Object.getPrototypeOf(this).annotations.merge.bind(this),split:Object.getPrototypeOf(this).annotations.split.bind(this),group:Object.getPrototypeOf(this).annotations.group.bind(this),clear:Object.getPrototypeOf(this).annotations.clear.bind(this),upload:Object.getPrototypeOf(this).annotations.upload.bind(this),select:Object.getPrototypeOf(this).annotations.select.bind(this),statistics:Object.getPrototypeOf(this).annotations.statistics.bind(this),hasUnsavedChanges:Object.getPrototypeOf(this).annotations.hasUnsavedChanges.bind(this)},this.frames={get:Object.getPrototypeOf(this).frames.get.bind(this)}}async save(t=(()=>{})){return await e.apiWrapper.call(this,y.prototype.save,t)}async delete(){return await e.apiWrapper.call(this,y.prototype.delete)}}m(y.prototype),y.prototype.save.implementation=async function(t){if(void 0!==this.id){const t={name:this.name,bug_tracker:this.bugTracker,z_order:this.zOrder,labels:[...this.labels.map(t=>t.toJSON())]};return await r.tasks.saveTask(this.id,t),this}const e={name:this.name,labels:this.labels.map(t=>t.toJSON()),image_quality:this.imageQuality,z_order:Boolean(this.zOrder)};this.bugTracker&&(e.bug_tracker=this.bugTracker),this.segmentSize&&(e.segment_size=this.segmentSize),this.overlap&&(e.overlap=this.overlap);const n={client_files:this.clientFiles,server_files:this.serverFiles,remote_files:this.remoteFiles},o=await r.tasks.createTask(e,n,t);return new y(o)},y.prototype.delete.implementation=async function(){return await r.tasks.deleteTask(this.id)},y.prototype.frames.get.implementation=async function(t){if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError(`Frame must be a positive integer. Got: "${t}"`);if(t>=this.size)throw new window.cvat.exceptions.ArgumentError(`The frame with number ${t} is out of the task`);return await o(this.id,this.mode,t)},y.prototype.annotations.get.implementation=async function(t,e){if(!Number.isInteger(t)||t<0)throw new window.cvat.exceptions.ArgumentError(`Frame must be a positive integer. Got: "${t}"`);if(t>=this.size)throw new window.cvat.exceptions.ArgumentError(`Frame ${t} does not exist in the task`);return await i(this,t,e)},y.prototype.annotations.save.implementation=async function(t){return await a(this,t)},y.prototype.annotations.merge.implementation=async function(t){return await u(this,t)},y.prototype.annotations.split.implementation=async function(t,e){return await l(this,t,e)},y.prototype.annotations.group.implementation=async function(t,e){return await p(this,t,e)},y.prototype.annotations.hasUnsavedChanges.implementation=function(){return c(this)},y.prototype.annotations.clear.implementation=async function(t){return await f(this,t)},y.prototype.annotations.select.implementation=function(t,e,n){return h(this,t,e,n)},y.prototype.annotations.statistics.implementation=function(){return d(this)},y.prototype.annotations.put.implementation=function(t){return s(this,t)},y.prototype.annotations.upload.implementation=async function(t,e){return await b(this,t,e)},y.prototype.annotations.dump.implementation=async function(t,e){return await g(this,t,e)},t.exports={Job:w,Task:y}})()},function(t,e,n){"use strict";var r=n(12),o=n(137).trim;r({target:"String",proto:!0,forced:n(138)("trim")},{trim:function(){return o(this)}})},function(t,e,n){var r=n(18),o="["+n(79)+"]",i=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),a=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:a(1),end:a(2),trim:a(3)}},function(t,e,n){var r=n(2),o=n(79);t.exports=function(t){return r(function(){return!!o[t]()||"
"!="
"[t]()||o[t].name!==t})}},function(t,e,n){(function(e){n(4),n(8),n(7),n(80),(()=>{const r=n(23),o=n(17),i={},s={};class a{constructor(t,e,n,r){Object.defineProperties(this,Object.freeze({width:{value:t,writable:!1},height:{value:e,writable:!1},tid:{value:n,writable:!1},number:{value:r,writable:!1}}))}async data(){return await r.apiWrapper.call(this,a.prototype.data)}}a.prototype.data.implementation=async function(){if(!(this.number in s[this.tid])){const t=await o.frames.getData(this.tid,this.number);if(window.URL.createObjectURL){const e=window.URL.createObjectURL(new Blob([t]));s[this.tid][this.number]=e}else s[this.tid][this.number]=e.Buffer.from(t,"binary").toString("base64")}return s[this.tid][this.number]},t.exports={FrameData:a,getFrame:async function(t,e,n){if(t in i||(i[t]={},i[t].meta=await o.frames.getMeta(t),s[t]={}),!(n in i[t])){let r=null;if("interpolation"===e)[r]=i[t].meta;else{if("annotation"!==e)throw new window.cvat.exceptions.ArgumentError(`Invalid mode is specified ${e}`);if(n>=i[t].meta.length)throw new window.cvat.exceptions.ArgumentError(`Meta information about frame ${n} can't be received from the server`);r=i[t].meta[n]}i[t][n]=new a(r.width,r.height,t,n)}return i[t][n]}}})()}).call(this,n(34))},function(t,e,n){"use strict";var r=n(43).charAt,o=n(16),i=n(66),s=o.set,a=o.getterFor("String Iterator");i(String,"String",function(t){s(this,{type:"String Iterator",string:String(t),index:0})},function(){var t,e=a(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(9),o=n(2),i=n(65),s=n(54),a=n(46),c=n(24),u=n(47),l=Object.assign;t.exports=!l||o(function(){var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||"abcdefghijklmnopqrst"!=i(l({},e)).join("")})?function(t,e){for(var n=c(t),o=arguments.length,l=1,p=s.f,f=a.f;o>l;)for(var h,d=u(arguments[l++]),b=p?i(d).concat(p(d)):i(d),g=b.length,m=0;g>m;)h=b[m++],r&&!f.call(d,h)||(n[h]=d[h]);return n}:l},function(t,e,n){"use strict";var r=n(31),o=n(24),i=n(58),s=n(57),a=n(29),c=n(143),u=n(32);t.exports=function(t){var e,n,l,p,f=o(t),h="function"==typeof this?this:Array,d=arguments.length,b=d>1?arguments[1]:void 0,g=void 0!==b,m=0,v=u(f);if(g&&(b=r(b,d>2?arguments[2]:void 0,2)),null==v||h==Array&&s(v))for(n=new h(e=a(f.length));e>m;m++)c(n,m,g?b(f[m],m):f[m]);else for(p=v.call(f),n=new h;!(l=p.next()).done;m++)c(n,m,g?i(p,b,[l.value,m],!0):l.value);return n.length=m,n}},function(t,e,n){"use strict";var r=n(36),o=n(13),i=n(25);t.exports=function(t,e,n){var s=r(e);s in t?o.f(t,s,i(0,n)):t[s]=n}},function(t,e,n){"use strict";var r=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",s=Math.floor,a=String.fromCharCode,c=function(t){return t+22+75*(t<26)},u=function(t,e,n){var r=0;for(t=n?s(t/700):t>>1,t+=s(t/e);t>455;r+=36)t=s(t/35);return s(r+36*t/(t+38))},l=function(t){var e,n,r=[],o=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=t.charCodeAt(n++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),n--)}else e.push(o)}return e}(t)).length,l=128,p=0,f=72;for(e=0;e<t.length;e++)(n=t[e])<128&&r.push(a(n));var h=r.length,d=h;for(h&&r.push("-");d<o;){var b=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=l&&n<b&&(b=n);var g=d+1;if(b-l>s((2147483647-p)/g))throw RangeError(i);for(p+=(b-l)*g,l=b,e=0;e<t.length;e++){if((n=t[e])<l&&++p>2147483647)throw RangeError(i);if(n==l){for(var m=p,v=36;;v+=36){var w=v<=f?1:v>=f+26?26:v-f;if(m<w)break;var y=m-w,x=36-w;r.push(a(c(w+y%x))),m=s(y/x)}r.push(a(c(m))),f=u(p,g,d==h),p=0,++d}}++p,++l}return r.join("")};t.exports=function(t){var e,n,i=[],s=t.toLowerCase().replace(o,".").split(".");for(e=0;e<s.length;e++)n=s[e],i.push(r.test(n)?"xn--"+l(n):n);return i.join(".")}},function(t,e,n){"use strict";n(4);var r=n(12),o=n(81),i=n(15),s=n(56),a=n(20),c=n(67),u=n(16),l=n(42),p=n(6),f=n(31),h=n(3),d=n(10),b=n(146),g=n(32),m=n(1)("iterator"),v=u.set,w=u.getterFor("URLSearchParams"),y=u.getterFor("URLSearchParamsIterator"),x=/\+/g,O=Array(4),j=function(t){return O[t-1]||(O[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},k=function(t){try{return decodeURIComponent(t)}catch(e){return t}},S=function(t){var e=t.replace(x," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(j(n--),k);return e}},E=/[!'()~]|%20/g,A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},T=function(t){return A[t]},I=function(t){return encodeURIComponent(t).replace(E,T)},P=function(t,e){if(e)for(var n,r,o=e.split("&"),i=0;i<o.length;)(n=o[i++]).length&&(r=n.split("="),t.push({key:S(r.shift()),value:S(r.join("="))}))},C=function(t){this.entries.length=0,P(this.entries,t)},F=function(t,e){if(t<e)throw TypeError("Not enough arguments")},_=c(function(t,e){v(this,{type:"URLSearchParamsIterator",iterator:b(w(t).entries),kind:e})},"Iterator",function(){var t=y(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),N=function(){l(this,N,"URLSearchParams");var t,e,n,r,o,i,s,a=arguments.length>0?arguments[0]:void 0,c=[];if(v(this,{type:"URLSearchParams",entries:c,updateURL:function(){},updateSearchParams:C}),void 0!==a)if(d(a))if("function"==typeof(t=g(a)))for(e=t.call(a);!(n=e.next()).done;){if((o=(r=b(h(n.value))).next()).done||(i=r.next()).done||!r.next().done)throw TypeError("Expected sequence with length 2");c.push({key:o.value+"",value:i.value+""})}else for(s in a)p(a,s)&&c.push({key:s,value:a[s]+""});else P(c,"string"==typeof a?"?"===a.charAt(0)?a.slice(1):a:a+"")},M=N.prototype;s(M,{append:function(t,e){F(arguments.length,2);var n=w(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){F(arguments.length,1);for(var e=w(this),n=e.entries,r=t+"",o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;e.updateURL()},get:function(t){F(arguments.length,1);for(var e=w(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){F(arguments.length,1);for(var e=w(this).entries,n=t+"",r=[],o=0;o<e.length;o++)e[o].key===n&&r.push(e[o].value);return r},has:function(t){F(arguments.length,1);for(var e=w(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){F(arguments.length,1);for(var n,r=w(this),o=r.entries,i=!1,s=t+"",a=e+"",c=0;c<o.length;c++)(n=o[c]).key===s&&(i?o.splice(c--,1):(i=!0,n.value=a));i||o.push({key:s,value:a}),r.updateURL()},sort:function(){var t,e,n,r=w(this),o=r.entries,i=o.slice();for(o.length=0,n=0;n<i.length;n++){for(t=i[n],e=0;e<n;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===n&&o.push(t)}r.updateURL()},forEach:function(t){for(var e,n=w(this).entries,r=f(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((e=n[o++]).value,e.key,this)},keys:function(){return new _(this,"keys")},values:function(){return new _(this,"values")},entries:function(){return new _(this,"entries")}},{enumerable:!0}),i(M,m,M.entries),i(M,"toString",function(){for(var t,e=w(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(I(t.key)+"="+I(t.value));return n.join("&")},{enumerable:!0}),a(N,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:N}),t.exports={URLSearchParams:N,getState:w}},function(t,e,n){var r=n(3),o=n(32);t.exports=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},function(t,e,n){n(4),n(8),n(7),(()=>{const e=n(17),r=n(148),o=n(151),{checkObjectType:i}=n(33),s=new WeakMap,a=new WeakMap;function c(t){if("task"===t)return a;if("job"===t)return s;throw new window.cvat.exceptions.ScriptingError(`Unknown session type was received ${t}`)}async function u(t){const n=t instanceof window.cvat.classes.Task?"task":"job",i=c(n);if(!i.has(t)){const s=await e.annotations.getAnnotations(n,t.id),a="job"===n?t.startFrame:0,c="job"===n?t.stopFrame:t.size-1,u={};for(let e=a;e<=c;e++)u[e]=await t.frames.get(e);const l=new r({labels:t.labels||t.task.labels,startFrame:a,stopFrame:c,frameMeta:u}).import(s),p=new o(s.version,l,t);i.set(t,{collection:l,saver:p})}}t.exports={getAnnotations:async function(t,e,n){return await u(t),c(t instanceof window.cvat.classes.Task?"task":"job").get(t).collection.get(e,n)},putAnnotations:function(t,e){const n=c(t instanceof window.cvat.classes.Task?"task":"job");if(n.has(t))return n.get(t).collection.put(e);throw new window.cvat.exceptions.DataError("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},saveAnnotations:async function(t,e){const n=c(t instanceof window.cvat.classes.Task?"task":"job");n.has(t)&&await n.get(t).saver.save(e)},hasUnsavedChanges:function(t){const e=c(t instanceof window.cvat.classes.Task?"task":"job");return!!e.has(t)&&e.get(t).saver.hasUnsavedChanges()},mergeAnnotations:function(t,e){const n=c(t instanceof window.cvat.classes.Task?"task":"job");if(n.has(t))return n.get(t).collection.merge(e);throw new window.cvat.exceptions.DataError("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},splitAnnotations:function(t,e,n){const r=c(t instanceof window.cvat.classes.Task?"task":"job");if(r.has(t))return r.get(t).collection.split(e,n);throw new window.cvat.exceptions.DataError("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},groupAnnotations:function(t,e,n){const r=c(t instanceof window.cvat.classes.Task?"task":"job");if(r.has(t))return r.get(t).collection.group(e,n);throw new window.cvat.exceptions.DataError("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},clearAnnotations:async function(t,e){i("reload",e,"boolean",null);const n=c(t instanceof window.cvat.classes.Task?"task":"job");n.has(t)&&n.get(t).collection.clear(),e&&(n.delete(t),await u(t))},annotationsStatistics:function(t){const e=c(t instanceof window.cvat.classes.Task?"task":"job");if(e.has(t))return e.get(t).collection.statistics();throw new window.cvat.exceptions.DataError("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},selectObject:function(t,e,n,r){const o=c(t instanceof window.cvat.classes.Task?"task":"job");if(o.has(t))return o.get(t).collection.select(e,n,r);throw new window.cvat.exceptions.DataError("Collection has not been initialized yet. Call annotations.get() or annotations.clear(true) before")},uploadAnnotations:async function(t,n,r){const o=t instanceof window.cvat.classes.Task?"task":"job";await e.annotations.uploadAnnotations(o,t.id,n,r)},dumpAnnotations:async function(t,n,r){const o=t instanceof window.cvat.classes.Task?"task":"job";return await e.annotations.dumpAnnotations(o,t.id,n,r)}}})()},function(t,e,n){n(4),n(82),n(7),n(45),(()=>{const{RectangleShape:e,PolygonShape:r,PolylineShape:o,PointsShape:i,RectangleTrack:s,PolygonTrack:a,PolylineTrack:c,PointsTrack:u,Track:l,Shape:p,Tag:f,objectStateFactory:h}=n(150),{checkObjectType:d}=n(33),b=n(78),g=["#0066FF","#AF593E","#01A368","#FF861F","#ED0A3F","#FF3F34","#76D7EA","#8359A3","#FBE870","#C5E17A","#03BB85","#FFDF00","#8B8680","#0A6B0D","#8FD8D8","#A36F40","#F653A6","#CA3435","#FFCBA4","#FF99CC","#FA9D5A","#FFAE42","#A78B00","#788193","#514E49","#1164B4","#F4FA9F","#FED8B1","#C32148","#01796F","#E90067","#FF91A4","#404E5A","#6CDAE7","#FFC1CC","#006A93","#867200","#E2B631","#6EEB6E","#FFC800","#CC99BA","#FF007C","#BC6CAC","#DCCCD7","#EBE1C2","#A6AAAE","#B99685","#0086A7","#5E4330","#C8A2C8","#708EB3","#BC8777","#B2592D","#497E48","#6A2963","#E6335F","#00755E","#B5A895","#0048ba","#EED9C4","#C88A65","#FF6E4A","#87421F","#B2BEB5","#926F5B","#00B9FB","#6456B7","#DB5079","#C62D42","#FA9C44","#DA8A67","#FD7C6E","#93CCEA","#FCF686","#503E32","#FF5470","#9DE093","#FF7A00","#4F69C6","#A50B5E","#F0E68C","#FDFF00","#F091A9","#FFFF66","#6F9940","#FC74FD","#652DC1","#D6AEDD","#EE34D2","#BB3385","#6B3FA0","#33CC99","#FFDB00","#87FF2A","#6EEB6E","#FFC800","#CC99BA","#7A89B8","#006A93","#867200","#E2B631","#D9D6CF"];function m(t,n,s){const{type:a}=t,c=g[n%g.length];let u=null;switch(a){case"rectangle":u=new e(t,n,c,s);break;case"polygon":u=new r(t,n,c,s);break;case"polyline":u=new o(t,n,c,s);break;case"points":u=new i(t,n,c,s);break;default:throw new window.cvat.exceptions.DataError(`An unexpected type of shape "${a}"`)}return u}function v(t,e,n){if(t.shapes.length){const{type:r}=t.shapes[0],o=g[e%g.length];let i=null;switch(r){case"rectangle":i=new s(t,e,o,n);break;case"polygon":i=new a(t,e,o,n);break;case"polyline":i=new c(t,e,o,n);break;case"points":i=new u(t,e,o,n);break;default:throw new window.cvat.exceptions.DataError(`An unexpected type of track "${r}"`)}return i}return console.warn("The track without any shapes had been found. It was ignored."),null}t.exports=class{constructor(t){this.startFrame=t.startFrame,this.stopFrame=t.stopFrame,this.frameMeta=t.frameMeta,this.labels=t.labels.reduce((t,e)=>(t[e.id]=e,t),{}),this.shapes={},this.tags={},this.tracks=[],this.objects={},this.count=0,this.flush=!1,this.collectionZ={},this.groups={max:0},this.injection={labels:this.labels,collectionZ:this.collectionZ,groups:this.groups,frameMeta:this.frameMeta}}import(t){for(const e of t.tags){const t=++this.count,n=new f(e,t,this.injection);this.tags[n.frame]=this.tags[n.frame]||[],this.tags[n.frame].push(n),this.objects[t]=n}for(const e of t.shapes){const t=++this.count,n=m(e,t,this.injection);this.shapes[n.frame]=this.shapes[n.frame]||[],this.shapes[n.frame].push(n),this.objects[t]=n}for(const e of t.tracks){const t=++this.count,n=v(e,t,this.injection);n&&(this.tracks.push(n),this.objects[t]=n)}return this}export(){return{tracks:this.tracks.filter(t=>!t.removed).map(t=>t.toJSON()),shapes:Object.values(this.shapes).reduce((t,e)=>(t.push(...e),t),[]).filter(t=>!t.removed).map(t=>t.toJSON()),tags:Object.values(this.tags).reduce((t,e)=>(t.push(...e),t),[]).filter(t=>!t.removed).map(t=>t.toJSON())}}get(t){const{tracks:e}=this,n=this.shapes[t]||[],r=this.tags[t]||[],o=e.concat(n).concat(r).filter(t=>!t.removed),i=[];for(const e of o){const n=e.get(t);if(n.outside&&!n.keyframe)continue;const r=h.call(e,t,n);i.push(r)}return i}merge(t){if(d("shapes for merge",t,null,Array),!t.length)return;const e=t.map(t=>{d("object state",t,null,window.cvat.classes.ObjectState);const e=this.objects[t.clientID];if(void 0===e)throw new window.cvat.exceptions.ArgumentError("The object has not been saved yet. Call ObjectState.put([state]) before you can merge it");return e}),n={},{label:r,shapeType:o}=t[0];if(!(r.id in this.labels))throw new window.cvat.exceptions.ArgumentError(`Unknown label for the task: ${r.id}`);if(!Object.values(window.cvat.enums.ObjectShape).includes(o))throw new window.cvat.exceptions.ArgumentError(`Got unknown shapeType "${o}"`);const i=r.attributes.reduce((t,e)=>(t[e.id]=e,t),{});for(let s=0;s<e.length;s++){const a=e[s],c=t[s];if(c.label.id!==r.id)throw new window.cvat.exceptions.ArgumentError(`All shape labels are expected to be ${r.name}, but got ${c.label.name}`);if(c.shapeType!==o)throw new window.cvat.exceptions.ArgumentError(`All shapes are expected to be ${o}, but got ${c.shapeType}`);if(a instanceof p){if(a.frame in n&&!n[a.frame].outside)throw new window.cvat.exceptions.ArgumentError("Expected only one visible shape per frame");n[a.frame]={type:o,frame:a.frame,points:[...a.points],occluded:a.occluded,zOrder:a.zOrder,outside:!1,attributes:Object.keys(a.attributes).reduce((t,e)=>(e in i&&i[e].mutable&&t.push({spec_id:+e,value:a.attributes[e]}),t),[])},a.frame+1 in n||(n[a.frame+1]=JSON.parse(JSON.stringify(n[a.frame])),n[a.frame+1].outside=!0,n[a.frame+1].frame++)}else{if(!(a instanceof l))throw new window.cvat.exceptions.ArgumentError(`Trying to merge unknown object type: ${a.constructor.name}. `+"Only shapes and tracks are expected.");{const t={};for(const e of Object.keys(a.shapes)){const r=a.shapes[e];if(e in n&&!n[e].outside){if(r.outside)continue;throw new window.cvat.exceptions.ArgumentError("Expected only one visible shape per frame")}let i=!1;for(const e in r.attributes)e in t&&t[e]===r.attributes[e]||(i=!0,t[e]=r.attributes[e]);n[e]={type:o,frame:+e,points:[...r.points],occluded:r.occluded,outside:r.outside,zOrder:r.zOrder,attributes:i?Object.keys(t).reduce((e,n)=>(e.push({spec_id:+n,value:t[n]}),e),[]):[]}}}}}let s=!1;for(const t of Object.keys(n).sort((t,e)=>+t-+e)){if((s=s||n[t].outside)||!n[t].outside)break;delete n[t]}const a=++this.count,c=v({frame:Math.min.apply(null,Object.keys(n).map(t=>+t)),shapes:Object.values(n),group:0,label_id:r.id,attributes:Object.keys(t[0].attributes).reduce((e,n)=>(i[n].mutable||e.push({spec_id:+n,value:t[0].attributes[n]}),e),[])},a,this.injection);this.tracks.push(c),this.objects[a]=c;for(const t of e)t.removed=!0,"function"==typeof t.resetCache&&t.resetCache()}split(t,e){d("object state",t,null,window.cvat.classes.ObjectState),d("frame",e,"integer",null);const n=this.objects[t.clientID];if(void 0===n)throw new window.cvat.exceptions.ArgumentError("The object has not been saved yet. Call annotations.put([state]) before");if(t.objectType!==window.cvat.enums.ObjectType.TRACK)return;const r=Object.keys(n.shapes).sort((t,e)=>+t-+e);if(e<=+r[0]||e>r[r.length-1])return;const o=n.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{}),i=n.toJSON(),s={type:t.shapeType,points:[...t.points],occluded:t.occluded,outside:t.outside,zOrder:0,attributes:Object.keys(t.attributes).reduce((e,n)=>(o[n].mutable||e.push({spec_id:+n,value:t.attributes[n]}),e),[]),frame:e},a={frame:i.frame,group:0,label_id:i.label_id,attributes:i.attributes,shapes:[]},c=JSON.parse(JSON.stringify(a));c.frame=e,c.shapes.push(JSON.parse(JSON.stringify(s))),i.shapes.map(t=>(delete t.id,t.frame<e?a.shapes.push(JSON.parse(JSON.stringify(t))):t.frame>e&&c.shapes.push(JSON.parse(JSON.stringify(t))),t)),a.shapes.push(s),a.shapes[a.shapes.length-1].outside=!0;let u=++this.count;const l=v(a,u,this.injection);this.tracks.push(l),this.objects[u]=l,u=++this.count;const p=v(c,u,this.injection);this.tracks.push(p),this.objects[u]=p,n.removed=!0,n.resetCache()}group(t,e){d("shapes for group",t,null,Array);const n=t.map(t=>{d("object state",t,null,window.cvat.classes.ObjectState);const e=this.objects[t.clientID];if(void 0===e)throw new window.cvat.exceptions.ArgumentError("The object has not been saved yet. Call annotations.put([state]) before");return e}),r=e?0:++this.groups.max;for(const t of n)t.group=r,"function"==typeof t.resetCache&&t.resetCache();return r}clear(){this.shapes={},this.tags={},this.tracks=[],this.objects={},this.count=0,this.flush=!0}statistics(){const t={},e={rectangle:{shape:0,track:0},polygon:{shape:0,track:0},polyline:{shape:0,track:0},points:{shape:0,track:0},tags:0,manually:0,interpolated:0,total:0},n=JSON.parse(JSON.stringify(e));for(const n of Object.values(this.labels)){const{name:r}=n;t[r]=JSON.parse(JSON.stringify(e))}for(const e of Object.values(this.objects)){let n=null;if(e instanceof p)n="shape";else if(e instanceof l)n="track";else{if(!(e instanceof f))throw new window.cvat.exceptions.ScriptingError(`Unexpected object type: "${n}"`);n="tag"}const r=e.label.name;if("tag"===n)t[r].tags++,t[r].manually++,t[r].total++;else{const{shapeType:o}=e;if(t[r][o][n]++,"track"===n){const n=Object.keys(e.shapes).sort((t,e)=>+t-+e).map(t=>+t);let o=n[0],i=!1;for(const s of n){if(i){const e=s-o-1;t[r].interpolated+=e,t[r].total+=e}i=!e.shapes[s].outside,o=s,i&&(t[r].manually++,t[r].total++)}const s=n[n.length-1];if(s!==this.stopFrame&&!e.shapes[s].outside){const e=this.stopFrame-s;t[r].interpolated+=e,t[r].total+=e}}else t[r].manually++,t[r].total++}}for(const e of Object.keys(t))for(const r of Object.keys(t[e]))if("object"==typeof t[e][r])for(const o of Object.keys(t[e][r]))n[r][o]+=t[e][r][o];else n[r]+=t[e][r];return new b(t,n)}put(t){d("shapes for put",t,null,Array);const e={shapes:[],tracks:[],tags:[]};function n(t,e){const n=+e,r=this.attributes[e];return d("attribute id",n,"integer",null),d("attribute value",r,"string",null),t.push({spec_id:n,value:r}),t}for(const r of t){d("object state",r,null,window.cvat.classes.ObjectState),d("state client ID",r.clientID,"undefined",null),d("state frame",r.frame,"integer",null),d("state attributes",r.attributes,null,Object),d("state label",r.label,null,window.cvat.classes.Label);const t=Object.keys(r.attributes).reduce(n.bind(r),[]),o=r.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});if("tag"===r.objectType)e.tags.push({attributes:t,frame:r.frame,label_id:r.label.id,group:0});else{d("state occluded",r.occluded,"boolean",null),d("state points",r.points,null,Array);for(const t of r.points)d("point coordinate",t,"number",null);if(!Object.values(window.cvat.enums.ObjectShape).includes(r.shapeType))throw new window.cvat.exceptions.ArgumentError("Object shape must be one of: "+`${JSON.stringify(Object.values(window.cvat.enums.ObjectShape))}`);if("shape"===r.objectType)e.shapes.push({attributes:t,frame:r.frame,group:0,label_id:r.label.id,occluded:r.occluded||!1,points:[...r.points],type:r.shapeType,z_order:0});else{if("track"!==r.objectType)throw new window.cvat.exceptions.ArgumentError("Object type must be one of: "+`${JSON.stringify(Object.values(window.cvat.enums.ObjectType))}`);e.tracks.push({attributes:t.filter(t=>!o[t.spec_id].mutable),frame:r.frame,group:0,label_id:r.label.id,shapes:[{attributes:t.filter(t=>o[t.spec_id].mutable),frame:r.frame,occluded:r.occluded||!1,outside:!1,points:[...r.points],type:r.shapeType,z_order:0}]})}}}this.import(e)}select(t,e,n){d("shapes for select",t,null,Array),d("x coordinate",e,"number",null),d("y coordinate",n,"number",null);let r=null,o=null;for(const i of t){if(d("object state",i,null,window.cvat.classes.ObjectState),i.outside)continue;const t=this.objects[i.clientID];if(void 0===t)throw new window.cvat.exceptions.ArgumentError("The object has not been saved yet. Call annotations.put([state]) before");const s=t.constructor.distance(i.points,e,n);null!==s&&(null===r||s<r)&&(r=s,o=i)}return{state:o,distance:r}}}})()},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){var n=[][t];return!n||!r(function(){n.call(null,e||function(){throw 1},1)})}},function(t,e,n){n(4),n(82),n(7),(()=>{const e=n(77),{checkObjectType:r}=n(33);function o(t,n){const r=new e(n);return r.hidden={save:this.save.bind(this,t,r),delete:this.delete.bind(this),up:this.up.bind(this,t,r),down:this.down.bind(this,t,r)},r}function i(t,e){if(t===window.cvat.enums.ObjectShape.RECTANGLE){if(e.length/2!=2)throw new window.cvat.exceptions.DataError(`Rectangle must have 2 points, but got ${e.length/2}`)}else if(t===window.cvat.enums.ObjectShape.POLYGON){if(e.length/2<3)throw new window.cvat.exceptions.DataError(`Polygon must have at least 3 points, but got ${e.length/2}`)}else if(t===window.cvat.enums.ObjectShape.POLYLINE){if(e.length/2<2)throw new window.cvat.exceptions.DataError(`Polyline must have at least 2 points, but got ${e.length/2}`)}else{if(t!==window.cvat.enums.ObjectShape.POINTS)throw new window.cvat.exceptions.ArgumentError(`Unknown value of shapeType has been recieved ${t}`);if(e.length/2<1)throw new window.cvat.exceptions.DataError(`Points must have at least 1 points, but got ${e.length/2}`)}}function s(t,e){if(t===window.cvat.enums.ObjectShape.POINTS)return!0;let n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER;for(let t=0;t<e.length-1;t+=2)n=Math.min(n,e[t]),r=Math.max(r,e[t]),o=Math.min(o,e[t+1]),i=Math.max(i,e[t+1]);if(t===window.cvat.enums.ObjectShape.POLYLINE){return Math.max(r-n,i-o)>=3}return(r-n)*(i-o)>=9}function a(t,e){const{values:n}=e,r=e.inputType;if("string"!=typeof t)throw new window.cvat.exceptions.ArgumentError(`Attribute value is expected to be string, but got ${typeof t}`);return r===window.cvat.enums.AttributeType.NUMBER?+t>=+n[0]&&+t<=+n[1]&&!((+t-+n[0])%+n[2]):r===window.cvat.enums.AttributeType.CHECKBOX?["true","false"].includes(t.toLowerCase()):n.includes(t)}class c{constructor(t,e,n){this.taskLabels=n.labels,this.clientID=e,this.serverID=t.id,this.group=t.group,this.label=this.taskLabels[t.label_id],this.frame=t.frame,this.removed=!1,this.lock=!1,this.attributes=t.attributes.reduce((t,e)=>(t[e.spec_id]=e.value,t),{}),this.appendDefaultAttributes(this.label),n.groups.max=Math.max(n.groups.max,this.group)}appendDefaultAttributes(t){const e=t.attributes;for(const t of e)t.id in this.attributes||(this.attributes[t.id]=t.defaultValue)}delete(t){return this.lock&&!t||(this.removed=!0),!0}}class u extends c{constructor(t,e,n,r){super(t,e,r),this.frameMeta=r.frameMeta,this.collectionZ=r.collectionZ,this.color=n,this.shapeType=null}_getZ(t){return this.collectionZ[t]=this.collectionZ[t]||{max:0,min:0},this.collectionZ[t]}save(){throw new window.cvat.exceptions.ScriptingError("Is not implemented")}get(){throw new window.cvat.exceptions.ScriptingError("Is not implemented")}toJSON(){throw new window.cvat.exceptions.ScriptingError("Is not implemented")}up(t,e){const n=this._getZ(t);n.max++,e.zOrder=n.max}down(t,e){const n=this._getZ(t);n.min--,e.zOrder=n.min}}class l extends u{constructor(t,e,n,r){super(t,e,n,r),this.points=t.points,this.occluded=t.occluded,this.zOrder=t.z_order;const o=this._getZ(this.frame);o.max=Math.max(o.max,this.zOrder||0),o.min=Math.min(o.min,this.zOrder||0)}toJSON(){return{type:this.shapeType,clientID:this.clientID,occluded:this.occluded,z_order:this.zOrder,points:[...this.points],attributes:Object.keys(this.attributes).reduce((t,e)=>(t.push({spec_id:e,value:this.attributes[e]}),t),[]),id:this.serverID,frame:this.frame,label_id:this.label.id,group:this.group}}get(t){if(t!==this.frame)throw new window.cvat.exceptions.ScriptingError("Got frame is not equal to the frame of the shape");return{objectType:window.cvat.enums.ObjectType.SHAPE,shapeType:this.shapeType,clientID:this.clientID,serverID:this.serverID,occluded:this.occluded,lock:this.lock,zOrder:this.zOrder,points:[...this.points],attributes:Object.assign({},this.attributes),label:this.label,group:this.group,color:this.color}}save(t,e){if(t!==this.frame)throw new window.cvat.exceptions.ScriptingError("Got frame is not equal to the frame of the shape");if(this.lock&&e.lock)return o.call(this,t,this.get(t));const n=this.get(t),c=e.updateFlags;if(c.label&&(r("label",e.label,null,window.cvat.classes.Label),n.label=e.label,n.attributes={},this.appendDefaultAttributes.call(n,n.label)),c.attributes){const t=n.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});for(const r of Object.keys(e.attributes)){const o=e.attributes[r];if(!(r in t&&a(o,t[r])))throw new window.cvat.exceptions.ArgumentError(`Trying to save unknown attribute with id ${r} and value ${o}`);n.attributes[r]=o}}if(c.points){r("points",e.points,null,Array),i(this.shapeType,e.points);const{width:o,height:a}=this.frameMeta[t],c=[];for(let t=0;t<e.points.length-1;t+=2){const n=e.points[t],i=e.points[t+1];r("coordinate",n,"number",null),r("coordinate",i,"number",null),c.push(Math.clamp(n,0,o),Math.clamp(i,0,a))}s(this.shapeType,c)&&(n.points=c)}if(c.occluded&&(r("occluded",e.occluded,"boolean",null),n.occluded=e.occluded),c.group&&(r("group",e.group,"integer",null),n.group=e.group),c.zOrder&&(r("zOrder",e.zOrder,"integer",null),n.zOrder=e.zOrder),c.lock&&(r("lock",e.lock,"boolean",null),n.lock=e.lock),c.color){if(r("color",e.color,"string",null),/^#[0-9A-F]{6}$/i.test(e.color))throw new window.cvat.exceptions.ArgumentError(`Got invalid color value: "${e.color}"`);n.color=e.color}c.reset();for(const t of Object.keys(n))t in this&&(this[t]=n[t]);return o.call(this,t,this.get(t))}}class p extends u{constructor(t,e,n,r){super(t,e,n,r),this.shapes=t.shapes.reduce((t,e)=>{t[e.frame]={serverID:e.id,occluded:e.occluded,zOrder:e.z_order,points:e.points,outside:e.outside,attributes:e.attributes.reduce((t,e)=>(t[e.spec_id]=e.value,t),{})};const n=this._getZ(e.frame);return n.max=Math.max(n.max,e.z_order),n.min=Math.min(n.min,e.z_order),t},{}),this.cache={}}toJSON(){const t=this.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});return{clientID:this.clientID,id:this.serverID,frame:this.frame,label_id:this.label.id,group:this.group,attributes:Object.keys(this.attributes).reduce((e,n)=>(t[n].mutable||e.push({spec_id:n,value:this.attributes[n]}),e),[]),shapes:Object.keys(this.shapes).reduce((e,n)=>(e.push({type:this.shapeType,occluded:this.shapes[n].occluded,z_order:this.shapes[n].zOrder,points:[...this.shapes[n].points],outside:this.shapes[n].outside,attributes:Object.keys(this.shapes[n].attributes).reduce((e,r)=>(t[r].mutable&&e.push({spec_id:r,value:this.shapes[n].attributes[r]}),e),[]),id:this.shapes[n].serverID,frame:+n}),e),[])}}get(t){if(!(t in this.cache)){const e=Object.assign({},this.getPosition(t),{attributes:this.getAttributes(t),group:this.group,objectType:window.cvat.enums.ObjectType.TRACK,shapeType:this.shapeType,clientID:this.clientID,serverID:this.serverID,lock:this.lock,color:this.color});this.cache[t]=e}const e=JSON.parse(JSON.stringify(this.cache[t]));return e.label=this.label,e}neighborsFrames(t){const e=Object.keys(this.shapes).map(t=>+t);let n=Number.MAX_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER;for(const o of e){const e=Math.abs(t-o);o<=t&&e<n?n=e:e<r&&(r=e)}return{leftFrame:n===Number.MAX_SAFE_INTEGER?null:t-n,rightFrame:r===Number.MAX_SAFE_INTEGER?null:t+r}}getAttributes(t){const e={};for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e[t]=this.attributes[t]);const n=Object.keys(this.shapes).sort((t,e)=>+t-+e);for(const r of n)if(r<=t){const{attributes:t}=this.shapes[r];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}save(t,e){if(this.lock&&e.lock)return o.call(this,t,this.get(t));const n=Object.assign(this.get(t));n.attributes=Object.assign(n.attributes),n.points=[...n.points];const c=e.updateFlags;let u=!1;c.label&&(r("label",e.label,null,window.cvat.classes.Label),n.label=e.label,n.attributes={},this.appendDefaultAttributes.call(n,n.label));const l=n.label.attributes.reduce((t,e)=>(t[e.id]=e,t),{});if(c.attributes)for(const t of Object.keys(e.attributes)){const r=e.attributes[t];if(!(t in l&&a(r,l[t])))throw new window.cvat.exceptions.ArgumentError(`Trying to save unknown attribute with id ${t} and value ${r}`);n.attributes[t]=r}if(c.points){r("points",e.points,null,Array),i(this.shapeType,e.points);const{width:o,height:a}=this.frameMeta[t],c=[];for(let t=0;t<e.points.length-1;t+=2){const n=e.points[t],i=e.points[t+1];r("coordinate",n,"number",null),r("coordinate",i,"number",null),c.push(Math.clamp(n,0,o),Math.clamp(i,0,a))}s(this.shapeType,c)&&(n.points=c,u=!0)}if(c.occluded&&(r("occluded",e.occluded,"boolean",null),n.occluded=e.occluded,u=!0),c.outside&&(r("outside",e.outside,"boolean",null),n.outside=e.outside,u=!0),c.group&&(r("group",e.group,"integer",null),n.group=e.group),c.zOrder&&(r("zOrder",e.zOrder,"integer",null),n.zOrder=e.zOrder,u=!0),c.lock&&(r("lock",e.lock,"boolean",null),n.lock=e.lock),c.color){if(r("color",e.color,"string",null),/^#[0-9A-F]{6}$/i.test(e.color))throw new window.cvat.exceptions.ArgumentError(`Got invalid color value: "${e.color}"`);n.color=e.color}c.keyframe&&r("keyframe",e.keyframe,"boolean",null);for(const e of Object.keys(n))e in this&&(this[e]=n[e]),this.cache[t][e]=n[e];if(c.attributes)for(const r of Object.keys(n.attributes))l[r].mutable||(this.shapes[t].attributes[r]=e.attributes[r],this.shapes[t].attributes[r]=e.attributes[r]);if(c.label)for(const t of Object.values(this.shapes))t.attributes={};if(c.keyframe&&!e.keyframe){for(const e in this.cache)+e>t&&delete this.cache[e];return this.cache[t].keyframe=!1,delete this.shapes[t],c.reset(),o.call(this,t,this.get(t))}if(u||c.keyframe&&e.keyframe){for(const e in this.cache)+e>t&&delete this.cache[e];if(this.cache[t].keyframe=!0,e.keyframe=!0,this.shapes[t]={frame:t,zOrder:n.zOrder,points:n.points,outside:n.outside,occluded:n.occluded,attributes:{}},c.attributes)for(const r of Object.keys(n.attributes))l[r].mutable&&(this.shapes[t].attributes[r]=e.attributes[r],this.shapes[t].attributes[r]=e.attributes[r])}return c.reset(),o.call(this,t,this.get(t))}getPosition(t){const{leftFrame:e,rightFrame:n}=this.neighborsFrames(t),r=Number.isInteger(n)?this.shapes[n]:null,o=Number.isInteger(e)?this.shapes[e]:null;if(o&&e===t)return{points:[...o.points],occluded:o.occluded,outside:o.outside,zOrder:o.zOrder,keyframe:!0};if(r&&o)return Object.assign({},this.interpolatePosition(o,r,t),{keyframe:!1});if(r)return{points:[...r.points],occluded:r.occluded,outside:!0,zOrder:0,keyframe:!1};if(o)return{points:[...o.points],occluded:o.occluded,outside:o.outside,zOrder:0,keyframe:!1};throw new window.cvat.exceptions.ScriptingError(`No one neightbour frame found for the track with client ID: "${this.id}"`)}delete(t){return this.lock&&!t||(this.removed=!0,this.resetCache()),!0}resetCache(){this.cache={}}}class f extends l{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.RECTANGLE,i(this.shapeType,this.points)}static distance(t,e,n){const[r,o,i,s]=t;return e>=r&&e<=i&&n>=o&&n<=s?Math.min.apply(null,[e-r,n-o,i-e,s-n]):null}}class h extends l{constructor(t,e,n,r){super(t,e,n,r)}}class d extends h{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.POLYGON,i(this.shapeType,this.points)}static distance(t,e,n){function r(t,r,o,i){return(o-t)*(n-r)-(e-t)*(i-r)}let o=0;const i=[];for(let s=0,a=t.length-2;s<t.length-1;a=s,s+=2){const c=t[a],u=t[a+1],l=t[s],p=t[s+1];u<=n?p>n&&r(c,u,l,p)>0&&o++:p<=n&&r(c,u,l,p)<0&&o--;const f=e-(u-p),h=n-(l-c);(f-c)*(l-f)>=0&&(h-u)*(p-h)>=0?i.push(Math.sqrt(Math.pow(e-f,2)+Math.pow(n-h,2))):i.push(Math.min(Math.sqrt(Math.pow(c-e,2)+Math.pow(u-n,2)),Math.sqrt(Math.pow(l-e,2)+Math.pow(p-n,2))))}return 0!==o?Math.min.apply(null,i):null}}class b extends h{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.POLYLINE,i(this.shapeType,this.points)}static distance(t,e,n){const r=[];for(let o=0;o<t.length-2;o+=2){const i=t[o],s=t[o+1],a=t[o+2],c=t[o+3];(e-i)*(a-e)>=0&&(n-s)*(c-n)>=0?r.push(Math.abs((c-s)*e-(a-i)*n+a*s-c*i)/Math.sqrt(Math.pow(c-s,2)+Math.pow(a-i,2))):r.push(Math.min(Math.sqrt(Math.pow(i-e,2)+Math.pow(s-n,2)),Math.sqrt(Math.pow(a-e,2)+Math.pow(c-n,2))))}return Math.min.apply(null,r)}}class g extends h{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.POINTS,i(this.shapeType,this.points)}static distance(t,e,n){const r=[];for(let o=0;o<t.length;o+=2){const i=t[o],s=t[o+1];r.push(Math.sqrt(Math.pow(i-e,2)+Math.pow(s-n,2)))}return Math.min.apply(null,r)}}class m extends p{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.RECTANGLE;for(const t of Object.values(this.shapes))i(this.shapeType,t.points)}interpolatePosition(t,e,n){const r=(n-t.frame)/(e.frame-t.frame),o=[e.points[0]-t.points[0],e.points[1]-t.points[1],e.points[2]-t.points[2],e.points[3]-t.points[3]];return{points:[t.points[0]+o[0]*r,t.points[1]+o[1]*r,t.points[2]+o[2]*r,t.points[3]+o[3]*r],occluded:t.occluded,outside:t.outside,zOrder:t.zOrder}}}class v extends p{constructor(t,e,n,r){super(t,e,n,r)}interpolatePosition(t,e,n){function r(t){let e=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER;for(let i=0;i<t.length;i+=2)t[i]<e&&(e=t[i]),t[i+1]<n&&(n=t[i+1]),t[i]>r&&(r=t[i]),t[i+1]>o&&(o=t[i+1]);return{xmin:e,ymin:n,xmax:r,ymax:o}}function o(t,e){const n=[],r=e.xmax-e.xmin,o=e.ymax-e.ymin;for(let i=0;i<t.length;i+=2)n.push((t[i]-e.xmin)/r,(t[i+1]-e.ymin)/o);return n}function i(t,e){const n=[],r=e.xmax-e.xmin,o=e.ymax-e.ymin;for(let i=0;i<t.length;i+=2)n.push(t[i]*r+e.xmin,t[i+1]*o+e.ymin);return n}function s(t){const e=[];for(let n=0;n<t.length;n+=2)e.push({x:t[n],y:t[n+1]});return e}function a(t){const e=[];for(const n of t)e.push(n.x,n.y);return e}function c(t,e){function n(t){let e=0;for(let n=1;n<t.length;n+=2){e+=Math.sqrt(Math.pow(t[n].x-t[n-1].x,2)+Math.pow(t[n].y-t[n-1].y,2))}return e||Number.MAX_SAFE_INTEGER}function r(t,e){let n=0;for(let r=1;r<t.length;r+=2){const o=Math.sqrt(Math.pow(t[r].x-t[r-1].x,2)+Math.pow(t[r].y-t[r-1].y,2));n+=Math.pow(o-e,2)}return n}const o=[],i=[],s=function(t,e){const n={};for(let r=0;r<t.length;r++){n[r]=n[r]||{};for(let o=0;o<e.length;o++){const i=t[r].x-e[o].x,s=t[r].y-e[o].y;n[r][o]=Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}return n}(t,e),a=function(t,e,n){const r={};for(const o of t)r[o]=e.concat().sort((t,e)=>n[o][t]-n[o][e]);const o={},i={};let s=0;for(;Object.values(i).length!==t.length;){for(const e of t){if(i[e])continue;const t=r[e][s],a=n[e][t];if(t in o&&o[t].distance>a){const e=o[t].value;delete o[t],delete i[e]}t in o||(o[t]={value:e,distance:a},i[e]=!0)}s++}const a={};for(const t of Object.keys(o))a[o[t].value]={value:t,distance:o[t].distance};return a}(Array.from(t.keys()),Array.from(e.keys()),s),c=(n(e)+n(t))/(e.length+t.length);!function(t,e){for(const n of Object.keys(t))t[n].distance>e&&delete t[n]}(a,c+3*Math.sqrt((r(t,c)+r(e,c))/(t.length+e.length)));for(const t of Object.keys(a))a[t]=a[t].value;const u=this.appendMapping(a,t,e);for(const n of u)o.push(t[n]),i.push(e[a[n]]);return[o,i]}let u=r(t.points),l=r(e.points);(u.xmax-u.xmin<1||l.ymax-l.ymin<1)&&(l=u={xmin:0,xmax:1024,ymin:0,ymax:768});const p=s(o(t.points,u)),f=s(o(e.points,l));let h=[],d=[];if(p.length>f.length){const[t,e]=c.call(this,f,p);h=e,d=t}else{const[t,e]=c.call(this,p,f);h=t,d=e}const b=i(a(h),u),g=i(a(d),l),m=(n-t.frame)/(e.frame-t.frame),v=[];for(let t=0;t<b.length;t++)v.push(b[t]+(g[t]-b[t])*m);return{points:v,occluded:t.occluded,outside:t.outside,zOrder:t.zOrder}}appendMapping(t,e,n){const r=Object.values(t).map(t=>+t),o=Object.keys(t).map(t=>+t),i=[];function s(t){let e=t,o=t;if(!r.length)throw new window.cvat.exceptions.ScriptingError("Interpolation mapping is empty");for(;!r.includes(e);)--e<0&&(e=n.length-1);for(;!r.includes(o);)++o>=n.length&&(o=0);return[e,o]}function a(t,e,r){const o=[];for(;e!==r;)o.push(n[e]),++e>=n.length&&(e=0);o.push(n[r]);let i=0,s=0,a=!1;for(let e=1;e<o.length;e++){const r=o[e],c=o[e-1],u=Math.sqrt(Math.pow(r.x-c.x,2)+Math.pow(r.y-c.y,2));a||(s+=u),i+=u,n[t]===o[e]&&(a=!0)}return i?s/i:0}for(let c=0;c<n.length;c++){const u=r.indexOf(c);if(-1===u){const[r,o]=s(c),u=a(c,r,o),l=n[r],p=n[o],f={x:l.x+(p.x-l.x)*u,y:l.y+(p.y-l.y)*u};e.push(f),t[e.length-1]=c,i.push(e.length-1)}else i.push(o[u])}return i}}class w extends v{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.POLYGON;for(const t of Object.values(this.shapes))i(this.shapeType,t.points)}}class y extends v{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.POLYLINE;for(const t of Object.values(this.shapes))i(this.shapeType,t.points)}}class x extends v{constructor(t,e,n,r){super(t,e,n,r),this.shapeType=window.cvat.enums.ObjectShape.POINTS;for(const t of Object.values(this.shapes))i(this.shapeType,t.points)}}m.distance=f.distance,w.distance=d.distance,y.distance=b.distance,x.distance=g.distance,t.exports={RectangleShape:f,PolygonShape:d,PolylineShape:b,PointsShape:g,RectangleTrack:m,PolygonTrack:w,PolylineTrack:y,PointsTrack:x,Track:p,Shape:l,Tag:class extends c{constructor(t,e,n){super(t,e,n)}toJSON(){return{clientID:this.clientID,id:this.serverID,frame:this.frame,label_id:this.label.id,group:this.group,attributes:Object.keys(this.attributes).reduce((t,e)=>(t.push({spec_id:e,value:this.attributes[e]}),t),[])}}get(t){if(t!==this.frame)throw new window.cvat.exceptions.ScriptingError("Got frame is not equal to the frame of the shape");return{objectType:window.cvat.enums.ObjectType.TAG,clientID:this.clientID,serverID:this.serverID,lock:this.lock,attributes:Object.assign({},this.attributes),label:this.label,group:this.group}}save(t,e){if(t!==this.frame)throw new window.cvat.exceptions.ScriptingError("Got frame is not equal to the frame of the shape");if(this.lock&&e.lock)return o.call(this,t,this.get(t));const n=this.get(t),i=e.updateFlags;if(i.label&&(r("label",e.label,null,window.cvat.classes.Label),n.label=e.label,n.attributes={},this.appendDefaultAttributes.call(n,n.label)),i.attributes){const t=n.label.attributes.map(t=>`${t.id}`);for(const r of Object.keys(e.attributes))t.includes(r)&&(n.attributes[r]=e.attributes[r])}i.group&&(r("group",e.group,"integer",null),n.group=e.group),i.lock&&(r("lock",e.lock,"boolean",null),n.lock=e.lock),i.reset();for(const t of Object.keys(n))t in this&&(this[t]=n[t]);return o.call(this,t,this.get(t))}},objectStateFactory:o}})()},function(t,e,n){n(4),n(8),n(7),(()=>{const e=n(17);t.exports=class{constructor(t,e,n){this.sessionType=n instanceof window.cvat.classes.Task?"task":"job",this.id=n.id,this.version=t,this.collection=e,this.initialObjects=[],this.hash=this._getHash();const r=this.collection.export();for(const t of r.shapes)this.initialObjects[t.id]=t;for(const t of r.tracks)this.initialObjects[t.id]=t;for(const t of r.tags)this.initialObjects[t.id]=t}_getHash(){const t=this.collection.export();return JSON.stringify(t)}async _request(t,n){return await e.annotations.updateAnnotations(this.sessionType,this.id,t,n)}async _put(t){return await this._request(t,"put")}async _create(t){return await this._request(t,"create")}async _update(t){return await this._request(t,"update")}async _delete(t){return await this._request(t,"delete")}_split(t){const e={created:{shapes:[],tracks:[],tags:[]},updated:{shapes:[],tracks:[],tags:[]},deleted:{shapes:[],tracks:[],tags:[]}};for(const n of Object.keys(t))for(const r of t[n])if(r.id in this.initialObjects)JSON.stringify(r)!==JSON.stringify(this.initialObjects[r.id])&&e.updated[n].push(r);else{if(void 0!==r.id)throw new window.cvat.exceptions.ScriptingError(`Id of object is defined "${r.id}"`+"but it absents in initial state");e.created[n].push(r)}const n=t.tracks.concat(t.shapes).concat(t.tags).map(t=>t.id);for(const t of Object.keys(this.initialObjects))if(!n.includes(+t)){const n=this.initialObjects[t];let r=null;r="shapes"in n?"tracks":"points"in n?"shapes":"tags",e.deleted[r].push(n)}return e}_updateCreatedObjects(t,e){const n=t.tracks.length+t.shapes.length+t.tags.length,r=e.tracks.length+e.shapes.length+e.tags.length;if(r!==n)throw new window.cvat.exception.ScriptingError("Number of indexes is differed by number of saved objects"+`${r} vs ${n}`);for(const n of Object.keys(e))for(let r=0;r<e[n].length;r++){const o=e[n][r];this.collection.objects[o].serverID=t[n][r].id,"tracks"===n&&this.collection.objects[o].resetCache()}}_receiveIndexes(t){const e={tracks:t.tracks.map(t=>t.clientID),shapes:t.shapes.map(t=>t.clientID),tags:t.tags.map(t=>t.clientID)};return t.tracks.concat(t.shapes).concat(t.tags).map(t=>(delete t.clientID,t)),e}async save(t){"function"!=typeof t&&(t=t=>{console.log(t)});try{const e=this.collection.export(),{flush:n}=this.collection;if(n){t("New objects are being saved..");const n=this._receiveIndexes(e),r=await this._put(Object.assign({},e,{version:this.version}));this.version=r.version,this.collection.flush=!1,t("Saved objects are being updated in the client"),this._updateCreatedObjects(r,n),t("Initial state is being updated");for(const t of r.shapes.concat(r.tracks).concat(r.tags))this.initialObjects[t.id]=t}else{const{created:n,updated:r,deleted:o}=this._split(e);t("New objects are being saved..");const i=this._receiveIndexes(n),s=await this._create(Object.assign({},n,{version:this.version}));this.version=s.version,t("Saved objects are being updated in the client"),this._updateCreatedObjects(s,i),t("Initial state is being updated");for(const t of s.shapes.concat(s.tracks).concat(s.tags))this.initialObjects[t.id]=t;t("Changed objects are being saved.."),this._receiveIndexes(r);const a=await this._update(Object.assign({},r,{version:this.version}));this.version=s.version,t("Initial state is being updated");for(const t of a.shapes.concat(a.tracks).concat(a.tags))this.initialObjects[t.id]=t;t("Changed objects are being saved.."),this._receiveIndexes(o);const c=await this._delete(Object.assign({},o,{version:this.version}));this._version=c.version,t("Initial state is being updated");for(const t of c.shapes.concat(c.tracks).concat(c.tags))delete this.initialObjects[t.id]}this.hash=this._getHash(),t("Saving is done")}catch(e){throw t(`Can not save annotations: ${e.message}`),e}}hasUnsavedChanges(){return this._getHash()!==this.hash}}})()},function(t,e,n){n(4),n(7),n(45),(()=>{t.exports={Attribute:class{constructor(t){const e={id:void 0,default_value:void 0,input_type:void 0,mutable:void 0,name:void 0,values:void 0};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&Object.prototype.hasOwnProperty.call(t,n)&&(Array.isArray(t[n])?e[n]=[...t[n]]:e[n]=t[n]);if(!Object.values(window.cvat.enums.AttributeType).includes(e.input_type))throw new window.cvat.exceptions.ArgumentError(`Got invalid attribute type ${e.input_type}`);Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},defaultValue:{get:()=>e.default_value},inputType:{get:()=>e.input_type},mutable:{get:()=>e.mutable},name:{get:()=>e.name},values:{get:()=>[...e.values]}}))}toJSON(){const t={name:this.name,mutable:this.mutable,input_type:this.inputType,default_value:this.defaultValue,values:this.values};return void 0!==this.id&&(t.id=this.id),t}},Label:class{constructor(t){const e={id:void 0,name:void 0};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);if(e.attributes=[],Object.prototype.hasOwnProperty.call(t,"attributes")&&Array.isArray(t.attributes))for(const n of t.attributes)e.attributes.push(new window.cvat.classes.Attribute(n));Object.defineProperties(this,Object.freeze({id:{get:()=>e.id},name:{get:()=>e.name},attributes:{get:()=>[...e.attributes]}}))}toJSON(){const t={name:this.name,attributes:[...this.attributes.map(t=>t.toJSON())]};return void 0!==this.id&&(t.id=this.id),t}}}})()},function(t,e){(()=>{const e=Object.freeze({DIR:"DIR",REG:"REG"}),n=Object.freeze({ANNOTATION:"annotation",VALIDATION:"validation",COMPLETED:"completed"}),r=Object.freeze({ANNOTATION:"annotation",INTERPOLATION:"interpolation"}),o=Object.freeze({CHECKBOX:"checkbox",RADIO:"radio",SELECT:"select",NUMBER:"number",TEXT:"text"}),i=Object.freeze({TAG:"tag",SHAPE:"shape",TRACK:"track"}),s=Object.freeze({RECTANGLE:"rectangle",POLYGON:"polygon",POLYLINE:"polyline",POINTS:"points"}),a=Object.freeze({frameDownloaded:0});t.exports={ShareFileType:e,TaskStatus:n,TaskMode:r,AttributeType:o,ObjectType:i,ObjectShape:s,LogType:{pasteObject:0,changeAttribute:1,dragObject:2,deleteObject:3,pressShortcut:4,resizeObject:5,sendLogs:6,saveJob:7,jumpFrame:8,drawObject:9,changeLabel:10,sendTaskInfo:11,loadJob:12,moveImage:13,zoomImage:14,lockObject:15,mergeObjects:16,copyObject:17,propagateObject:18,undoAction:19,redoAction:20,sendUserActivity:21,sendException:22,changeFrame:23,debugInfo:24,fitImage:25,rotateImage:26},EventType:a}})()},function(t){t.exports={name:"cvat.js",version:"1.0.0",description:"Part of Computer Vision Tool which presents an interface for client-side integration",main:"babel.config.js",scripts:{build:"webpack",test:"jest --config=jest.config.js --coverage",docs:"jsdoc --readme README.md src/*.js -p -c jsdoc.config.js -d docs",coveralls:"cat ./reports/coverage/lcov.info | coveralls"},author:"Intel",license:"MIT",devDependencies:{"@babel/cli":"^7.4.4","@babel/core":"^7.4.4","@babel/preset-env":"^7.4.4","babel-eslint":"^10.0.1","babel-loader":"^8.0.6","core-js":"^3.0.1",coveralls:"^3.0.5",jest:"^24.8.0","jest-junit":"^6.4.0",jsdoc:"^3.6.2",webpack:"^4.31.0","webpack-cli":"^3.3.2"},dependencies:{axios:"^0.18.0","browser-env":"^3.2.6","error-stack-parser":"^2.0.2","jest-config":"^24.8.0","js-cookie":"^2.2.0",platform:"^1.3.5","stacktrace-gps":"^3.0.2"}}},function(t,e,n){n(4),n(8),n(7),n(80),(()=>{const e=n(23),r=n(17),{isBoolean:o,isInteger:i,isEnum:s,isString:a,checkFilter:c}=n(33);t.exports=function(t){return t.plugins.list.implementation=e.list,t.plugins.register.implementation=e.register,t.server.about.implementation=async()=>await r.server.about(),t.server.share.implementation=async t=>await r.server.share(t),t.server.login.implementation=async(t,e)=>{await r.server.login(t,e)},t.server.logout.implementation=async()=>{await r.server.logout()},t.users.get.implementation=async t=>{c(t,{self:o});let e=null;return e=(e="self"in t&&t.self?[e=await r.users.getSelf()]:await r.users.getUsers()).map(t=>new window.cvat.classes.User(t))},t.jobs.get.implementation=async t=>{if(c(t,{taskID:i,jobID:i}),"taskID"in t&&"jobID"in t)throw new window.cvat.exceptions.ArgumentError('Only one of fields "taskID" and "jobID" allowed simultaneously');if(!Object.keys(t).length)throw new window.cvat.exceptions.ArgumentError("Job filter must not be empty");let e=null;if("taskID"in t)e=await r.tasks.getTasks(`id=${t.taskID}`);else{const n=await r.jobs.getJob(t.jobID);void 0!==n.task_id&&(e=await r.tasks.getTasks(`id=${n.task_id}`))}if(null!==e&&e.length){const n=new window.cvat.classes.Task(e[0]);return t.jobID?n.jobs.filter(e=>e.id===t.jobID):n.jobs}return[]},t.tasks.get.implementation=async t=>{if(c(t,{page:i,name:a,id:i,owner:a,assignee:a,search:a,status:s.bind(window.cvat.enums.TaskStatus),mode:s.bind(window.cvat.enums.TaskMode)}),"search"in t&&Object.keys(t).length>1&&!("page"in t&&2===Object.keys(t).length))throw new window.cvat.exceptions.ArgumentError('Do not use the filter field "search" with others');if("id"in t&&Object.keys(t).length>1&&!("page"in t&&2===Object.keys(t).length))throw new window.cvat.exceptions.ArgumentError('Do not use the filter field "id" with others');const e=new URLSearchParams;for(const n of["name","owner","assignee","search","status","mode","id","page"])Object.prototype.hasOwnProperty.call(t,n)&&e.set(n,t[n]);const n=await r.tasks.getTasks(e.toString()),o=n.map(t=>new window.cvat.classes.Task(t));return o.count=n.count,o},t}})()}]);
|
|
|
//# sourceMappingURL=cvat.js.map
|