You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
117 KiB
JavaScript

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=80)}([function(e,t,r){(function(t){var r="object",n=function(e){return e&&e.Math==Math&&e};e.exports=n(typeof globalThis==r&&globalThis)||n(typeof window==r&&window)||n(typeof self==r&&self)||n(typeof t==r&&t)||Function("return this")()}).call(this,r(33))},function(e,t,r){var n=r(0),o=r(27),i=r(49),s=r(86),a=n.Symbol,c=o("wks");e.exports=function(e){return c[e]||(c[e]=s&&a[e]||(s?a:i)("Symbol."+e))}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,r){"use strict";var n=r(71),o=r(114),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)u(arguments[n],r);return t},extend:function(e,t,r){return u(t,function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";var n=r(26),o=r(97),i=r(21),s=r(16),a=r(65),c=s.set,u=s.getterFor("Array Iterator");e.exports=a(Array,"Array",function(e,t){c(this,{type:"Array Iterator",target:n(e),index:0,kind:t})},function(){var e=u(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,r){"use strict";var n,o,i,s=r(11),a=r(18),c=r(0),u=r(51),l=r(55),f=r(19),p=r(87),h=r(9),d=r(20),v=r(41),g=r(14),b=r(88),m=r(90),w=r(91),y=r(58).set,x=r(92),O=r(93),S=r(94),E=r(61),k=r(95),j=r(60),A=r(16),T=r(54),P=r(1)("species"),C="Promise",I=A.get,F=A.set,R=A.getterFor(C),L=c.Promise,N=c.TypeError,_=c.document,$=c.process,B=c.fetch,D=$&&$.versions,M=D&&D.v8||"",z=E.f,U=z,W="process"==g($),G=!!(_&&_.createEvent&&c.dispatchEvent),q=T(C,function(){var e=L.resolve(1),t=function(){},r=(e.constructor={})[P]=function(e){e(t,t)};return!((W||"function"==typeof PromiseRejectionEvent)&&(!a||e.finally)&&e.then(t)instanceof r&&0!==M.indexOf("6.6")&&-1===j.indexOf("Chrome/66"))}),J=q||!m(function(e){L.all(e).catch(function(){})}),V=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,r){if(!t.notified){t.notified=!0;var n=t.reactions;x(function(){for(var o=t.value,i=1==t.state,s=0;n.length>s;){var a,c,u,l=n[s++],f=i?l.ok:l.fail,p=l.resolve,h=l.reject,d=l.domain;try{f?(i||(2===t.rejection&&Z(e,t),t.rejection=1),!0===f?a=o:(d&&d.enter(),a=f(o),d&&(d.exit(),u=!0)),a===l.promise?h(N("Promise-chain cycle")):(c=V(a))?c.call(a,p,h):p(a)):h(o)}catch(e){d&&!u&&d.exit(),h(e)}}t.reactions=[],t.notified=!1,r&&!t.rejection&&H(e,t)})}},K=function(e,t,r){var n,o;G?((n=_.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},(o=c["on"+e])?o(n):"unhandledrejection"===e&&S("Unhandled promise rejection",r)},H=function(e,t){y.call(c,function(){var r,n=t.value;if(Y(t)&&(r=k(function(){W?$.emit("unhandledRejection",n,e):K("unhandledrejection",e,n)}),t.rejection=W||Y(t)?2:1,r.error))throw r.value})},Y=function(e){return 1!==e.rejection&&!e.parent},Z=function(e,t){y.call(c,function(){W?$.emit("rejectionHandled",e):K("rejectionhandled",e,t.value)})},Q=function(e,t,r,n){return function(o){e(t,r,o,n)}},ee=function(e,t,r,n){t.done||(t.done=!0,n&&(t=n),t.value=r,t.state=2,X(e,t,!0))},te=function(e,t,r,n){if(!t.done){t.done=!0,n&&(t=n);try{if(e===r)throw N("Promise can't be resolved itself");var o=V(r);o?x(function(){var n={done:!1};try{o.call(r,Q(te,e,n,t),Q(ee,e,n,t))}catch(r){ee(e,n,r,t)}}):(t.value=r,t.state=1,X(e,t,!1))}catch(r){ee(e,{done:!1},r,t)}}};q&&(L=function(e){v(this,L,C),d(e),n.call(this);var t=I(this);try{e(Q(te,this,t),Q(ee,this,t))}catch(e){ee(this,t,e)}},(n=function(e){F(this,{type:C,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=l(L.prototype,{then:function(e,t){var r=R(this),n=z(w(this,L));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=W?$.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&X(this,r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new n,t=I(e);this.promise=e,this.resolve=Q(te,e,t),this.reject=Q(ee,e,t)},E.f=z=function(e){return e===L||e===i?new o(e):U(e)},a||"function"!=typeof B||s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return O(L,B.apply(c,arguments))}})),s({global:!0,wrap:!0,forced:q},{Promise:L}),f(L,C,!1,!0),p(C),i=u.Promise,s({target:C,stat:!0,forced:q},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:C,stat:!0,forced:a||q},{resolve:function(e){return O(a&&this===i?L:this,e)}}),s({target:C,stat:!0,forced:J},{all:function(e){var t=this,r=z(t),n=r.resolve,o=r.reject,i=k(function(){var r=d(t.resolve),i=[],s=0,a=1;b(e,function(e){var c=s++,u=!1;i.push(void 0),a++,r.call(t,e).then(function(e){u||(u=!0,i[c]=e,--a||n(i))},o)}),--a||n(i)});return i.error&&o(i.value),r.promise},race:function(e){var t=this,r=z(t),n=r.reject,o=k(function(){var o=d(t.resolve);b(e,function(e){o.call(t,e).then(r.resolve,n)})});return o.error&&n(o.value),r.promise}})},function(e,t,r){var n=r(2);e.exports=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(8),o=r(13),i=r(25);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(0),o=r(34).f,i=r(10),s=r(15),a=r(37),c=r(50),u=r(54);e.exports=function(e,t){var r,l,f,p,h,d=e.target,v=e.global,g=e.stat;if(r=v?n:g?n[d]||a(d,{}):(n[d]||{}).prototype)for(l in t){if(p=t[l],f=e.noTargetGet?(h=o(r,l))&&h.value:r[l],!u(v?l:d+(g?".":"#")+l,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(e.sham||f&&f.sham)&&i(p,"sham",!0),s(r,l,p,e)}}},function(e,t,r){var n=r(0),o=r(101),i=r(6),s=r(10),a=r(1),c=a("iterator"),u=a("toStringTag"),l=i.values;for(var f in o){var p=n[f],h=p&&p.prototype;if(h){if(h[c]!==l)try{s(h,c,l)}catch(e){h[c]=l}if(h[u]||s(h,u,f),o[f])for(var d in i)if(h[d]!==i[d])try{s(h,d,i[d])}catch(e){h[d]=i[d]}}}},function(e,t,r){var n=r(8),o=r(47),i=r(3),s=r(35),a=Object.defineProperty;t.f=n?a:function(e,t,r){if(i(e),t=s(t,!0),i(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(0),o=r(27),i=r(10),s=r(5),a=r(37),c=r(48),u=r(16),l=u.get,f=u.enforce,p=String(c).split("toString");o("inspectSource",function(e){return c.call(e)}),(e.exports=function(e,t,r,o){var c=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof r&&("string"!=typeof t||s(r,"name")||i(r,"name",t),f(r).source=p.join("string"==typeof t?t:"")),e!==n?(c?!l&&e[t]&&(u=!0):delete e[t],u?e[t]=r:i(e,t,r)):u?e[t]=r:a(t,r)})(Function.prototype,"toString",function(){return"function"==typeof this&&l(this).source||c.call(this)})},function(e,t,r){var n,o,i,s=r(81),a=r(0),c=r(9),u=r(10),l=r(5),f=r(38),p=r(39),h=a.WeakMap;if(s){var d=new h,v=d.get,g=d.has,b=d.set;n=function(e,t){return b.call(d,e,t),t},o=function(e){return v.call(d,e)||{}},i=function(e){return g.call(d,e)}}else{var m=f("state");p[m]=!0,n=function(e,t){return u(e,m,t),t},o=function(e){return l(e,m)?e[m]:{}},i=function(e){return l(e,m)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports=!1},function(e,t,r){var n=r(13).f,o=r(5),i=r(1)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t){e.exports={}},function(e,t,r){r(96),r(6),r(7),r(12),(()=>{const{PluginError:t}=r(69),n=[];e.exports=class{static async apiWrapper(e,...r){const n=await window.cvat.plugins.list.implementation();for(const o of n){const n=o.functions.filter(t=>t.callback===e)[0];if(n&&n.enter)try{await n.enter.call(this,o,...r)}catch(e){throw e instanceof t?e:new t(`Exception in plugin ${o.name}: ${e.toString()}`)}}let o=await e.implementation.call(this,...r);for(const i of n){const n=i.functions.filter(t=>t.callback===e)[0];if(n&&n.leave)try{o=await n.leave.call(this,i,o,...r)}catch(e){throw e instanceof t?e:new t(`Exception in plugin ${i.name}: ${e.toString()}`)}}return o}static async register(e){const r=[];if("object"!=typeof e)throw new t(`Plugin should be an object, but got "${typeof e}"`);if(!("name"in e)||"string"!=typeof e.name)throw new t('Plugin must contain a "name" field and it must be a string');if(!("description"in e)||"string"!=typeof e.description)throw new t('Plugin must contain a "description" field and it must be a string');if("functions"in e)throw new t('Plugin must not contain a "functions" field');!function e(t,n){const o={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"==typeof t[r]?Object.prototype.hasOwnProperty.call(n,r)&&e(t[r],n[r]):["enter","leave"].includes(r)&&"function"==typeof n&&(t[r],1)&&(o.callback=n,o[r]=t[r]));Object.keys(o).length&&r.push(o)}(e,{cvat:window.cvat}),Object.defineProperty(e,"functions",{value:r,writable:!1}),n.push(e)}static async list(){return n}}})()},function(e,t,r){var n=r(17);e.exports=function(e){return Object(n(e))}},function(e,t,r){r(6),r(7),r(106),r(12),(()=>{const t=new class{constructor(){const e=r(111),t=r(112);function n(e){t.defaults.headers.delete["X-CSRFToken"]=e,t.defaults.headers.patch["X-CSRFToken"]=e,t.defaults.headers.post["X-CSRFToken"]=e,t.defaults.headers.put["X-CSRFToken"]=e,t.defaults.withCredentials=!0}async function o(e=""){const{backendAPI:r}=window.cvat.config;let n=null;try{n=await t.get(`${r}/tasks?${e}`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not get tasks from a server",t)}return n.data.results.count=n.data.count,n.data.results}async function i(e){const{backendAPI:r}=window.cvat.config;try{await t.delete(`${r}/tasks/${e}`)}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not delete the task from the server",t)}}const s=e.get("csrftoken");s&&n(s),Object.defineProperties(this,Object.freeze({server:{value:Object.freeze({about:async function(){const{backendAPI:e}=window.cvat.config;let r=null;try{r=await t.get(`${e}/server/about`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError('Could not get "about" information from the server',t)}return r.data},share:async function(e){const{backendAPI:r}=window.cvat.config;let n=null;try{n=await t.get(`${r}/server/share?directory=${e}`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError('Could not get "share" information from the server',t)}return n.data},exception:async function(e){const{backendAPI:r}=window.cvat.config;try{await t.post(`${r}/server/exception`,JSON.stringify(e),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not send an exception to the server",t)}},login:async function(r,o){function i(r){if(r.headers["set-cookie"]){let o="";for(let t of r.headers["set-cookie"]){[t]=t.split(";");const r=t.split("=")[0],i=t.split("=")[1];"csrftoken"===r&&n(i),e.set(r,i),o+=`${t};`}t.defaults.headers.common.Cookie=o}else{let t=r.data.csrf;if(t)n(t),e.set("csrftoken",t);else{if(!(t=e.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");n(t)}}}const s=window.cvat.config.backendAPI.slice(0,-7);let a=null;try{a=await t.get(`${s}/auth/csrf`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not get CSRF token from a server",t)}i(a);const c=[`${encodeURIComponent("username")}=${encodeURIComponent(r)}`,`${encodeURIComponent("password")}=${encodeURIComponent(o)}`].join("&").replace(/%20/g,"+");let u=null;try{u=await t.post(`${s}/auth/login`,c,{"Content-Type":"application/x-www-form-urlencoded",proxy:window.cvat.config.proxy,maxRedirects:0})}catch(e){if(302!==e.response.status){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not login on a server",t)}u=e.response}if(u.data.includes("didn't match"))throw new window.cvat.exceptions.ServerError("The pair login/password is invalid",403);i(u)}}),writable:!1},tasks:{value:Object.freeze({getTasks:o,saveTask:async function(e,r){const{backendAPI:n}=window.cvat.config;try{await t.patch(`${n}/tasks/${e}`,JSON.stringify(r),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not save the task on the server",t)}},createTask:async function(e,r,n){const{backendAPI:s}=window.cvat.config,a=new window.FormData;for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e))for(let t=0;t<r[e].length;t++)a.append(`${e}[${t}]`,r[e][t]);let c=null;n("The task is being created on the server..");try{c=await t.post(`${s}/tasks`,JSON.stringify(e),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not put task to the server",t)}n("The data is being uploaded to the server..");try{await t.post(`${s}/tasks/${c.data.id}/data`,a,{proxy:window.cvat.config.proxy})}catch(e){i(c.data.id);const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not put data to the server",t)}try{await async function(e){return new Promise((r,o)=>{setTimeout(async function i(){try{const a=await t.get(`${s}/tasks/${e}/status`);["Queued","Started"].includes(a.data.state)?(""!==a.data.message&&n(a.data.message),setTimeout(i,1e3)):"Finished"===a.data.state?r():"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(e){const t=e.response?e.response.status:e.code;o(new window.cvat.exceptions.ServerError("Data uploading error occured",t))}},1e3)})}(c.data.id)}catch(e){throw i(c.data.id),e}return(await o(`?id=${c.id}`))[0]},deleteTask:i}),writable:!1},jobs:{value:Object.freeze({getJob:async function(e){const{backendAPI:r}=window.cvat.config;let n=null;try{n=await t.get(`${r}/jobs/${e}`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not get jobs from a server",t)}return n.data},saveJob:async function(e,r){const{backendAPI:n}=window.cvat.config;try{await t.patch(`${n}/jobs/${e}`,JSON.stringify(r),{proxy:window.cvat.config.proxy,headers:{"Content-Type":"application/json"}})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not save the job on the server",t)}}}),writable:!1},users:{value:Object.freeze({getUsers:async function(){const{backendAPI:e}=window.cvat.config;let r=null;try{r=await t.get(`${e}/users`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not get users from the server",t)}return r.data.results},getSelf:async function(){const{backendAPI:e}=window.cvat.config;let r=null;try{r=await t.get(`${e}/users/self`,{proxy:window.cvat.config.proxy})}catch(e){const t=e.response?e.response.status:e.code;throw new window.cvat.exceptions.ServerError("Could not get users from the server",t)}return r.data}}),writable:!1},frames:{value:Object.freeze({getFrame:async function(e,r){const{backendAPI:n}=window.cvat.config;let o=null;try{o=await t.get(`${n}/tasks/${e}/frames/${r}`,{proxy:window.cvat.config.proxy,responseType:"blob"})}catch(t){const n=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError(`Could not get frame ${r} for the task ${e} from the server`,n)}return o.data},getMeta:async function(e){const{backendAPI:r}=window.cvat.config;let n=null;try{n=await t.get(`${r}/tasks/${e}/frames/meta`,{proxy:window.cvat.config.proxy})}catch(t){const r=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError(`Could not get frame meta info for the task ${e} from the server`,r)}return n.data}}),writable:!1},annotations:{value:Object.freeze({getTaskAnnotations:async function(e){const{backendAPI:r}=window.cvat.config;let n=null;try{n=await t.get(`${r}/tasks/${e}/annotations`,{proxy:window.cvat.config.proxy})}catch(t){const r=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError(`Could not get annotations for the task ${e} from the server`,r)}return n.data},getJobAnnotations:async function(e){const{backendAPI:r}=window.cvat.config;let n=null;try{n=await t.get(`${r}/jobs/${e}/annotations`,{proxy:window.cvat.config.proxy})}catch(t){const r=t.response?t.response.status:t.code;throw new window.cvat.exceptions.ServerError(`Could not get annotations for the job ${e} from the server`,r)}return n.data}}),writable:!1}}))}};e.exports=t})()},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(46),o=r(17);e.exports=function(e){return n(o(e))}},function(e,t,r){var n=r(0),o=r(37),i=r(18),s=n["__core-js_shared__"]||o("__core-js_shared__",{});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.1.3",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,r){var n=r(51),o=r(0),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(o[e]):n[e]&&n[e][t]||o[e]&&o[e][t]}},function(e,t,r){var n=r(30),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(20);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(89),o=r(21),i=r(1)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[n(e)]}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(8),o=r(45),i=r(25),s=r(26),a=r(35),c=r(5),u=r(47),l=Object.getOwnPropertyDescriptor;t.f=n?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(c(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,r){var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){var n=r(0),o=r(9),i=n.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},function(e,t,r){var n=r(0),o=r(10);e.exports=function(e,t){try{o(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(27),o=r(49),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports={}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},function(e,t,r){var n=r(30),o=r(17),i=function(e){return function(t,r){var i,s,a=String(o(t)),c=n(r),u=a.length;return c<0||c>=u?e?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):i:e?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,r){"use strict";(function(t){var n=r(4),o=r(117),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,c={adapter:("undefined"!=typeof XMLHttpRequest?a=r(72):void 0!==t&&(a=r(72)),a),transformRequest:[function(e,t){return o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){c.headers[e]={}}),n.forEach(["post","put","patch"],function(e){c.headers[e]=n.merge(i)}),e.exports=c}).call(this,r(116))},function(e,t,r){"use strict";r(11)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:n},function(e,t,r){var n=r(2),o=r(14),i="".split;e.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,r){var n=r(8),o=r(2),i=r(36);e.exports=!n&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){var n=r(27);e.exports=n("native-function-to-string",Function.toString)},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},function(e,t,r){var n=r(5),o=r(82),i=r(34),s=r(13);e.exports=function(e,t){for(var r=o(t),a=s.f,c=i.f,u=0;u<r.length;u++){var l=r[u];n(e,l)||a(e,l,c(t,l))}}},function(e,t,r){e.exports=r(0)},function(e,t,r){var n=r(5),o=r(26),i=r(84).indexOf,s=r(39);e.exports=function(e,t){var r,a=o(e),c=0,u=[];for(r in a)!n(s,r)&&n(a,r)&&u.push(r);for(;t.length>c;)n(a,r=t[c++])&&(~i(u,r)||u.push(r));return u}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(2),o=/#|\.prototype\./,i=function(e,t){var r=a[s(e)];return r==u||r!=c&&("function"==typeof t?n(t):!!t)},s=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,r){var n=r(15);e.exports=function(e,t,r){for(var o in t)n(e,o,t[o],r);return e}},function(e,t,r){var n=r(1),o=r(21),i=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[i]===e)}},function(e,t,r){var n=r(3);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n,o,i,s=r(0),a=r(2),c=r(14),u=r(31),l=r(59),f=r(36),p=s.location,h=s.setImmediate,d=s.clearImmediate,v=s.process,g=s.MessageChannel,b=s.Dispatch,m=0,w={},y=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},x=function(e){return function(){y(e)}},O=function(e){y(e.data)},S=function(e){s.postMessage(e+"",p.protocol+"//"+p.host)};h&&d||(h=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return w[++m]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(m),m},d=function(e){delete w[e]},"process"==c(v)?n=function(e){v.nextTick(x(e))}:b&&b.now?n=function(e){b.now(x(e))}:g?(i=(o=new g).port2,o.port1.onmessage=O,n=u(i.postMessage,i,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(S)?n="onreadystatechange"in f("script")?function(e){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),y(e)}}:function(e){setTimeout(x(e),0)}:(n=S,s.addEventListener("message",O,!1))),e.exports={set:h,clear:d}},function(e,t,r){var n=r(28);e.exports=n("document","documentElement")},function(e,t,r){var n=r(28);e.exports=n("navigator","userAgent")||""},function(e,t,r){"use strict";var n=r(20),o=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new o(e)}},function(e,t,r){var n=r(3),o=r(63),i=r(40),s=r(39),a=r(59),c=r(36),u=r(38)("IE_PROTO"),l=function(){},f=function(){var e,t=c("iframe"),r=i.length;for(t.style.display="none",a.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),f=e.F;r--;)delete f.prototype[i[r]];return f()};e.exports=Object.create||function(e,t){var r;return null!==e?(l.prototype=n(e),r=new l,l.prototype=null,r[u]=e):r=f(),void 0===t?r:o(r,t)},s[u]=!0},function(e,t,r){var n=r(8),o=r(13),i=r(3),s=r(64);e.exports=n?Object.defineProperties:function(e,t){i(e);for(var r,n=s(t),a=n.length,c=0;a>c;)o.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(52),o=r(40);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t,r){"use strict";var n=r(11),o=r(66),i=r(68),s=r(99),a=r(19),c=r(10),u=r(15),l=r(1),f=r(18),p=r(21),h=r(67),d=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,g=l("iterator"),b=function(){return this};e.exports=function(e,t,r,l,h,m,w){o(r,t,l);var y,x,O,S=function(e){if(e===h&&T)return T;if(!v&&e in j)return j[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},E=t+" Iterator",k=!1,j=e.prototype,A=j[g]||j["@@iterator"]||h&&j[h],T=!v&&A||S(h),P="Array"==t&&j.entries||A;if(P&&(y=i(P.call(new e)),d!==Object.prototype&&y.next&&(f||i(y)===d||(s?s(y,d):"function"!=typeof y[g]&&c(y,g,b)),a(y,E,!0,!0),f&&(p[E]=b))),"values"==h&&A&&"values"!==A.name&&(k=!0,T=function(){return A.call(this)}),f&&!w||j[g]===T||c(j,g,T),p[t]=T,h)if(x={values:S("values"),keys:m?T:S("keys"),entries:S("entries")},w)for(O in x)!v&&!k&&O in j||u(j,O,x[O]);else n({target:t,proto:!0,forced:v||k},x);return x}},function(e,t,r){"use strict";var n=r(67).IteratorPrototype,o=r(62),i=r(25),s=r(19),a=r(21),c=function(){return this};e.exports=function(e,t,r){var u=t+" Iterator";return e.prototype=o(n,{next:i(1,r)}),s(e,u,!1,!0),a[u]=c,e}},function(e,t,r){"use strict";var n,o,i,s=r(68),a=r(10),c=r(5),u=r(1),l=r(18),f=u("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):p=!0),null==n&&(n={}),l||c(n,f)||a(n,f,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},function(e,t,r){var n=r(5),o=r(23),i=r(38),s=r(98),a=i("IE_PROTO"),c=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=o(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},function(e,t,r){r(7),(()=>{const t=r(102),n=r(104);class o extends Error{constructor(e){super(e);const r=(new Date).toISOString(),o=t.os.toString(),i=`${t.name} ${t.version}`,s=n.parse(this)[0],a=`${s.fileName}`,c=s.lineNumber,u=s.columnNumber,{jobID:l,taskID:f,clientID:p}=window.cvat.config;Object.defineProperties(this,Object.freeze({system:{get:()=>o},client:{get:()=>i},time:{get:()=>r},jobID:{get:()=>l},taskID:{get:()=>f},projID:{get:()=>void 0},clientID:{get:()=>p},filename:{get:()=>a},line:{get:()=>c},column:{get:()=>u}}))}async save(){const e={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 t=r(24);await t.server.exception(e)}catch(e){}}}e.exports={Exception:o,ArgumentError:class extends o{constructor(e){super(e)}},DataError:class extends o{constructor(e){super(e)}},ScriptingError:class extends o{constructor(e){super(e)}},PluginError:class extends o{constructor(e){super(e)}},ServerError:class extends o{constructor(e,t){super(e),Object.defineProperties(this,Object.freeze({code:{get:()=>t}}))}}}})()},function(e,t,r){"use strict";var n,o,i=r(108),s=RegExp.prototype.exec,a=String.prototype.replace,c=s,u=(n=/a/,o=/b*/g,s.call(n,"a"),s.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(e){var t,r,n,o,c=this;return l&&(r=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),u&&(t=c.lastIndex),n=s.call(c,e),u&&n&&(c.lastIndex=c.global?n.index+n[0].length:t),l&&n&&n.length>1&&a.call(n[0],r,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)}),n}),e.exports=c},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(4),o=r(118),i=r(120),s=r(121),a=r(122),c=r(73);e.exports=function(e){return new Promise(function(t,u){var l=e.data,f=e.headers;n.isFormData(l)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",d=e.auth.password||"";f.Authorization="Basic "+btoa(h+":"+d)}if(p.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};o(t,u,n),p=null}},p.onerror=function(){u(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){u(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var v=r(123),g=(e.withCredentials||a(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;g&&(f[e.xsrfHeaderName]=g)}if("setRequestHeader"in p&&n.forEach(f,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),u(e),p=null)}),void 0===l&&(l=null),p.send(l)})}},function(e,t,r){"use strict";var n=r(119);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){r(6),r(7),r(12),(()=>{const t=r(22);class n{constructor(e){const t={points:null,group:null,zOrder:null,outside:null,occluded:null,lock:null,attributes:{},type:e.type,shape:e.shape};Object.defineProperties(this,Object.freeze({type:{get:()=>t.type},shape:{get:()=>t.shape},label:{get:()=>t.label,set:e=>{if(!(e instanceof window.cvat.classes.Label))throw new window.cvat.exceptions.ArgumentError(`Expected Label instance, but got "${typeof e.constructor.name}"`);t.label=e}},points:{get:()=>t.position,set:e=>{if(!Array.isArray(e))throw new window.cvat.exceptions.ArgumentError(`Got invalid type "${typeof e.constructor.name}"`);for(const t of e)if(!("object"==typeof t&&"x"in t&&"y"in t))throw new window.cvat.exceptions.ArgumentError(`Got invalid point ${t}`);t.position=e}},group:{get:()=>t.group,set:e=>{if(!Number.isInteger(e))throw new window.cvat.exceptions.ArgumentError(`Expected integer, but got ${e.constructor.name}`);t.group=e}},zOrder:{get:()=>t.zOrder,set:e=>{if(!Number.isInteger(e))throw new window.cvat.exceptions.ArgumentError(`Expected integer, but got ${e.constructor.name}`);t.zOrder=e}},outside:{get:()=>t.outside,set:e=>{if("boolean"!=typeof e)throw new window.cvat.exceptions.ArgumentError(`Expected boolean, but got ${e.constructor.name}`);t.outside=e}},occluded:{get:()=>t.occluded,set:e=>{if("boolean"!=typeof e)throw new window.cvat.exceptions.ArgumentError(`Expected boolean, but got ${e.constructor.name}`);t.occluded=e}},lock:{get:()=>t.lock,set:e=>{if("boolean"!=typeof e)throw new window.cvat.exceptions.ArgumentError(`Expected boolean, but got ${e.constructor.name}`);t.lock=e}},attributes:{get:()=>t.attributes,set:e=>{if("object"!=typeof e)throw new window.cvat.exceptions.ArgumentError(`Expected object, but got ${e.constructor.name}`);for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(r=+r,!Number.isInteger(r))throw new window.cvat.exceptions.ArgumentError(`Expected integer attribute id, but got ${r.constructor.name}`);t.attributes[r]=e[r]}}}})),this.label=e.label,this.group=e.group,this.zOrder=e.zOrder,this.outside=e.outside,this.occluded=e.occluded,this.attributes=e.attributes,this.lock=!1;const r=[];for(let t=0;t<e.points.length;t+=2)r.push({x:e.points[t],y:e.points[t+1]});this.points=r}async save(){return await t.apiWrapper.call(this,n.prototype.save)}async delete(){return await t.apiWrapper.call(this,n.prototype.delete)}}e.exports=n})()},function(e,t){e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(e,t,r){"use strict";r(138);var n,o=r(11),i=r(8),s=r(79),a=r(0),c=r(63),u=r(15),l=r(41),f=r(5),p=r(139),h=r(140),d=r(42).codeAt,v=r(142),g=r(19),b=r(143),m=r(16),w=a.URL,y=b.URLSearchParams,x=b.getState,O=m.set,S=m.getterFor("URL"),E=Math.floor,k=Math.pow,j=/[A-Za-z]/,A=/[\d+\-.A-Za-z]/,T=/\d/,P=/^(0x|0X)/,C=/^[0-7]+$/,I=/^\d+$/,F=/^[\dA-Fa-f]+$/,R=/[\u0000\u0009\u000A\u000D #%\/:?@[\\]]/,L=/[\u0000\u0009\u000A\u000D #\/:?@[\\]]/,N=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,_=/[\u0009\u000A\u000D]/g,$=function(e,t){var r,n,o;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(r=D(t.slice(1,-1))))return"Invalid host";e.host=r}else if(V(e)){if(t=v(t),R.test(t))return"Invalid host";if(null===(r=B(t)))return"Invalid host";e.host=r}else{if(L.test(t))return"Invalid host";for(r="",n=h(t),o=0;o<n.length;o++)r+=q(n[o],z);e.host=r}},B=function(e){var t,r,n,o,i,s,a,c=e.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=P.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)s=0;else{if(!(10==i?I:8==i?C:F).test(o))return e;s=parseInt(o,i)}r.push(s)}for(n=0;n<t;n++)if(s=r[n],n==t-1){if(s>=k(256,5-t))return null}else if(s>255)return null;for(a=r.pop(),n=0;n<r.length;n++)a+=r[n]*k(256,3-n);return a},D=function(e){var t,r,n,o,i,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,p=function(){return e.charAt(f)};if(":"==p()){if(":"!=e.charAt(1))return;f+=2,l=++u}for(;p();){if(8==u)return;if(":"!=p()){for(t=r=0;r<4&&F.test(p());)t=16*t+parseInt(p(),16),f++,r++;if("."==p()){if(0==r)return;if(f-=r,u>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;f++}if(!T.test(p()))return;for(;T.test(p());){if(i=parseInt(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;c[u++]=t}else{if(null!==l)return;f++,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},M=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=E(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},z={},U=p({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),W=p({},U,{"#":1,"?":1,"{":1,"}":1}),G=p({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),q=function(e,t){var r=d(e,0);return r>32&&r<127&&!f(t,e)?e:encodeURIComponent(e)},J={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},V=function(e){return f(J,e.scheme)},X=function(e){return""!=e.username||""!=e.password},K=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},H=function(e,t){var r;return 2==e.length&&j.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},Y=function(e){var t;return e.length>1&&H(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Z=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&H(t[0],!0)||t.pop()},Q=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},re={},ne={},oe={},ie={},se={},ae={},ce={},ue={},le={},fe={},pe={},he={},de={},ve={},ge={},be={},me={},we={},ye={},xe=function(e,t,r,o){var i,s,a,c,u,l=r||ee,p=0,d="",v=!1,g=!1,b=!1;for(r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(N,"")),t=t.replace(_,""),i=h(t);p<=i.length;){switch(s=i[p],l){case ee:if(!s||!j.test(s)){if(r)return"Invalid scheme";l=re;continue}d+=s.toLowerCase(),l=te;break;case te:if(s&&(A.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(r)return"Invalid scheme";d="",l=re,p=0;continue}if(r&&(V(e)!=f(J,d)||"file"==d&&(X(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,r)return void(V(e)&&J[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?l=he:V(e)&&o&&o.scheme==e.scheme?l=ne:V(e)?l=ae:"/"==i[p+1]?(l=oe,p++):(e.cannotBeABaseURL=!0,e.path.push(""),l=me)}break;case re:if(!o||o.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(o.cannotBeABaseURL&&"#"==s){e.scheme=o.scheme,e.path=o.path.slice(),e.query=o.query,e.fragment="",e.cannotBeABaseURL=!0,l=ye;break}l="file"==o.scheme?he:ie;continue;case ne:if("/"!=s||"/"!=i[p+1]){l=ie;continue}l=ce,p++;break;case oe:if("/"==s){l=ue;break}l=be;continue;case ie:if(e.scheme=o.scheme,s==n)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query;else if("/"==s||"\\"==s&&V(e))l=se;else if("?"==s)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query="",l=we;else{if("#"!=s){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.path.pop(),l=be;continue}e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query,e.fragment="",l=ye}break;case se:if(!V(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,l=be;continue}l=ue}else l=ce;break;case ae:if(l=ce,"/"!=s||"/"!=d.charAt(p+1))continue;p++;break;case ce:if("/"!=s&&"\\"!=s){l=ue;continue}break;case ue:if("@"==s){v&&(d="%40"+d),v=!0,a=h(d);for(var m=0;m<a.length;m++){var w=a[m];if(":"!=w||b){var y=q(w,G);b?e.password+=y:e.username+=y}else b=!0}d=""}else if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&V(e)){if(v&&""==d)return"Invalid authority";p-=h(d).length+1,d="",l=le}else d+=s;break;case le:case fe:if(r&&"file"==e.scheme){l=ve;continue}if(":"!=s||g){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&V(e)){if(V(e)&&""==d)return"Invalid host";if(r&&""==d&&(X(e)||null!==e.port))return;if(c=$(e,d))return c;if(d="",l=ge,r)return;continue}"["==s?g=!0:"]"==s&&(g=!1),d+=s}else{if(""==d)return"Invalid host";if(c=$(e,d))return c;if(d="",l=pe,r==fe)return}break;case pe:if(!T.test(s)){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&V(e)||r){if(""!=d){var x=parseInt(d,10);if(x>65535)return"Invalid port";e.port=V(e)&&x===J[e.scheme]?null:x,d=""}if(r)return;l=ge;continue}return"Invalid port"}d+=s;break;case he:if(e.scheme="file","/"==s||"\\"==s)l=de;else{if(!o||"file"!=o.scheme){l=be;continue}if(s==n)e.host=o.host,e.path=o.path.slice(),e.query=o.query;else if("?"==s)e.host=o.host,e.path=o.path.slice(),e.query="",l=we;else{if("#"!=s){Y(i.slice(p).join(""))||(e.host=o.host,e.path=o.path.slice(),Z(e)),l=be;continue}e.host=o.host,e.path=o.path.slice(),e.query=o.query,e.fragment="",l=ye}}break;case de:if("/"==s||"\\"==s){l=ve;break}o&&"file"==o.scheme&&!Y(i.slice(p).join(""))&&(H(o.path[0],!0)?e.path.push(o.path[0]):e.host=o.host),l=be;continue;case ve:if(s==n||"/"==s||"\\"==s||"?"==s||"#"==s){if(!r&&H(d))l=be;else if(""==d){if(e.host="",r)return;l=ge}else{if(c=$(e,d))return c;if("localhost"==e.host&&(e.host=""),r)return;d="",l=ge}continue}d+=s;break;case ge:if(V(e)){if(l=be,"/"!=s&&"\\"!=s)continue}else if(r||"?"!=s)if(r||"#"!=s){if(s!=n&&(l=be,"/"!=s))continue}else e.fragment="",l=ye;else e.query="",l=we;break;case be:if(s==n||"/"==s||"\\"==s&&V(e)||!r&&("?"==s||"#"==s)){if(".."===(u=(u=d).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(Z(e),"/"==s||"\\"==s&&V(e)||e.path.push("")):Q(d)?"/"==s||"\\"==s&&V(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&H(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(s==n||"?"==s||"#"==s))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",l=we):"#"==s&&(e.fragment="",l=ye)}else d+=q(s,W);break;case me:"?"==s?(e.query="",l=we):"#"==s?(e.fragment="",l=ye):s!=n&&(e.path[0]+=q(s,z));break;case we:r||"#"!=s?s!=n&&("'"==s&&V(e)?e.query+="%27":e.query+="#"==s?"%23":q(s,z)):(e.fragment="",l=ye);break;case ye:s!=n&&(e.fragment+=q(s,U))}p++}},Oe=function(e){var t,r,n=l(this,Oe,"URL"),o=arguments.length>1?arguments[1]:void 0,s=String(e),a=O(n,{type:"URL"});if(void 0!==o)if(o instanceof Oe)t=S(o);else if(r=xe(t={},String(o)))throw TypeError(r);if(r=xe(a,s,null,t))throw TypeError(r);var c=a.searchParams=new y,u=x(c);u.updateSearchParams(a.query),u.updateURL=function(){a.query=String(c)||null},i||(n.href=Ee.call(n),n.origin=ke.call(n),n.protocol=je.call(n),n.username=Ae.call(n),n.password=Te.call(n),n.host=Pe.call(n),n.hostname=Ce.call(n),n.port=Ie.call(n),n.pathname=Fe.call(n),n.search=Re.call(n),n.searchParams=Le.call(n),n.hash=Ne.call(n))},Se=Oe.prototype,Ee=function(){var e=S(this),t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,s=e.path,a=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",X(e)&&(u+=r+(n?":"+n:"")+"@"),u+=M(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},ke=function(){var e=S(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&V(e)?t+"://"+M(e.host)+(null!==r?":"+r:""):"null"},je=function(){return S(this).scheme+":"},Ae=function(){return S(this).username},Te=function(){return S(this).password},Pe=function(){var e=S(this),t=e.host,r=e.port;return null===t?"":null===r?M(t):M(t)+":"+r},Ce=function(){var e=S(this).host;return null===e?"":M(e)},Ie=function(){var e=S(this).port;return null===e?"":String(e)},Fe=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Re=function(){var e=S(this).query;return e?"?"+e:""},Le=function(){return S(this).searchParams},Ne=function(){var e=S(this).fragment;return e?"#"+e:""},_e=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&c(Se,{href:_e(Ee,function(e){var t=S(this),r=String(e),n=xe(t,r);if(n)throw TypeError(n);x(t.searchParams).updateSearchParams(t.query)}),origin:_e(ke),protocol:_e(je,function(e){var t=S(this);xe(t,String(e)+":",ee)}),username:_e(Ae,function(e){var t=S(this),r=h(String(e));if(!K(t)){t.username="";for(var n=0;n<r.length;n++)t.username+=q(r[n],G)}}),password:_e(Te,function(e){var t=S(this),r=h(String(e));if(!K(t)){t.password="";for(var n=0;n<r.length;n++)t.password+=q(r[n],G)}}),host:_e(Pe,function(e){var t=S(this);t.cannotBeABaseURL||xe(t,String(e),le)}),hostname:_e(Ce,function(e){var t=S(this);t.cannotBeABaseURL||xe(t,String(e),fe)}),port:_e(Ie,function(e){var t=S(this);K(t)||(""==(e=String(e))?t.port=null:xe(t,e,pe))}),pathname:_e(Fe,function(e){var t=S(this);t.cannotBeABaseURL||(t.path=[],xe(t,e+"",ge))}),search:_e(Re,function(e){var t=S(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",xe(t,e,we)),x(t.searchParams).updateSearchParams(t.query)}),searchParams:_e(Le),hash:_e(Ne,function(e){var t=S(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",xe(t,e,ye)):t.fragment=null})}),u(Se,"toJSON",function(){return Ee.call(this)},{enumerable:!0}),u(Se,"toString",function(){return Ee.call(this)},{enumerable:!0}),w){var $e=w.createObjectURL,Be=w.revokeObjectURL;$e&&u(Oe,"createObjectURL",function(e){return $e.apply(w,arguments)}),Be&&u(Oe,"revokeObjectURL",function(e){return Be.apply(w,arguments)})}g(Oe,"URL"),o({global:!0,forced:!s,sham:!i},{URL:Oe})},function(e,t,r){var n=r(2),o=r(1),i=r(18),s=o("iterator");e.exports=!n(function(){var e=new URL("b?e=1","http://a"),t=e.searchParams;return e.pathname="c%20d",i&&!e.toJSON||!t.sort||"http://a/c%20d?e=1"!==e.href||"1"!==t.get("e")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[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(e,t,r){r(7),(()=>{const e=r(22),t=r(131),n=r(76),o=r(132),{Job:i,Task:s}=r(133),{Attribute:a,Label:c}=r(148),{ShareFileType:u,TaskStatus:l,TaskMode:f,AttributeType:p,ObjectType:h,ObjectShape:d,LogType:v,EventType:g}=r(149),{Exception:b,ArgumentError:m,DataError:w,ScriptingError:y,PluginError:x,ServerError:O}=r(69),S=r(150),E=+Date.now().toString().substr(-6),k={server:{about:async()=>await e.apiWrapper(k.server.about),share:async(t="/")=>await e.apiWrapper(k.server.share,t),login:async(t,r)=>await e.apiWrapper(k.server.login,t,r)},tasks:{get:async(t={})=>await e.apiWrapper(k.tasks.get,t)},jobs:{get:async(t={})=>await e.apiWrapper(k.jobs.get,t)},users:{get:async(t={})=>await e.apiWrapper(k.users.get,t)},plugins:{list:async()=>await e.apiWrapper(k.plugins.list),register:async t=>await e.apiWrapper(k.plugins.register,t)},config:{preloadFrames:300,backendAPI:"http://localhost:7000/api/v1",proxy:!1,taskID:void 0,jobID:void 0,clientID:{get:()=>E}},client:{version:`${S.version}`},enums:{ShareFileType:u,TaskStatus:l,TaskMode:f,AttributeType:p,ObjectType:h,ObjectShape:d,LogType:v,EventType:g},exceptions:{Exception:b,ArgumentError:m,DataError:w,ScriptingError:y,PluginError:x,ServerError:O},classes:{Task:s,User:t,Job:i,Attribute:a,Label:c,Statistics:o,ObjectState:n}};k.server=Object.freeze(k.server),k.tasks=Object.freeze(k.tasks),k.jobs=Object.freeze(k.jobs),k.users=Object.freeze(k.users),k.plugins=Object.freeze(k.plugins),k.client=Object.freeze(k.client),k.enums=Object.freeze(k.enums),k.Job=Object.freeze(k.Job),k.Task=Object.freeze(k.Task);const j=r(151);"undefined"==typeof window&&r(!function(){var e=new Error("Cannot find module 'browser-env'");throw e.code="MODULE_NOT_FOUND",e}())(),window.cvat=Object.freeze(j(k))})()},function(e,t,r){var n=r(0),o=r(48),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(o.call(i))},function(e,t,r){var n=r(28),o=r(83),i=r(53),s=r(3);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=i.f;return r?t.concat(r(e)):t}},function(e,t,r){var n=r(52),o=r(40).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},function(e,t,r){var n=r(26),o=r(29),i=r(85),s=function(e){return function(t,r,s){var a,c=n(t),u=o(c.length),l=i(s,u);if(e&&r!=r){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},function(e,t,r){var n=r(30),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},function(e,t,r){var n=r(2);e.exports=!!Object.getOwnPropertySymbols&&!n(function(){return!String(Symbol())})},function(e,t,r){"use strict";var n=r(28),o=r(13),i=r(1),s=r(8),a=i("species");e.exports=function(e){var t=n(e),r=o.f;s&&t&&!t[a]&&r(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(3),o=r(56),i=r(29),s=r(31),a=r(32),c=r(57),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,r,l,f){var p,h,d,v,g,b,m=s(t,r,l?2:1);if(f)p=e;else{if("function"!=typeof(h=a(e)))throw TypeError("Target is not iterable");if(o(h)){for(d=0,v=i(e.length);v>d;d++)if((g=l?m(n(b=e[d])[0],b[1]):m(e[d]))&&g instanceof u)return g;return new u(!1)}p=h.call(e)}for(;!(b=p.next()).done;)if((g=c(p,m,b.value,l))&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!0,e)}},function(e,t,r){var n=r(14),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){var n=r(1)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},function(e,t,r){var n=r(3),o=r(20),i=r(1)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||null==(r=n(s)[i])?t:o(r)}},function(e,t,r){var n,o,i,s,a,c,u,l=r(0),f=r(34).f,p=r(14),h=r(58).set,d=r(60),v=l.MutationObserver||l.WebKitMutationObserver,g=l.process,b=l.Promise,m="process"==p(g),w=f(l,"queueMicrotask"),y=w&&w.value;y||(n=function(){var e,t;for(m&&(e=g.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?s():i=void 0,e}}i=void 0,e&&e.enter()},m?s=function(){g.nextTick(n)}:v&&!/(iphone|ipod|ipad).*applewebkit/i.test(d)?(a=!0,c=document.createTextNode(""),new v(n).observe(c,{characterData:!0}),s=function(){c.data=a=!a}):b&&b.resolve?(u=b.resolve(void 0),s=function(){u.then(n)}):s=function(){h.call(l,n)}),e.exports=y||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,s()),i=t}},function(e,t,r){var n=r(3),o=r(9),i=r(61);e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){var n=r(0);e.exports=function(e,t){var r=n.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,r){"use strict";var n=r(11),o=r(8),i=r(0),s=r(5),a=r(9),c=r(13).f,u=r(50),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new l(e):void 0===e?l():l(e);return""===e&&(f[t]=!0),t};u(p,l);var h=p.prototype=l.prototype;h.constructor=p;var d=h.toString,v="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;c(h,"description",{configurable:!0,get:function(){var e=a(this)?this.valueOf():this,t=d.call(e);if(s(f,e))return"";var r=v?t.slice(7,-1):t.replace(g,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:p})}},function(e,t,r){var n=r(1),o=r(62),i=r(10),s=n("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,o(null)),e.exports=function(e){a[s][e]=!0}},function(e,t,r){var n=r(2);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,r){var n=r(3),o=r(100);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),o(i),t?e.call(r,i):r.__proto__=i,r}}():void 0)},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t){e.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(e,t,r){(function(e,n){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 t]&&t,c=i[typeof e]&&e&&!e.nodeType&&e,u=a&&c&&"object"==typeof n&&n;!u||u.global!==u&&u.window!==u&&u.self!==u||(s=u);var l=Math.pow(2,53)-1,f=/\bOpera/,p=Object.prototype,h=p.hasOwnProperty,d=p.toString;function v(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function g(e){return e=x(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:v(e)}function b(e,t){for(var r in e)h.call(e,r)&&t(e[r],r,e)}function m(e){return null==e?v(e):d.call(e).slice(8,-1)}function w(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function y(e,t){var r=null;return function(e,t){var r=-1,n=e?e.length:0;if("number"==typeof n&&n>-1&&n<=l)for(;++r<n;)t(e[r],r,e);else b(e,t)}(e,function(n,o){r=t(r,n,o,e)}),r}function x(e){return String(e).replace(/^ +| +$/g,"")}var O=function e(t){var r=s,n=t&&"object"==typeof t&&"String"!=m(t);n&&(r=t,t=null);var o=r.navigator||{},i=o.userAgent||"";t||(t=i);var a,c,u,l,p,h=n?!!o.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(d.toString()),v=n?"Object":"ScriptBridgingProxyObject",O=n?"Object":"Environment",S=n&&r.java?"JavaPackage":m(r.java),E=n?"Object":"RuntimeObject",k=/\bJava/.test(S)&&r.java,j=k&&m(r.environment)==O,A=k?"a":"α",T=k?"b":"β",P=r.document||{},C=r.operamini||r.opera,I=f.test(I=n&&C?C["[[Class]]"]:m(C))?I:C=null,F=t,R=[],L=null,N=t==i,_=N&&C&&"function"==typeof C.version&&C.version(),$=y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(e,r){return e||RegExp("\\b"+(r.pattern||w(r))+"\\b","i").exec(t)&&(r.label||r)}),B=function(e){return y(e,function(e,r){return e||RegExp("\\b"+(r.pattern||w(r))+"\\b","i").exec(t)&&(r.label||r)})}(["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"]),D=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"]),M=function(e){return y(e,function(e,r,n){return e||(r[D]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(D)]||RegExp("\\b"+w(n)+"(?:\\b|\\w*\\d)","i").exec(t))&&n})}({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(e){return y(e,function(e,r){var n=r.pattern||w(r);return!e&&(e=RegExp("\\b"+n+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,r){var n={"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 t&&r&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(n=n[/[\d.]+$/.exec(e)])&&(e="Windows "+n),e=String(e),t&&r&&(e=e.replace(RegExp(t,"i"),r)),e=g(e.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])}(e,n,r.label||r)),e})}(["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(e){return y(e,function(e,r){var n=r.pattern||w(r);return!e&&(e=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),r=r.label||r,e=g(e[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),e})}if($&&($=[$]),M&&!D&&(D=U([M])),(a=/\bGoogle TV\b/.exec(D))&&(D=a[0]),/\bSimulator\b/i.test(t)&&(D=(D?D+" ":"")+"Simulator"),"Opera Mini"==B&&/\bOPiOS\b/.test(t)&&R.push("running in Turbo/Uncompressed mode"),"IE"==B&&/\blike iPhone OS\b/.test(t)?(M=(a=e(t.replace(/like iPhone OS/,""))).manufacturer,D=a.product):/^iP/.test(D)?(B||(B="Safari"),z="iOS"+((a=/ OS ([\d_]+)/i.exec(t))?" "+a[1].replace(/_/g,"."):"")):"Konqueror"!=B||/buntu/i.test(z)?M&&"Google"!=M&&(/Chrome/.test(B)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(D))||/\bAndroid\b/.test(z)&&/^Chrome/.test(B)&&/\bVersion\//i.test(t)?(B="Android Browser",z=/\bAndroid\b/.test(z)?z:"Android"):"Silk"==B?(/\bMobi/i.test(t)||(z="Android",R.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&R.unshift("accelerated")):"PaleMoon"==B&&(a=/\bFirefox\/([\d.]+)\b/.exec(t))?R.push("identifying as Firefox "+a[1]):"Firefox"==B&&(a=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(z||(z="Firefox OS"),D||(D=a[1])):!B||(a=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(B))?(B&&!D&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(a+"/")+8))&&(B=null),(a=D||M||z)&&(D||M||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(z))&&(B=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(z)?z:a)+" Browser")):"Electron"==B&&(a=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&R.push("Chromium "+a):z="Kubuntu",_||(_=y(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(B),"(?:Firefox|Minefield|NetFront)"],function(e,r){return e||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null})),(a=("iCab"==$&&parseFloat(_)>3?"WebKit":/\bOpera\b/.test(B)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test($)&&"WebKit"||!$&&/\bMSIE\b/i.test(t)&&("Mac OS"==z?"Tasman":"Trident")||"WebKit"==$&&/\bPlayStation\b(?! Vita\b)/i.test(B)&&"NetFront")&&($=[a]),"IE"==B&&(a=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(B+=" Mobile",z="Windows Phone "+(/\+$/.test(a)?a:a+".x"),R.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(B="IE Mobile",z="Windows Phone 8.x",R.unshift("desktop mode"),_||(_=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=B&&"Trident"==$&&(a=/\brv:([\d.]+)/.exec(t))&&(B&&R.push("identifying as "+B+(_?" "+_:"")),B="IE",_=a[1]),N){if(l="global",p=null!=(u=r)?typeof u[l]:"number",/^(?:boolean|number|string|undefined)$/.test(p)||"object"==p&&!u[l])m(a=r.runtime)==v?(B="Adobe AIR",z=a.flash.system.Capabilities.os):m(a=r.phantom)==E?(B="PhantomJS",_=(a=a.version||null)&&a.major+"."+a.minor+"."+a.patch):"number"==typeof P.documentMode&&(a=/\bTrident\/(\d+)/i.exec(t))?(_=[_,P.documentMode],(a=+a[1]+4)!=_[1]&&(R.push("IE "+_[1]+" mode"),$&&($[1]=""),_[1]=a),_="IE"==B?String(_[1].toFixed(1)):_[0]):"number"==typeof P.documentMode&&/^(?:Chrome|Firefox)\b/.test(B)&&(R.push("masking as "+B+" "+_),B="IE",_="11.0",$=["Trident"],z="Windows");else if(k&&(F=(a=k.lang.System).getProperty("os.arch"),z=z||a.getProperty("os.name")+" "+a.getProperty("os.version")),j){try{_=r.require("ringo/engine").version.join("."),B="RingoJS"}catch(e){(a=r.system)&&a.global.system==r.system&&(B="Narwhal",z||(z=a[0].os||null))}B||(B="Rhino")}else"object"==typeof r.process&&!r.process.browser&&(a=r.process)&&("object"==typeof a.versions&&("string"==typeof a.versions.electron?(R.push("Node "+a.versions.node),B="Electron",_=a.versions.electron):"string"==typeof a.versions.nw&&(R.push("Chromium "+_,"Node "+a.versions.node),B="NW.js",_=a.versions.nw)),B||(B="Node.js",F=a.arch,z=a.platform,_=(_=/[\d.]+/.exec(a.version))?_[0]:null));z=z&&g(z)}if(_&&(a=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(_)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(N&&o.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(L=/b/i.test(a)?"beta":"alpha",_=_.replace(RegExp(a+"\\+?$"),"")+("beta"==L?T:A)+(/\d+\+?/.exec(a)||"")),"Fennec"==B||"Firefox"==B&&/\b(?:Android|Firefox OS)\b/.test(z))B="Firefox Mobile";else if("Maxthon"==B&&_)_=_.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(D))"Xbox 360"==D&&(z=null),"Xbox 360"==D&&/\bIEMobile\b/.test(t)&&R.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(B)&&(!B||D||/Browser|Mobi/.test(B))||"Windows CE"!=z&&!/Mobi/i.test(t))if("IE"==B&&N)try{null===r.external&&R.unshift("platform preview")}catch(e){R.unshift("embedded")}else(/\bBlackBerry\b/.test(D)||/\bBB10\b/.test(t))&&(a=(RegExp(D.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||_)?(z=((a=[a,/BB10/.test(t)])[1]?(D=null,M="BlackBerry"):"Device Software")+" "+a[0],_=null):this!=b&&"Wii"!=D&&(N&&C||/Opera/.test(B)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==B&&/\bOS X (?:\d+\.){2,}/.test(z)||"IE"==B&&(z&&!/^Win/.test(z)&&_>5.5||/\bWindows XP\b/.test(z)&&_>8||8==_&&!/\bTrident\b/.test(t)))&&!f.test(a=e.call(b,t.replace(f,"")+";"))&&a.name&&(a="ing as "+a.name+((a=a.version)?" "+a:""),f.test(B)?(/\bIE\b/.test(a)&&"Mac OS"==z&&(z=null),a="identify"+a):(a="mask"+a,B=I?g(I.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(a)&&(z=null),N||(_=null)),$=["Presto"],R.push(a));else B+=" Mobile";(a=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(a=[parseFloat(a.replace(/\.(\d)$/,".0$1")),a],"Safari"==B&&"+"==a[1].slice(-1)?(B="WebKit Nightly",L="alpha",_=a[1].slice(0,-1)):_!=a[1]&&_!=(a[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(_=null),a[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1],537.36==a[0]&&537.36==a[2]&&parseFloat(a[1])>=28&&"WebKit"==$&&($=["Blink"]),N&&(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"==B&&(!_||parseInt(_)>45)&&(_=a)),"Opera"==B&&(a=/\bzbov|zvav$/.exec(z))?(B+=" ",R.unshift("desktop mode"),"zvav"==a?(B+="Mini",_=null):B+="Mobile",z=z.replace(RegExp(" *"+a+"$"),"")):"Safari"==B&&/\bChrome\b/.exec($&&$[1])&&(R.unshift("desktop mode"),B="Chrome Mobile",_=null,/\bOS X\b/.test(z)?(M="Apple",z="iOS 4.3+"):z=null),_&&0==_.indexOf(a=/[\d.]+$/.exec(z))&&t.indexOf("/"+a+"-")>-1&&(z=x(z.replace(a,""))),$&&!/\b(?:Avant|Nook)\b/.test(B)&&(/Browser|Lunascape|Maxthon/.test(B)||"Safari"!=B&&/^iOS/.test(z)&&/\bSafari\b/.test($[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(B)&&$[1])&&(a=$[$.length-1])&&R.push(a),R.length&&(R=["("+R.join("; ")+")"]),M&&D&&D.indexOf(M)<0&&R.push("on "+M),D&&R.push((/^on /.test(R[R.length-1])?"":"on ")+D),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 e=this.version;return this.family+(e&&!c?" "+e:"")+(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),"")),B&&(/\bWOW64\b/i.test(t)||N&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(t))&&R.unshift("32-bit")):z&&/^OS X/.test(z.family)&&"Chrome"==B&&parseFloat(_)>=39&&(z.architecture=64),t||(t=null);var W={};return W.description=t,W.layout=$&&$[0],W.manufacturer=M,W.name=B,W.prerelease=L,W.product=D,W.ua=t,W.version=B&&_,W.os=z||{architecture:null,family:null,version:null,toString:function(){return"null"}},W.parse=e,W.toString=function(){return this.description||""},W.version&&R.unshift(_),W.name&&R.unshift(B),z&&B&&(z!=String(z).split(" ")[0]||z!=B.split(" ")[0]&&!D)&&R.push(D?"("+z+")":"on "+z),R.length&&(W.description=R.join(" ")),W}();s.platform=O,void 0===(o=function(){return O}.call(t,r,t,e))||(e.exports=o)}).call(this)}).call(this,r(103)(e),r(33))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n,o,i;!function(s,a){"use strict";o=[r(105)],void 0===(i="function"==typeof(n=function(e){var t=/(^|@)\S+\:\d+/,r=/^\s*at .*(\S+\:\d+|\(native\))/m,n=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(r))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){var n=t.stack.split("\n").filter(function(e){return!!e.match(r)},this);return n.map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var r=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),n=this.extractLocation(r.pop()),o=r.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new e({functionName:o,fileName:i,lineNumber:n[1],columnNumber:n[2],source:t})},this)},parseFFOrSafari:function(t){var r=t.stack.split("\n").filter(function(e){return!e.match(n)},this);return r.map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(t.replace(r,""));return new e({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),o=[],i=2,s=n.length;i<s;i+=2){var a=r.exec(n[i]);a&&o.push(new e({fileName:a[2],lineNumber:a[1],source:n[i]}))}return o},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),o=[],i=0,s=n.length;i<s;i+=2){var a=r.exec(n[i]);a&&o.push(new e({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:n[i]}))}return o},parseOpera11:function(r){var n=r.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this);return n.map(function(t){var r,n=t.split("@"),o=this.extractLocation(n.pop()),i=n.shift()||"",s=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(r=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new e({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})},this)}}})?n.apply(t,o):n)||(e.exports=i)}()},function(e,t,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function r(e){return function(){return this[e]}}var n=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=n.concat(o,i,["args"]);function a(e){if(e instanceof Object)for(var r=0;r<s.length;r++)e.hasOwnProperty(s[r])&&void 0!==e[s[r]]&&this["set"+t(s[r])](e[s[r]])}a.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof a)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new a(e)}},toString:function(){var t=this.getFunctionName()||"{anonymous}",r="("+(this.getArgs()||[]).join(",")+")",n=this.getFileName()?"@"+this.getFileName():"",o=e(this.getLineNumber())?":"+this.getLineNumber():"",i=e(this.getColumnNumber())?":"+this.getColumnNumber():"";return t+r+n+o+i}};for(var c=0;c<n.length;c++)a.prototype["get"+t(n[c])]=r(n[c]),a.prototype["set"+t(n[c])]=function(e){return function(t){this[e]=Boolean(t)}}(n[c]);for(var u=0;u<o.length;u++)a.prototype["get"+t(o[u])]=r(o[u]),a.prototype["set"+t(o[u])]=function(t){return function(r){if(!e(r))throw new TypeError(t+" must be a Number");this[t]=Number(r)}}(o[u]);for(var l=0;l<i.length;l++)a.prototype["get"+t(i[l])]=r(i[l]),a.prototype["set"+t(i[l])]=function(e){return function(t){this[e]=String(t)}}(i[l]);return a})?n.apply(t,o):n)||(e.exports=i)}()},function(e,t,r){"use strict";var n=r(107),o=r(3),i=r(23),s=r(29),a=r(30),c=r(17),u=r(109),l=r(110),f=Math.max,p=Math.min,h=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g;n("replace",2,function(e,t,r){return[function(r,n){var o=c(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,o,n):t.call(String(o),r,n)},function(e,i){var c=r(t,e,this,i);if(c.done)return c.value;var h=o(e),d=String(this),v="function"==typeof i;v||(i=String(i));var g=h.global;if(g){var b=h.unicode;h.lastIndex=0}for(var m=[];;){var w=l(h,d);if(null===w)break;if(m.push(w),!g)break;""===String(w[0])&&(h.lastIndex=u(d,s(h.lastIndex),b))}for(var y,x="",O=0,S=0;S<m.length;S++){w=m[S];for(var E=String(w[0]),k=f(p(a(w.index),d.length),0),j=[],A=1;A<w.length;A++)j.push(void 0===(y=w[A])?y:String(y));var T=w.groups;if(v){var P=[E].concat(j,k,d);void 0!==T&&P.push(T);var C=String(i.apply(void 0,P))}else C=n(E,d,k,j,T,i);k>=O&&(x+=d.slice(O,k)+C,O=k+E.length)}return x+d.slice(O)}];function n(e,r,n,o,s,a){var c=n+e.length,u=o.length,l=v;return void 0!==s&&(s=i(s),l=d),t.call(a,l,function(t,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,n);case"'":return r.slice(c);case"<":a=s[i.slice(1,-1)];break;default:var l=+i;if(0===l)return t;if(l>u){var f=h(l/10);return 0===f?t:f<=u?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):t}a=o[l-1]}return void 0===a?"":a})}})},function(e,t,r){"use strict";var n=r(10),o=r(15),i=r(2),s=r(1),a=r(70),c=s("species"),u=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),l=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]});e.exports=function(e,t,r,f){var p=s(e),h=!i(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),d=h&&!i(function(){var t=!1,r=/a/;return r.exec=function(){return t=!0,null},"split"===e&&(r.constructor={},r.constructor[c]=function(){return r}),r[p](""),!t});if(!h||!d||"replace"===e&&!u||"split"===e&&!l){var v=/./[p],g=r(p,""[e],function(e,t,r,n,o){return t.exec===a?h&&!o?{done:!0,value:v.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),b=g[0],m=g[1];o(String.prototype,e,b),o(RegExp.prototype,p,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)}),f&&n(RegExp.prototype[p],"sham",!0)}}},function(e,t,r){"use strict";var n=r(3);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,r){"use strict";var n=r(42).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},function(e,t,r){var n=r(14),o=r(70);e.exports=function(e,t){var r=e.exec;if("function"==typeof r){var i=r.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==n(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,r){var n,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(n=i)?n.call(t,r,t,e):n)||(e.exports=o),!0,e.exports=i(),!!0){var s=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=s,a}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}return function t(r){function n(t,o,i){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},n.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(e){}o=r.write?r.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).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=t+"="+o+c}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,p=0;p<l.length;p++){var h=l[p].split("="),d=h.slice(1).join("=");this.json||'"'!==d.charAt(0)||(d=d.slice(1,-1));try{var v=h[0].replace(f,decodeURIComponent);if(d=r.read?r.read(d,v):r(d,v)||d.replace(f,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(e){}if(t===v){s=d;break}t||(s[v]=d)}catch(e){}}return s}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,r){n(t,"",e(r,{expires:-1}))},n.withConverter=t,n}(function(){})})},function(e,t,r){e.exports=r(113)},function(e,t,r){"use strict";var n=r(4),o=r(71),i=r(115),s=r(43);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var c=a(s);c.Axios=i,c.create=function(e){return a(n.merge(s,e))},c.Cancel=r(75),c.CancelToken=r(129),c.isCancel=r(74),c.all=function(e){return Promise.all(e)},c.spread=r(130),e.exports=c,e.exports.default=c},function(e,t){
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(43),o=r(4),i=r(124),s=r(125);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],function(e){a.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){a.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=a},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var e=a(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),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=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(4);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(73);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}},function(e,t,r){"use strict";var n=r(4);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))}))}),i=s.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,r){"use strict";var n=r(4),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"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}}),s):s}},function(e,t,r){"use strict";var n=r(4);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(4);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(4);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,r){"use strict";var n=r(4),o=r(126),i=r(74),s=r(43),a=r(127),c=r(128);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return u(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(4);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(75);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){(()=>{e.exports=class{constructor(e){const t={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 r in t)Object.prototype.hasOwnProperty.call(t,r)&&r in e&&(t[r]=e[r]);Object.defineProperties(this,Object.freeze({id:{get:()=>t.id},username:{get:()=>t.username},email:{get:()=>t.email},firstName:{get:()=>t.first_name},lastName:{get:()=>t.last_name},groups:{get:()=>JSON.parse(JSON.stringify(t.groups))},lastLogin:{get:()=>t.last_login},dateJoined:{get:()=>t.date_joined},isStaff:{get:()=>t.is_staff},isSuperuser:{get:()=>t.is_superuser},isActive:{get:()=>t.is_active}}))}}})()},function(e,t){(()=>{e.exports=class{constructor(e,t){Object.defineProperties(this,Object.freeze({label:{get:()=>JSON.parse(JSON.stringify(e))},total:{get:()=>JSON.parse(JSON.stringify(t))}}))}}})()},function(e,t,r){r(6),r(7),r(134),r(12),r(44),(()=>{const t=r(22),n=r(24),{getFrame:o}=r(137),{getJobAnnotations:i,getTaskAnnotations:s}=r(145);function a(){const e=Object.freeze({value:{async upload(r){return await t.apiWrapper.call(this,e.value.upload,r)},async save(){return await t.apiWrapper.call(this,e.value.save)},async clear(){return await t.apiWrapper.call(this,e.value.clear)},async dump(){return await t.apiWrapper.call(this,e.value.dump)},async statistics(){return await t.apiWrapper.call(this,e.value.statistics)},async put(r=[]){return await t.apiWrapper.call(this,e.value.put,r)},async get(r,n={}){return await t.apiWrapper.call(this,e.value.get,r,n)},async search(r,n,o){return await t.apiWrapper.call(this,e.value.search,r,n,o)},async select(r,n,o){return await t.apiWrapper.call(this,e.value.select,r,n,o)}}}),r=Object.freeze({value:{async get(e){return await t.apiWrapper.call(this,r.value.get,e)}}}),n=Object.freeze({value:{async put(e,r){return await t.apiWrapper.call(this,n.value.put,e,r)},async save(){return await t.apiWrapper.call(this,n.value.save)}}}),o=Object.freeze({value:{async undo(e){return await t.apiWrapper.call(this,o.value.undo,e)},async redo(e){return await t.apiWrapper.call(this,o.value.redo,e)},async clear(){return await t.apiWrapper.call(this,o.value.clear)}}}),i=Object.freeze({value:{async subscribe(e,r){return await t.apiWrapper.call(this,i.value.subscribe,e,r)},async unsubscribe(e,r=null){return await t.apiWrapper.call(this,i.value.unsubscribe,e,r)}}});return Object.freeze({annotations:e,frames:r,logs:n,actions:o,events:i})}class c{constructor(){}}class u extends c{constructor(e){super();const t={id:void 0,assignee:void 0,status:void 0,start_frame:void 0,stop_frame:void 0,task:void 0};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&(r in e&&(t[r]=e[r]),void 0===t[r]))throw new window.cvat.exceptions.ArgumentError(`Job field "${r}" was not initialized`);Object.defineProperties(this,Object.freeze({id:{get:()=>t.id},assignee:{get:()=>t.assignee,set:()=>e=>{if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError("Value must be a non negative integer");t.assignee=e}},status:{get:()=>t.status,set:e=>{const r=window.cvat.enums.TaskStatus;let n=!1;for(const t in r)if(r[t]===e){n=!0;break}if(!n)throw new window.cvat.exceptions.ArgumentError("Value must be a value from the enumeration cvat.enums.TaskStatus");t.status=e}},startFrame:{get:()=>t.start_frame},stopFrame:{get:()=>t.stop_frame},task:{get:()=>t.task}})),this.frames.get.implementation=this.frames.get.implementation.bind(this),this.annotations.get.implementation=this.annotations.get.implementation.bind(this)}async save(){return await t.apiWrapper.call(this,u.prototype.save)}}Object.defineProperties(u.prototype,a()),u.prototype.save.implementation=async function(){if(this.id){const e={status:this.status};return await n.jobs.saveJob(this.id,e),this}throw window.cvat.exceptions.ArgumentError("Can not save job without and id")},u.prototype.frames.get.implementation=async function(e){if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError(`Frame must be a positive integer. Got: "${e}"`);if(e<this.startFrame||e>this.stopFrame)throw new window.cvat.exceptions.ArgumentError(`Frame ${e} does not exist in the job`);return await o(this.task.id,this.task.mode,e)},u.prototype.annotations.get.implementation=async function(e,t){if(e<this.startFrame||e>this.stopFrame)throw new window.cvat.exceptions.ArgumentError(`Frame ${e} does not exist in the job`);return await i(this,e,t)};class l extends c{constructor(e){super();const t={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 r in t)Object.prototype.hasOwnProperty.call(t,r)&&r in e&&(t[r]=e[r]);if(t.labels=[],t.jobs=[],t.files=Object.freeze({server_files:[],client_files:[],remote_files:[]}),Array.isArray(e.segments))for(const r of e.segments)if(Array.isArray(r.jobs))for(const e of r.jobs){const n=new window.cvat.classes.Job({url:e.url,id:e.id,assignee:e.assignee,status:e.status,start_frame:r.start_frame,stop_frame:r.stop_frame,task:this});t.jobs.push(n)}if(Array.isArray(e.labels))for(const r of e.labels){const e=new window.cvat.classes.Label(r);t.labels.push(e)}Object.defineProperties(this,Object.freeze({id:{get:()=>t.id},name:{get:()=>t.name,set:e=>{if(!e.trim().length)throw new window.cvat.exceptions.ArgumentError("Value must not be empty");t.name=e}},status:{get:()=>t.status},size:{get:()=>t.size},mode:{get:()=>t.mode},owner:{get:()=>t.owner},assignee:{get:()=>t.assignee,set:()=>e=>{if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError("Value must be a non negative integer");t.assignee=e}},createdDate:{get:()=>t.created_date},updatedDate:{get:()=>t.updated_date},bugTracker:{get:()=>t.bug_tracker,set:e=>{t.bug_tracker=e}},overlap:{get:()=>t.overlap,set:e=>{if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError("Value must be a non negative integer");t.overlap=e}},segmentSize:{get:()=>t.segment_size,set:e=>{if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError("Value must be a positive integer");t.segment_size=e}},zOrder:{get:()=>t.z_order,set:e=>{if("boolean"!=typeof e)throw new window.cvat.exceptions.ArgumentError("Value must be a boolean");t.z_order=e}},imageQuality:{get:()=>t.image_quality,set:e=>{if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError("Value must be a positive integer");t.image_quality=e}},labels:{get:()=>[...t.labels],set:e=>{if(!Array.isArray(e))throw new window.cvat.exceptions.ArgumentError("Value must be an array of Labels");for(const t of e)if(!(t instanceof window.cvat.classes.Label))throw new window.cvat.exceptions.ArgumentError("Each array value must be an instance of Label. "+`${typeof t} was found`);void 0===t.id?t.labels=[...e]:t.labels=t.labels.concat([...e])}},jobs:{get:()=>[...t.jobs]},serverFiles:{get:()=>[...t.files.server_files],set:e=>{if(!Array.isArray(e))throw new window.cvat.exceptions.ArgumentError(`Value must be an array. But ${typeof e} has been got.`);for(const t of e)if("string"!=typeof t)throw new window.cvat.exceptions.ArgumentError(`Array values must be a string. But ${typeof t} has been got.`);Array.prototype.push.apply(t.files.server_files,e)}},clientFiles:{get:()=>[...t.files.client_files],set:e=>{if(!Array.isArray(e))throw new window.cvat.exceptions.ArgumentError(`Value must be an array. But ${typeof e} has been got.`);for(const t of e)if(!(t instanceof window.File))throw new window.cvat.exceptions.ArgumentError(`Array values must be a File. But ${t.constructor.name} has been got.`);Array.prototype.push.apply(t.files.client_files,e)}},remoteFiles:{get:()=>[...t.files.remote_files],set:e=>{if(!Array.isArray(e))throw new window.cvat.exceptions.ArgumentError(`Value must be an array. But ${typeof e} has been got.`);for(const t of e)if("string"!=typeof t)throw new window.cvat.exceptions.ArgumentError(`Array values must be a string. But ${typeof t} has been got.`);Array.prototype.push.apply(t.files.remote_files,e)}}})),this.frames.get.implementation=this.frames.get.implementation.bind(this),this.annotations.get.implementation=this.annotations.get.implementation.bind(this)}async save(e=(()=>{})){return await t.apiWrapper.call(this,l.prototype.save,e)}async delete(){return await t.apiWrapper.call(this,l.prototype.delete)}}Object.defineProperties(l.prototype,a()),l.prototype.save.implementation=async function(e){if(void 0!==this.id){const e={name:this.name,bug_tracker:this.bugTracker,z_order:this.zOrder,labels:[...this.labels.map(e=>e.toJSON())]};return await n.tasks.saveTask(this.id,e),this}const t={name:this.name,labels:this.labels.map(e=>e.toJSON()),image_quality:this.imageQuality,z_order:Boolean(this.zOrder)};this.bugTracker&&(t.bug_tracker=this.bugTracker),this.segmentSize&&(t.segment_size=this.segmentSize),this.overlap&&(t.overlap=this.overlap);const r={client_files:this.clientFiles,server_files:this.serverFiles,remote_files:[]},o=await n.tasks.createTask(t,r,e);return new l(o)},l.prototype.delete.implementation=async function(){n.tasks.deleteTask(this.id)},l.prototype.frames.get.implementation=async function(e){if(e>=this.size)throw new window.cvat.exceptions.ArgumentError(`Frame ${e} does not exist in the task`);return await o(this.id,this.mode,e)},l.prototype.annotations.get.implementation=async function(e,t){if(!Number.isInteger(e)||e<0)throw new window.cvat.exceptions.ArgumentError(`Frame must be a positive integer. Got: "${e}"`);if(e>=this.size)throw new window.cvat.exceptions.ArgumentError(`Frame ${e} does not exist in the task`);return await s(this,e,t)},e.exports={Job:u,Task:l}})()},function(e,t,r){"use strict";var n=r(11),o=r(135).trim;n({target:"String",proto:!0,forced:r(136)("trim")},{trim:function(){return o(this)}})},function(e,t,r){var n=r(17),o="["+r(77)+"]",i=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),a=function(e){return function(t){var r=String(n(t));return 1&e&&(r=r.replace(i,"")),2&e&&(r=r.replace(s,"")),r}};e.exports={start:a(1),end:a(2),trim:a(3)}},function(e,t,r){var n=r(2),o=r(77);e.exports=function(e){return n(function(){return!!o[e]()||"…"!="…"[e]()||o[e].name!==e})}},function(e,t,r){(function(t){r(6),r(7),r(12),r(78),(()=>{const n=r(22),o=r(24),i={},s={};class a{constructor(e,t,r,n){Object.defineProperties(this,Object.freeze({width:{value:e,writable:!1},height:{value:t,writable:!1},tid:{value:r,writable:!1},number:{value:n,writable:!1}}))}async frame(){return await n.apiWrapper.call(this,a.prototype.frame)}}a.prototype.frame.implementation=async function(){if(!(this.number in s[this.tid])){const e=await o.frames.getFrame(this.tid,this.number);if(window.URL.createObjectURL){const t=window.URL.createObjectURL(new Blob([e]));s[this.tid][this.number]=t}else s[this.tid][this.number]=t.Buffer.from(e,"binary").toString("base64")}return s[this.tid][this.number]},e.exports={FrameData:a,getFrame:async function(e,t,r){if(e in i||(i[e]={},i[e].meta=await o.frames.getMeta(e),s[e]={}),!(r in i[e])){let n=null;if("interpolation"===t)[n]=i[e].meta;else{if("annotation"!==t)throw new window.cvat.exceptions.ArgumentError(`Invalid mode is specified ${t}`);if(r>=i[e].meta.length)throw new window.cvat.exceptions.ArgumentError(`Meta information about frame ${r} can't be received from the server`);n=i[e].meta[r]}i[e][r]=new a(n.width,n.height,e,r)}return i[e][r]}}})()}).call(this,r(33))},function(e,t,r){"use strict";var n=r(42).charAt,o=r(16),i=r(65),s=o.set,a=o.getterFor("String Iterator");i(String,"String",function(e){s(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=a(this),r=t.string,o=t.index;return o>=r.length?{value:void 0,done:!0}:(e=n(r,o),t.index+=e.length,{value:e,done:!1})})},function(e,t,r){"use strict";var n=r(8),o=r(2),i=r(64),s=r(53),a=r(45),c=r(23),u=r(46),l=Object.assign;e.exports=!l||o(function(){var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!=l({},e)[r]||"abcdefghijklmnopqrst"!=i(l({},t)).join("")})?function(e,t){for(var r=c(e),o=arguments.length,l=1,f=s.f,p=a.f;o>l;)for(var h,d=u(arguments[l++]),v=f?i(d).concat(f(d)):i(d),g=v.length,b=0;g>b;)h=v[b++],n&&!p.call(d,h)||(r[h]=d[h]);return r}:l},function(e,t,r){"use strict";var n=r(31),o=r(23),i=r(57),s=r(56),a=r(29),c=r(141),u=r(32);e.exports=function(e){var t,r,l,f,p=o(e),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,g=void 0!==v,b=0,m=u(p);if(g&&(v=n(v,d>2?arguments[2]:void 0,2)),null==m||h==Array&&s(m))for(r=new h(t=a(p.length));t>b;b++)c(r,b,g?v(p[b],b):p[b]);else for(f=m.call(p),r=new h;!(l=f.next()).done;b++)c(r,b,g?i(f,v,[l.value,b],!0):l.value);return r.length=b,r}},function(e,t,r){"use strict";var n=r(35),o=r(13),i=r(25);e.exports=function(e,t,r){var s=n(t);s in e?o.f(e,s,i(0,r)):e[s]=r}},function(e,t,r){"use strict";var n=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",s=Math.floor,a=String.fromCharCode,c=function(e){return e+22+75*(e<26)},u=function(e,t,r){var n=0;for(e=r?s(e/700):e>>1,e+=s(e/t);e>455;n+=36)e=s(e/35);return s(n+36*e/(e+38))},l=function(e){var t,r,n=[],o=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=e.charCodeAt(r++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),r--)}else t.push(o)}return t}(e)).length,l=128,f=0,p=72;for(t=0;t<e.length;t++)(r=e[t])<128&&n.push(a(r));var h=n.length,d=h;for(h&&n.push("-");d<o;){var v=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=l&&r<v&&(v=r);var g=d+1;if(v-l>s((2147483647-f)/g))throw RangeError(i);for(f+=(v-l)*g,l=v,t=0;t<e.length;t++){if((r=e[t])<l&&++f>2147483647)throw RangeError(i);if(r==l){for(var b=f,m=36;;m+=36){var w=m<=p?1:m>=p+26?26:m-p;if(b<w)break;var y=b-w,x=36-w;n.push(a(c(w+y%x))),b=s(y/x)}n.push(a(c(b))),p=u(f,g,d==h),f=0,++d}}++f,++l}return n.join("")};e.exports=function(e){var t,r,i=[],s=e.toLowerCase().replace(o,".").split(".");for(t=0;t<s.length;t++)r=s[t],i.push(n.test(r)?"xn--"+l(r):r);return i.join(".")}},function(e,t,r){"use strict";r(6);var n=r(11),o=r(79),i=r(15),s=r(55),a=r(19),c=r(66),u=r(16),l=r(41),f=r(5),p=r(31),h=r(3),d=r(9),v=r(144),g=r(32),b=r(1)("iterator"),m=u.set,w=u.getterFor("URLSearchParams"),y=u.getterFor("URLSearchParamsIterator"),x=/\+/g,O=Array(4),S=function(e){return O[e-1]||(O[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},E=function(e){try{return decodeURIComponent(e)}catch(t){return e}},k=function(e){var t=e.replace(x," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=t.replace(S(r--),E);return t}},j=/[!'()~]|%20/g,A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},T=function(e){return A[e]},P=function(e){return encodeURIComponent(e).replace(j,T)},C=function(e,t){if(t)for(var r,n,o=t.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),e.push({key:k(n.shift()),value:k(n.join("="))}))},I=function(e){this.entries.length=0,C(this.entries,e)},F=function(e,t){if(e<t)throw TypeError("Not enough arguments")},R=c(function(e,t){m(this,{type:"URLSearchParamsIterator",iterator:v(w(e).entries),kind:t})},"Iterator",function(){var e=y(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),L=function(){l(this,L,"URLSearchParams");var e,t,r,n,o,i,s,a=arguments.length>0?arguments[0]:void 0,c=[];if(m(this,{type:"URLSearchParams",entries:c,updateURL:function(){},updateSearchParams:I}),void 0!==a)if(d(a))if("function"==typeof(e=g(a)))for(t=e.call(a);!(r=t.next()).done;){if((o=(n=v(h(r.value))).next()).done||(i=n.next()).done||!n.next().done)throw TypeError("Expected sequence with length 2");c.push({key:o.value+"",value:i.value+""})}else for(s in a)f(a,s)&&c.push({key:s,value:a[s]+""});else C(c,"string"==typeof a?"?"===a.charAt(0)?a.slice(1):a:a+"")},N=L.prototype;s(N,{append:function(e,t){F(arguments.length,2);var r=w(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){F(arguments.length,1);for(var t=w(this),r=t.entries,n=e+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;t.updateURL()},get:function(e){F(arguments.length,1);for(var t=w(this).entries,r=e+"",n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){F(arguments.length,1);for(var t=w(this).entries,r=e+"",n=[],o=0;o<t.length;o++)t[o].key===r&&n.push(t[o].value);return n},has:function(e){F(arguments.length,1);for(var t=w(this).entries,r=e+"",n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){F(arguments.length,1);for(var r,n=w(this),o=n.entries,i=!1,s=e+"",a=t+"",c=0;c<o.length;c++)(r=o[c]).key===s&&(i?o.splice(c--,1):(i=!0,r.value=a));i||o.push({key:s,value:a}),n.updateURL()},sort:function(){var e,t,r,n=w(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(e=i[r],t=0;t<r;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===r&&o.push(e)}n.updateURL()},forEach:function(e){for(var t,r=w(this).entries,n=p(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new R(this,"keys")},values:function(){return new R(this,"values")},entries:function(){return new R(this,"entries")}},{enumerable:!0}),i(N,b,N.entries),i(N,"toString",function(){for(var e,t=w(this).entries,r=[],n=0;n<t.length;)e=t[n++],r.push(P(e.key)+"="+P(e.value));return r.join("&")},{enumerable:!0}),a(L,"URLSearchParams"),n({global:!0,forced:!o},{URLSearchParams:L}),e.exports={URLSearchParams:L,getState:w}},function(e,t,r){var n=r(3),o=r(32);e.exports=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return n(t.call(e))}},function(e,t,r){r(6),r(146),r(7),r(12),r(44),(()=>{const t=r(24),n=r(76);class o{constructor(e,t,r){this.clientID=t,this.serverID=e.id,this.labelID=e.label_id,this.frame=e.frame,this.attributes=e.attributes.reduce((e,t)=>(e[t.spec_id]=t.value,e),{}),this.taskLabels=r.labels}}class i extends o{constructor(e,t,r,n){super(e,t,n),this.points=e.points,this.occluded=e.occluded,this.zOrder=e.z_order,this.group=e.group,this.color=r,this.shape=null}toJSON(){return{occluded:this.occluded,z_order:this.zOrder,points:[...this.points],attributes:Object.keys(this.attributes).reduce((e,t)=>(e.push({spec_id:t,value:this.attributes[t]}),e),[]),id:this.serverID,frame:this.frame,label_id:this.labelID,group:this.group}}get(e){if(e!==this.frame)throw new window.cvat.exceptions.ScriptingError("Got frame is not equal to the frame of the shape");return{type:window.cvat.enums.ObjectType.SHAPE,shape:this.shape,clientID:this.clientID,occluded:this.occluded,zOrder:this.zOrder,points:[...this.points],attributes:Object.assign({},this.attributes),label:this.taskLabels[this.labelID],group:this.group}}}class s extends o{constructor(e,t,r,n){super(e,t,n),this.shapes=e.shapes.reduce((e,t)=>(e[t.frame]={serverID:t.id,occluded:t.occluded,zOrder:t.z_order,points:t.points,id:t.id,frame:t.frame,outside:t.outside,attributes:t.attributes.reduce((e,t)=>(e[t.spec_id]=t.value,e),{})},e),{}),this.group=e.group,this.attributes=e.attributes.reduce((e,t)=>(e[t.spec_id]=t.value,e),{}),this.color=r,this.shape=null}toJSON(){return{occluded:this.occluded,z_order:this.zOrder,points:[...this.points],attributes:Object.keys(this.attributes).reduce((e,t)=>(e.push({spec_id:t,value:this.attributes[t]}),e),[]),id:this.serverID,frame:this.frame,label_id:this.labelID,group:this.group,shapes:Object.keys(this.shapes).reduce((e,t)=>(e.push({type:this.type,occluded:this.shapes[t].occluded,z_order:this.shapes[t].zOrder,points:[...this.shapes[t].points],outside:[...this.shapes[t].outside],attributes:Object.keys(...this.shapes[t].attributes).reduce((e,r)=>(e.push({spec_id:r,value:this.shapes[t].attributes[r]}),e),[]),id:this.shapes[t].serverID,frame:+t}),e),[])}}get(e){return Object.assign({},this.interpolatePosition(e),{attributes:this.interpolateAttributes(e),label:this.taskLabels[this.labelID],group:this.group,type:window.cvat.enums.ObjectType.TRACK,shape:this.shape,clientID:this.clientID})}neighborsFrames(e){const t=Object.keys(this.shapes).map(e=>+e);let r=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER;for(const o of t){const t=Math.abs(e-o);o<=e&&t<r?r=t:t<n&&(n=t)}return{leftFrame:r===Number.MAX_SAFE_INTEGER?null:e-r,rightFrame:n===Number.MAX_SAFE_INTEGER?null:e+n}}interpolateAttributes(e){const t={};for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t[e]=this.attributes[e]);const r=Object.keys(this.shapes).sort((e,t)=>+e-+t);for(const n of r)if(n<=e){const{attributes:e}=this.shapes[n];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}const n=this.taskLabels[this.labelID].attributes.reduce((e,t)=>(e[t.id]=t.defaultValue,e),{});for(const e of Object.keys(n))e in t||(t[e]=n[e]);return t}}class a extends o{constructor(e,t,r){super(e,t,r)}toJSON(){return{}}get(e){if(e!==this.frame)throw new window.cvat.exceptions.ScriptingError("Got frame is not equal to the frame of the shape")}}class c extends i{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.RECTANGLE}}class u extends i{constructor(e,t,r,n){super(e,t,r,n)}}class l extends u{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.POLYGON}}class f extends u{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.POLYLINE}}class p extends u{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.POINTS}}class h extends s{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.RECTANGLE}interpolatePosition(e){const{leftFrame:t,rightFrame:r}=this.neighborsFrames(e),n=r?this.shapes[r]:null,o=t?this.shapes[t]:null;if(o&&t===e)return{points:[...o.points],occluded:o.occluded,outside:o.outside,zOrder:o.zOrder};if(n&&o){const r=(e-t)/(n-o),i=[n.points[0]-o.points[0],n.points[1]-o.points[1],n.points[2]-o.points[2],n.points[3]-o.points[3]];return{points:[o.points[0]+i[0]*r,o.points[1]+i[1]*r,o.points[2]+i[2]*r,o.points[3]+i[3]*r],occluded:o.occluded,outside:o.outside,zOrder:o.zOrder}}if(n)return{points:[...n.points],occluded:n.occluded,outside:!0,zOrder:0};if(o)return{points:[...o.points],occluded:o.occluded,outside:o.outside,zOrder:0};throw new window.cvat.exceptions.ScriptingError(`No one neightbour frame found for the track with client ID: "${this.id}"`)}}class d extends s{constructor(e,t,r,n){super(e,t,r,n)}}class v extends d{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.POLYGON}}class g extends d{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.POLYLINE}}class b extends d{constructor(e,t,r,n){super(e,t,r,n),this.shape=window.cvat.enums.ObjectShape.POINTS}}const m=["#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"];class w{constructor(e){this.labels=e.reduce((e,t)=>(e[t.id]=t,e),{}),this.empty()}import(e){this.empty();const t={labels:this.labels};function r(e,r){const{type:n}=e,o=m[r%m.length];let i=null;switch(n){case"rectangle":i=new c(e,r,o,t);break;case"polygon":i=new l(e,r,o,t);break;case"polyline":i=new f(e,r,o,t);break;case"points":i=new p(e,r,o,t);break;default:throw new window.cvat.exceptions.DataError(`An unexpected type of shape "${n}"`)}return i}function n(e,r){if(e.shapes.length){const{type:n}=e.shapes[0],o=m[r%m.length];let i=null;switch(n){case"rectangle":i=new h(e,r,o,t);break;case"polygon":i=new v(e,r,o,t);break;case"polyline":i=new g(e,r,o,t);break;case"points":i=new b(e,r,o,t);break;default:throw new window.cvat.exceptions.DataError(`An unexpected type of track "${n}"`)}return i}return console.warn("The track without any shapes had been found. It was ignored."),null}for(const r of e.tags){const e=++this.count,n=new a(r,e,t);this.tags[n.frame]=this.tags[n.frame]||[],this.tags[n.frame].push(n),this.objects[e]=n}for(const t of e.shapes){const e=++this.count,n=r(t,e);this.shapes[n.frame]=this.shapes[n.frame]||[],this.shapes[n.frame].push(n),this.objects[e]=n}for(const t of e.tracks){const e=++this.count,r=n(t,e);r&&(this.tracks.push(r),this.objects[e]=r)}}export(){return{tracks:Object.values(this.tracks).reduce((e,t)=>(e.push(...t),e),[]).map(e=>e.toJSON()),shapes:this.shapes.map(e=>e.toJSON()),tags:this.shapes.map(e=>e.toJSON())}}empty(){this.shapes={},this.tags={},this.tracks=[],this.objects={},this.count=0}get(e){const{tracks:t}=this,r=this.shapes[e]||[],o=this.tags[e]||[],i=t.map(t=>t.get(e)).concat(r.map(t=>t.get(e))).concat(o.map(t=>t.get(e))),s=[];for(const e of i){const t=new n(e);s.push(t)}return s}}const y={},x={};e.exports={getJobAnnotations:async function(e,r,n){if(!(e.id in y)){const r=await t.annotations.getJobAnnotations(e.id);y[e.id]=new w(e.task.labels),y[e.id].import(r)}return y[e.id].get(r,n)},getTaskAnnotations:async function(e,r,n){if(!(e.id in y)){const r=await t.annotations.getTaskAnnotations(e.id);x[e.id]=new w(e.labels),x[e.id].import(r)}return x[e.id].get(r,n)}}})()},function(e,t,r){"use strict";var n=r(11),o=r(20),i=r(23),s=r(2),a=r(147),c=[].sort,u=[1,2,3],l=s(function(){u.sort(void 0)}),f=s(function(){u.sort(null)}),p=a("sort");n({target:"Array",proto:!0,forced:l||!f||p},{sort:function(e){return void 0===e?c.call(i(this)):c.call(i(this),o(e))}})},function(e,t,r){"use strict";var n=r(2);e.exports=function(e,t){var r=[][e];return!r||!n(function(){r.call(null,t||function(){throw 1},1)})}},function(e,t,r){r(6),r(12),r(44),(()=>{e.exports={Attribute:class{constructor(e){const t={id:void 0,default_value:void 0,input_type:void 0,mutable:void 0,name:void 0,values:void 0};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&Object.prototype.hasOwnProperty.call(e,r)&&(Array.isArray(e[r])?t[r]=[...e[r]]:t[r]=e[r]);if(!Object.values(window.cvat.enums.AttributeType).includes(t.input_type))throw new window.cvat.exceptions.ArgumentError(`Got invalid attribute type ${t.input_type}`);Object.defineProperties(this,Object.freeze({id:{get:()=>t.id},defaultValue:{get:()=>t.default_value},inputType:{get:()=>t.input_type},mutable:{get:()=>t.mutable},name:{get:()=>t.name},values:{get:()=>[...t.values]}}))}toJSON(){const e={name:this.name,mutable:this.mutable,input_type:this.inputType,default_value:this.defaultValue,values:this.values};return void 0!==this.id&&(e.id=this.id),e}},Label:class{constructor(e){const t={id:void 0,name:void 0};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);if(t.attributes=[],Object.prototype.hasOwnProperty.call(e,"attributes")&&Array.isArray(e.attributes))for(const r of e.attributes)t.attributes.push(new window.cvat.classes.Attribute(r));Object.defineProperties(this,Object.freeze({id:{get:()=>t.id},name:{get:()=>t.name},attributes:{get:()=>[...t.attributes]}}))}toJSON(){const e={name:this.name,attributes:[...this.attributes.map(e=>e.toJSON())]};return void 0!==this.id&&(e.id=this.id),e}}}})()},function(e,t){(()=>{const t=Object.freeze({DIR:"DIR",REG:"REG"}),r=Object.freeze({ANNOTATION:"annotation",VALIDATION:"validation",COMPLETED:"completed"}),n=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});e.exports={ShareFileType:t,TaskStatus:r,TaskMode:n,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(e){e.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",docs:"jsdoc --readme README.md src/*.js -p -c jsdoc.config.js -d docs"},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",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(e,t,r){r(6),r(7),r(12),r(78),(()=>{const t=r(22),n=r(24);function o(e){return"boolean"==typeof e}function i(e){return"number"==typeof e&&Number.isInteger(e)}function s(e){for(const t in this)if(Object.prototype.hasOwnProperty.call(this,t)&&this[t]===e)return!0;return!1}function a(e){return"string"==typeof e}function c(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(!(r in t))throw new window.cvat.exceptions.ArgumentError(`Unsupported filter property has been recieved: "${r}"`);if(!t[r](e[r]))throw new window.cvat.exceptions.ArgumentError(`Received filter property ${r} is not satisfied for checker`)}}e.exports=function(e){return e.plugins.list.implementation=t.list,e.plugins.register.implementation=t.register,e.server.about.implementation=async()=>await n.server.about(),e.server.share.implementation=async e=>await n.server.share(e),e.server.login.implementation=async(e,t)=>{await n.server.login(e,t)},e.users.get.implementation=async e=>{c(e,{self:o});let t=null;return t=(t="self"in e&&e.self?[t=await n.users.getSelf()]:await n.users.getUsers()).map(e=>new window.cvat.classes.User(e))},e.jobs.get.implementation=async e=>{if(c(e,{taskID:i,jobID:i}),"taskID"in e&&"jobID"in e)throw new window.cvat.exceptions.ArgumentError('Only one of fields "taskID" and "jobID" allowed simultaneously');if(!Object.keys(e).length)throw new window.cvat.exceptions.ArgumentError("Job filter must not be empty");let t=null;if("taskID"in e)t=await n.tasks.getTasks(`id=${e.taskID}`);else{const[r]=await n.jobs.getJob(e.jobID);t=await n.tasks.getTasks(`id=${r.task_id}`)}return t.length?(t=new window.cvat.classes.Task(t[0]),e.jobID?t.jobs.filter(t=>t.id===e.jobID):t.jobs):[]},e.tasks.get.implementation=async e=>{if(c(e,{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 e&&Object.keys(e).length>1&&!("page"in e&&2===Object.keys(e).length))throw new window.cvat.exceptions.ArgumentError('Do not use the filter field "search" with others');if("id"in e&&Object.keys(e).length>1&&!("page"in e&&2===Object.keys(e).length))throw new window.cvat.exceptions.ArgumentError('Do not use the filter field "id" with others');const t=new URLSearchParams;for(const r of["name","owner","assignee","search","status","mode","id","page"])Object.prototype.hasOwnProperty.call(e,r)&&t.set(r,e[r]);const r=await n.tasks.getTasks(t.toString()),o=r.map(e=>new window.cvat.classes.Task(e));return o.count=r.count,o},e}})()}]);
//# sourceMappingURL=cvat.js.map