diff --git a/artifacts.zip b/artifacts.zip index 2ff64e79..2369ce0a 100644 Binary files a/artifacts.zip and b/artifacts.zip differ diff --git a/main.bundle.js b/main.bundle.js index 05a0029b..fdd6fd06 100644 --- a/main.bundle.js +++ b/main.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -(function(){var __webpack_modules__={5655:function(e,t,n){"use strict";n.d(t,{A:function(){return re}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?c(w,--b):0,m--,10===y&&(m=1,g--),y}function C(){return y=b2||R(y)>3?"":" "}function N(e,t){for(;--t&&C()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return T(e,_()+(t<6&&32==E()&&32==C()))}function I(e){for(;C();)switch(y){case e:return b;case 34:case 39:34!==e&&39!==e&&I(y);break;case 40:41===e&&I(e);break;case 92:C()}return b}function D(e,t){for(;C()&&e+y!==57&&(e+y!==84||47!==E()););return"/*"+T(t,b-1)+"*"+i(47===e?e:C())}function z(e){for(;!R(E());)C();return T(e,b)}var M="-ms-",j="-moz-",U="-webkit-",F="comm",H="rule",$="decl",B="@keyframes";function V(e,t){for(var n="",r=p(e),o=0;o0&&f(j)-v&&h(y>32?G(j+";",r,n,v-1):G(l(j," ","")+";",r,n,v-2),p);break;case 59:j+=";";default:if(h(M=Y(j,t,n,g,m,o,d,O,L=[],I=[],v),a),123===R)if(0===m)K(j,t,M,M,L,a,v,d,I);else switch(99===b&&110===c(j,3)?100:b){case 100:case 108:case 109:case 115:K(e,M,M,r&&h(Y(e,M,M,0,0,o,d,O,o,L=[],v),I),o,I,v,d,r?L:I);break;default:K(j,M,M,M,[""],I,0,d,I)}}g=m=y=0,k=T=1,O=j="",v=s;break;case 58:v=1+f(j),y=w;default:if(k<1)if(123==R)--k;else if(125==R&&0==k++&&125==S())continue;switch(j+=i(R),R*k){case 38:T=m>0?1:(j+="\f",-1);break;case 44:d[g++]=(f(j)-1)*T,T=1;break;case 64:45===E()&&(j+=P(C())),b=E(),m=v=f(O=j+=z(_())),R++;break;case 45:45===w&&2==f(j)&&(k=0)}}return a}function Y(e,t,n,r,i,a,u,c,f,h,g){for(var m=i-1,v=0===i?a:[""],b=p(v),y=0,w=0,x=0;y0?v[S]+" "+C:l(C,/&\f/g,v[S])))&&(f[x++]=E);return k(e,t,n,0===i?H:c,f,h,g)}function Q(e,t,n){return k(e,t,n,F,i(y),d(e,2,-2),0)}function G(e,t,n,r){return k(e,t,n,$,d(e,0,r),d(e,r+1,-1),r)}var J=function(e,t,n){for(var r=0,o=0;r=o,o=E(),38===r&&12===o&&(t[n]=1),!R(o);)C();return T(e,b)},Z=new WeakMap,X=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Z.get(n))&&!r){Z.set(e,!0);for(var o=[],a=function(e,t){return L(function(e,t){var n=-1,r=44;do{switch(R(r)){case 0:38===r&&12===E()&&(t[n]=1),e[n]+=J(b-1,t,n);break;case 2:e[n]+=P(r);break;case 4:if(44===r){e[++n]=58===E()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=C());return e}(O(e),t))}(t,o),s=n.props,l=0,u=0;l6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+U+"$2-$3$1"+j+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,f(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+U)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+U+(45===c(e,14)?"inline-":"")+"box$3$1"+U+"$2$3$1"+M+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return U+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return U+e+M+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return U+e+M+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return U+e+M+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case $:e.return=te(e.value,e.length);break;case B:return V([x(e,{value:l(e.value,"@","@"+U)})],r);case H:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return V([x(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return V([x(e,{props:[l(t,/:(plac\w+)/,":"+U+"input-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,M+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||ne,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:h}}},1287:function(e,t,n){"use strict";var r;n.d(t,{i:function(){return s},s:function(){return a}});var o=n(6540),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},41:function(e,t,n){"use strict";function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}n.d(t,{Rk:function(){return r},SF:function(){return o},sk:function(){return i}});var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},8574:function(e,t,n){"use strict";const r=n(9611),o=n.g.Date;class i extends o{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},6804:function(e,t,n){"use strict";const r=n(9611);class o extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}T${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},1051:function(e){"use strict";e.exports=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},5879:function(e,t,n){"use strict";const r=n(9611);class o extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},9611:function(e){"use strict";e.exports=(e,t)=>{for(t=String(t);t.length{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(1051),createDateTimeFloat=__webpack_require__(6804),createDate=__webpack_require__(8574),createTime=__webpack_require__(5879),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=__webpack_require__.g.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),__webpack_require__.g.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],n=tomlType(e);if(t!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${n}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}},3956:function(e){"use strict";e.exports=function(e,t){if(null==e.pos||null==e.line)return e;let n=e.message;if(n+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const r=t.split(/\n/),o=String(Math.min(r.length,e.line+3)).length;let i=" ";for(;i.length "+r[t]+"\n",n+=i+" ";for(let t=0;t(0,r.Y)("button",{type:"button",ref:n,css:{border:"none",padding:0,background:"none",color:"inherit",":not([disabled])":{cursor:"pointer"}},...t,children:e}))),s=o.forwardRef((({kind:e="normal",extraCss:t,children:n,...o},i)=>{const a=S(),{isHighContrast:s}=y();return(0,r.Y)("button",{ref:i,type:"button",css:l(a,e,s,t),...o,children:n})})),l=(e,t,n,r={})=>{const o=C(t,{normal:()=>({border:`1px solid ${e.colors.neutral40}`,color:e.colors.neutral90,"&:hover, &:focus-visible":{border:`1px solid ${e.colors.neutral60}`,backgroundColor:e.colors.neutral15}}),danger:()=>({border:`1px solid ${e.colors.danger4}`,color:e.colors.danger4,fontWeight:n?"bold":"inherit","&:hover, &:focus-visible":{border:`1px solid ${e.colors.danger5}`,backgroundColor:e.colors.danger4,color:e.colors.danger4BwInverted}}),"call-to-action":()=>({border:`1px solid ${e.colors.happy8}`,color:e.colors.happy7BwInverted,backgroundColor:e.colors.happy7,"&:hover, &:focus-visible":{border:`1px solid ${e.colors.happy9}`,backgroundColor:e.colors.happy8,color:e.colors.happy8BwInverted}})});return{borderRadius:8,display:"inline-flex",alignItems:"center",padding:"7px 14px",gap:12,whiteSpace:"nowrap",backgroundColor:e.colors.neutral10,transition:"background-color 0.15s, border-color 0.15s",textDecoration:"none","& > svg":{fontSize:20},"&:disabled":{border:`1px solid ${e.colors.neutral25}`,color:e.colors.neutral40},"&:not([disabled])":{cursor:"pointer",...o,...lt(e,{offset:-1})},...r}};var u=n(5178);const c=({kind:e,iconPos:t="left",children:n,...o})=>{const i=S();return(0,r.FD)("div",{css:{display:"inline-flex",flexDirection:"left"===t?"row":"column",borderRadius:4,padding:"8px 16px",gap:16,alignItems:"center","& > svg":{fontSize:24,minWidth:24},...C(e,{error:()=>({backgroundColor:i.colors.danger0,border:`1.5px solid ${i.colors.danger0}`,color:i.colors.danger0BwInverted}),info:()=>({backgroundColor:i.colors.neutral10})})},...o,children:[C(e,{error:()=>(0,r.Y)(u.KOO,{}),info:()=>(0,r.Y)(u.MO8,{css:{color:i.colors.neutral60}})}),(0,r.Y)("div",{children:n})]})},d=e=>p("`assertNever` call was reached, that's a soundness hole in the typesystem :(");class f extends Error{constructor(e){super(`${e} (this is a bug in this application)`),this.name="Bug"}}const p=e=>{throw new f(e)},h=e=>{const t="reached unreachable code";throw new f(void 0===e?t:`${t}: ${e}`)},g=e=>null==e?p("value was unexpectedly nullish"):e,m=["light","dark","light-high-contrast","dark-high-contrast"],v="colorScheme",b=o.createContext(null),y=()=>(0,o.useContext)(b)??p("missing color scheme context provider"),w=({allowedSchemes:e=m,children:t})=>{if(e.length<2)return p("`allowedSchemes` for ColorSchemeProvider need to have at least 2 schemes");if(!e.includes("light")&&!e.includes("dark"))return p("`allowedSchemes` must contain either 'light' or 'dark'");const n=t=>!!t&&e.includes(t),i=document.documentElement.dataset.colorScheme,a=n(i)?i:"light",[s,l]=(0,o.useState)(a),u=window.localStorage.getItem(v),[c,d]=(0,o.useState)(!n(u)),f={scheme:s,isAuto:c,isHighContrast:s.includes("high-contrast"),update:t=>{if("auto"!==t&&!n(t))return p("Passed forbidden color scheme to `update`");window.localStorage.setItem(v,t),d("auto"===t);const r="auto"!==t?t:(()=>{const t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",n=window.matchMedia("(prefers-contrast: more)").matches?"-high-contrast":"",r=`${t}${n}`;if(e.includes(r))return r;const o=`${"light"===t?"dark":"light"}${n}`;return e.includes(o)?o:t})();l(r),document.documentElement.dataset.colorScheme=r}};return(0,r.Y)(b.Provider,{value:f,children:t})},k={colors:{neutral00:"var(--color-neutral00)",neutral05:"var(--color-neutral05)",neutral10:"var(--color-neutral10)",neutral15:"var(--color-neutral15)",neutral20:"var(--color-neutral20)",neutral25:"var(--color-neutral25)",neutral30:"var(--color-neutral30)",neutral40:"var(--color-neutral40)",neutral50:"var(--color-neutral50)",neutral60:"var(--color-neutral60)",neutral70:"var(--color-neutral70)",neutral80:"var(--color-neutral80)",neutral90:"var(--color-neutral90)",danger0:"var(--color-danger0)",danger0BwInverted:"var(--color-danger0-bw-inverted)",danger1:"var(--color-danger1)",danger1BwInverted:"var(--color-danger1-bw-inverted)",danger2:"var(--color-danger2)",danger2BwInverted:"var(--color-danger2-bw-inverted)",danger4:"var(--color-danger4)",danger4BwInverted:"var(--color-danger4-bw-inverted)",danger5:"var(--color-danger5)",danger5BwInverted:"var(--color-danger5-bw-inverted)",happy4:"var(--color-accent4)",happy4BwInverted:"var(--color-accent4-bw-inverted)",happy5:"var(--color-accent5)",happy5BwInverted:"var(--color-accent5-bw-inverted)",happy6:"var(--color-accent6)",happy6BwInverted:"var(--color-accent6-bw-inverted)",happy7:"var(--color-accent7)",happy7BwInverted:"var(--color-accent7-bw-inverted)",happy8:"var(--color-accent8)",happy8BwInverted:"var(--color-accent8-bw-inverted)",happy9:"var(--color-accent9)",happy9BwInverted:"var(--color-accent9-bw-inverted)",accent9:"var(--color-accent9)",accent9BwInverted:"var(--color-accent9-bw-inverted)",accent8:"var(--color-accent8)",accent8BwInverted:"var(--color-accent8-bw-inverted)",accent7:"var(--color-accent7)",accent7BwInverted:"var(--color-accent7-bw-inverted)",accent6:"var(--color-accent6)",accent6BwInverted:"var(--color-accent6-bw-inverted)",accent5:"var(--color-accent5)",accent5BwInverted:"var(--color-accent5-bw-inverted)",accent4:"var(--color-accent4)",accent4BwInverted:"var(--color-accent4-bw-inverted)",focus:"var(--color-accent8)"},breakpoints:{small:450,medium:650,large:900}},x=o.createContext(k),S=()=>(0,o.useContext)(x);function C(e,t,n){return void 0===n?t[e]():(t[e]??n)()}const E=e=>`@media (max-width: ${e}px)`,_=e=>`@media not all and (max-width: ${e}px)`,T=(e,t)=>{(0,o.useEffect)((()=>{const n=n=>{const r=n.target;e.current&&r instanceof Element&&!e.current.contains(r)&&t()};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)}))},R=e=>e.current??p("ref unexpectedly unbound"),O=((0,o.forwardRef)((({title:e,buttonContent:t,onSubmit:n,text:i,children:a},l)=>{const u=e??i.areYouSure,[c,d]=(0,o.useState)(!1),[f,p]=(0,o.useState)(),h=(0,o.useRef)(null);return(0,o.useImperativeHandle)(l,(()=>({open:()=>{d(!1),p(void 0),R(h).open()},done:()=>{R(h).close?.()},reportError:e=>{d(!1),p(e)}}))),(0,r.FD)(st,{title:u,closable:!c,ref:h,text:i,children:[a,(0,r.FD)("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),d(!0),p(void 0),n?.()},css:{marginTop:32},children:[(0,r.FD)("div",{css:{display:"flex",gap:12,justifyContent:"center",flexWrap:"wrap"},children:[(0,r.Y)(s,{disabled:c,onClick:()=>R(h).close?.(),children:i.cancel}),(0,r.Y)(s,{disabled:c,type:"submit",kind:"danger",css:{whiteSpace:"normal"},children:t})]}),c&&(0,r.Y)("div",{css:{marginTop:16},children:(0,r.Y)(ot,{size:20})})]}),L(f)]})})),({children:e})=>(0,r.Y)("div",{css:{marginTop:8},children:(0,r.Y)(c,{kind:"error",children:e})})),L=e=>null==e?null:(0,r.Y)(O,{children:e});var P=n(6635),A=n(7315),N=n(961),I="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function D(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!D(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||D(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function z(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function M(e,t){const n=z(e);return Math.round(t*n)/n}function j(e){const t=o.useRef(e);return I((()=>{t.current=e})),t}const U=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?(0,A.UE)({element:n.current,padding:r}).fn(t):{}:n?(0,A.UE)({element:n,padding:r}).fn(t):{};var o}}),F=(e,t)=>({...(0,A.BN)(e),options:[e,t]}),H=(e,t)=>({...(0,A.UU)(e),options:[e,t]}),$=(e,t)=>({...U(e),options:[e,t]});var B="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;let V=!1,q=0;const W=()=>"floating-ui-"+q++,K=i["useId".toString()]||function(){const[e,t]=o.useState((()=>V?W():void 0));return B((()=>{null==e&&t(W())}),[]),o.useEffect((()=>{V||(V=!0)}),[]),e};const Y=o.createContext(null),Q=o.createContext(null),G=()=>{var e;return(null==(e=o.useContext(Y))?void 0:e.id)||null},J=()=>o.useContext(Q);function Z(e){return(null==e?void 0:e.ownerDocument)||document}function X(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function ee(e){return Z(e).defaultView||window}function te(e){return!!e&&(e instanceof Element||e instanceof ee(e).Element)}function ne(e){return!!e&&(e instanceof HTMLElement||e instanceof ee(e).HTMLElement)}function re(e){if(0===e.mozInputSource&&e.isTrusted)return!0;const t=/Android/i;return(t.test(X())||t.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}function oe(e){return 0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"!==e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail}function ie(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ae(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&(r=n,"undefined"!=typeof ShadowRoot&&(r instanceof ee(r).ShadowRoot||r instanceof ShadowRoot))){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}var r;return!1}function se(e){return"data-floating-ui-"+e}function le(e){const t=(0,o.useRef)(e);return B((()=>{t.current=e})),t}const ue=se("safe-polygon");function ce(e,t,n){return n&&!ie(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function de(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement);){var n,r;t=t.shadowRoot.activeElement}return t}let fe=0;function pe(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(fe);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():fe=requestAnimationFrame(i)}function he(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}function ge(e){return"composedPath"in e?e.composedPath()[0]:e.target}const me="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ve(e){e.preventDefault(),e.stopPropagation()}function be(e){return ne(e.target)&&"BUTTON"===e.target.tagName}function ye(e){return function(e){return ne(e)&&e.matches(me)}(e)}const we=i["useInsertionEffect".toString()]||(e=>e());function ke(e){const t=o.useRef((()=>{}));return we((()=>{t.current=e})),o.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e!==S.current&&(S.current=e,m(e))}),[]),w=o.useCallback((e=>{e!==C.current&&(C.current=e,b(e))}),[]),k=a||g,x=s||v,S=o.useRef(null),C=o.useRef(null),E=o.useRef(d),_=null!=u,T=j(u),R=j(i),O=o.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),(0,A.rD)(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!D(E.current,t)&&(E.current=t,N.flushSync((()=>{f(t)})))}))}),[p,t,n,R]);I((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[c]);const L=o.useRef(!1);I((()=>(L.current=!0,()=>{L.current=!1})),[]),I((()=>{if(k&&(S.current=k),x&&(C.current=x),k&&x){if(T.current)return T.current(k,x,O);O()}}),[k,x,O,T,_]);const P=o.useMemo((()=>({reference:S,floating:C,setReference:y,setFloating:w})),[y,w]),U=o.useMemo((()=>({reference:k,floating:x})),[k,x]),F=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!U.floating)return e;const t=M(U.floating,d.x),r=M(U.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...z(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,U.floating,d.x,d.y]);return o.useMemo((()=>({...d,update:O,refs:P,elements:U,floatingStyles:F})),[d,O,P,U,F])}(e),c=J(),d=ke(((e,t)=>{e&&(p.current.openEvent=t),null==r||r(e,t)})),f=o.useRef(null),p=o.useRef({}),h=o.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],g=K(),m=o.useCallback((e=>{const t=te(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u.refs.setReference(t)}),[u.refs]),v=o.useCallback((e=>{(te(e)||null===e)&&(f.current=e,s(e)),(te(u.refs.reference.current)||null===u.refs.reference.current||null!==e&&!te(e))&&u.refs.setReference(e)}),[u.refs]),b=o.useMemo((()=>({...u.refs,setReference:v,setPositionReference:m,domReference:f})),[u.refs,v,m]),y=o.useMemo((()=>({...u.elements,domReference:l})),[u.elements,l]),w=o.useMemo((()=>({...u,refs:b,elements:y,dataRef:p,nodeId:i,floatingId:g,events:h,open:n,onOpenChange:d})),[u,i,g,h,n,d,b,y]);return B((()=>{const e=null==c?void 0:c.nodesRef.current.find((e=>e.id===i));e&&(e.context=w)})),o.useMemo((()=>({...u,context:w,refs:b,elements:y})),[u,b,y,w])}function _e(e,t,n){const r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map((e=>e?e[n]:null)).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var i;0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;ie(...o))).find((e=>void 0!==e))})):e[n]=o})),e):e),{})}}let Te=!1;const Re="ArrowUp",Oe="ArrowDown",Le="ArrowLeft",Pe="ArrowRight";function Ae(e,t,n){return Math.floor(e/t)!==n}function Ne(e,t){return t<0||t>=e.current.length}function Ie(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{var l,u;s+=r?-i:i}while(s>=0&&s<=a.length-1&&(o?o.includes(s):null==a[s]||(null==(l=a[s])?void 0:l.hasAttribute("disabled"))||"true"===(null==(u=a[s])?void 0:u.getAttribute("aria-disabled"))));return s}function De(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function ze(e,t){return De(t,e===Re||e===Oe,e===Le||e===Pe)}function Me(e,t,n){return De(t,e===Oe,n?e===Le:e===Pe)||"Enter"===e||" "==e||""===e}function je(e,t){return Ie(e,{disabledIndices:t})}function Ue(e,t){return Ie(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Fe(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e=r!=u>=r&&n<=(l-i)*(r-s)/(u-s)+i&&(o=!o)}return o}function He(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const u=e=>{let{x:n,y:u,placement:c,elements:d,onClose:f,nodeId:p,tree:h}=e;return function(e){function g(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==c||null==n||null==u)return;const{clientX:m,clientY:v}=e,b=[m,v],y=ge(e),w="mouseleave"===e.type,k=ae(d.floating,y),x=ae(d.domReference,y),S=d.domReference.getBoundingClientRect(),C=d.floating.getBoundingClientRect(),E=c.split("-")[0],_=n>C.right-C.width/2,T=u>C.bottom-C.height/2,R=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(b,S),O=C.width>S.width,L=C.height>S.height,P=(O?S:C).left,A=(O?S:C).right,N=(L?S:C).top,I=(L?S:C).bottom;if(k&&(i=!0,!w))return;if(x&&(i=!1),x&&!w)return void(i=!0);if(w&&te(e.relatedTarget)&&ae(d.floating,e.relatedTarget))return;if(h&&he(h.nodesRef.current,p).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===E&&u>=S.bottom-1||"bottom"===E&&u<=S.top+1||"left"===E&&n>=S.right-1||"right"===E&&n<=S.left+1)return g();let D=[];switch(E){case"top":D=[[P,S.top+1],[P,C.bottom-1],[A,C.bottom-1],[A,S.top+1]];break;case"bottom":D=[[P,C.top+1],[P,S.bottom-1],[A,S.bottom-1],[A,C.top+1]];break;case"left":D=[[C.right-1,I],[C.right-1,N],[S.left+1,N],[S.left+1,I]];break;case"right":D=[[S.right-1,I],[S.right-1,N],[C.left+1,N],[C.left+1,I]]}if(!Fe([m,v],D)){if(i&&!R)return g();if(!w&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,u=Math.sqrt(o*o+i*i);return a=e,s=t,l=n,u/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}Fe([m,v],function(e){let[n,r]=e;switch(E){case"top":return[[O?n+t/2:_?n+4*t:n-4*t,r+t+1],[O?n-t/2:_?n+4*t:n-4*t,r+t+1],[C.left,_||O?C.bottom-t:C.top],[C.right,_?O?C.bottom-t:C.top:C.bottom-t]];case"bottom":return[[O?n+t/2:_?n+4*t:n-4*t,r-t],[O?n-t/2:_?n+4*t:n-4*t,r-t],[C.left,_||O?C.top+t:C.bottom],[C.right,_?O?C.top+t:C.bottom:C.top+t]];case"left":{const e=[n+t+1,L?r+t/2:T?r+4*t:r-4*t],o=[n+t+1,L?r-t/2:T?r+4*t:r-4*t];return[[T||L?C.right-t:C.left,C.top],[T?L?C.right-t:C.left:C.right-t,C.bottom],e,o]}case"right":return[[n-t,L?r+t/2:T?r+4*t:r-4*t],[n-t,L?r-t/2:T?r+4*t:r-4*t],[T||L?C.left+t:C.right,C.top],[T?L?C.left+t:C.right:C.left+t,C.bottom]]}}([n,u]))?!i&&r&&(o=window.setTimeout(g,40)):g()}}};return u.__options={blockPointerEvents:n},u}const $e=o.createContext(null),Be=()=>{const e=o.useContext($e);return null==e?p("Missing context"):e},Ve=()=>{const e=Be();return t=>({tabIndex:e.activeIndex===t?0:-1,ref:n=>{null!==e.refs.listRef.current&&(e.refs.listRef.current[t]=n)},...e.getItemProps()})},qe=o.forwardRef((({children:e,placement:t,arrowSize:n=8,distance:i=4,borderRadius:a=4,viewPortMargin:s=8,ariaRole:l="tooltip",onClose:u=(()=>{}),className:c,...d},f)=>{const[p,g]=(0,o.useState)(null),[m,v]=(0,o.useState)(!1),b="open"in d?d.open:m,y=(0,o.useRef)(null),w=(0,o.useRef)(null),k=(0,o.useRef)([]);(0,o.useImperativeHandle)(f,(()=>Object.assign(w.current??h(),{open:()=>v(!0),close:()=>v(!1)})));const{x:x,y:S,placement:C,refs:E,middlewareData:_,context:T}=Ee({open:b,onOpenChange:e=>{"open"in d||v(e),e||u()},placement:t,whileElementsMounted:A.ll,middleware:[(R=n+i,{...(0,A.cY)(R),options:[R,undefined]}),H(),F({padding:s}),$({element:y,padding:1.6*a})]});var R;const O=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:a,elements:{domReference:s,floating:l},refs:u}=e,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:p=!1,restMs:h=0,move:g=!0}=t,m=J(),v=G(),b=le(f),y=le(d),w=o.useRef(),k=o.useRef(),x=o.useRef(),S=o.useRef(),C=o.useRef(!0),E=o.useRef(!1),_=o.useRef((()=>{})),T=o.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);o.useEffect((()=>{if(c)return a.on("dismiss",e),()=>{a.off("dismiss",e)};function e(){clearTimeout(k.current),clearTimeout(S.current),C.current=!0}}),[c,a]),o.useEffect((()=>{if(!c||!b.current||!n)return;function e(e){T()&&r(!1,e)}const t=Z(l).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[l,n,r,c,b,i,T]);const R=o.useCallback((function(e,t){void 0===t&&(t=!0);const n=ce(y.current,"close",w.current);n&&!x.current?(clearTimeout(k.current),k.current=setTimeout((()=>r(!1,e)),n)):t&&(clearTimeout(k.current),r(!1,e))}),[y,r]),O=o.useCallback((()=>{_.current(),x.current=void 0}),[]),L=o.useCallback((()=>{if(E.current){const e=Z(u.floating.current).body;e.style.pointerEvents="",e.removeAttribute(ue),E.current=!1}}),[u]);return o.useEffect((()=>{if(c&&te(s)){const e=s;return n&&e.addEventListener("mouseleave",u),null==l||l.addEventListener("mouseleave",u),g&&e.addEventListener("mousemove",o,{once:!0}),e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",a),()=>{n&&e.removeEventListener("mouseleave",u),null==l||l.removeEventListener("mouseleave",u),g&&e.removeEventListener("mousemove",o),e.removeEventListener("mouseenter",o),e.removeEventListener("mouseleave",a)}}function t(){return!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)}function o(e){if(clearTimeout(k.current),C.current=!1,p&&!ie(w.current)||h>0&&0===ce(y.current,"open"))return;const t=ce(y.current,"open",w.current);t?k.current=setTimeout((()=>{r(!0,e)}),t):r(!0,e)}function a(r){if(t())return;_.current();const o=Z(l);if(clearTimeout(S.current),b.current){n||clearTimeout(k.current),x.current=b.current({...e,tree:m,x:r.clientX,y:r.clientY,onClose(){L(),O(),R(r)}});const t=x.current;return o.addEventListener("mousemove",t),void(_.current=()=>{o.removeEventListener("mousemove",t)})}("touch"!==w.current||!ae(l,r.relatedTarget))&&R(r)}function u(n){t()||null==b.current||b.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){L(),O(),R(n)}})(n)}}),[s,l,c,e,p,h,g,R,O,L,r,n,m,y,b,i]),B((()=>{var e;if(c&&n&&null!=(e=b.current)&&e.__options.blockPointerEvents&&T()){const e=Z(l).body;if(e.setAttribute(ue,""),e.style.pointerEvents="none",E.current=!0,te(s)&&l){var t,r;const e=s,n=null==m||null==(t=m.nodesRef.current.find((e=>e.id===v)))||null==(r=t.context)?void 0:r.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",l.style.pointerEvents="auto",()=>{e.style.pointerEvents="",l.style.pointerEvents=""}}}}),[c,n,v,l,s,m,b,i,T]),B((()=>{n||(w.current=void 0,O(),L())}),[n,O,L]),o.useEffect((()=>()=>{O(),clearTimeout(k.current),clearTimeout(S.current),L()}),[c,O,L]),o.useMemo((()=>{if(!c)return{};function e(e){w.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(e){n||0===h||(clearTimeout(S.current),S.current=setTimeout((()=>{C.current||r(!0,e.nativeEvent)}),h))}},floating:{onMouseEnter(){clearTimeout(k.current)},onMouseLeave(e){a.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),R(e.nativeEvent,!1)}}}}),[a,c,h,n,r,R])}(T,{enabled:"trigger"in d&&"hover"===d.trigger,handleClose:He(),move:!1}),L=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:a,refs:s,elements:{floating:l,domReference:u}}=e,{enabled:c=!0,keyboardOnly:d=!0}=t,f=o.useRef(""),p=o.useRef(!1),h=o.useRef();return o.useEffect((()=>{if(!c)return;const e=Z(l).defaultView||window;function t(){!n&&ne(u)&&u===de(Z(u))&&(p.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[l,u,n,c]),o.useEffect((()=>{if(c)return a.on("dismiss",e),()=>{a.off("dismiss",e)};function e(e){"referencePress"!==e.type&&"escapeKey"!==e.type||(p.current=!0)}}),[a,c]),o.useEffect((()=>()=>{clearTimeout(h.current)}),[]),o.useMemo((()=>c?{reference:{onPointerDown(e){let{pointerType:t}=e;f.current=t,p.current=!(!t||!d)},onMouseLeave(){p.current=!1},onFocus(e){var t;p.current||"focus"===e.type&&"mousedown"===(null==(t=i.current.openEvent)?void 0:t.type)&&xe(i.current.openEvent,u)||r(!0,e.nativeEvent)},onBlur(e){p.current=!1;const t=e.relatedTarget,n=te(t)&&t.hasAttribute(se("focus-guard"))&&"outside"===t.getAttribute("data-type");h.current=setTimeout((()=>{ae(s.floating.current,t)||ae(u,t)||n||r(!1,e.nativeEvent)}))}}}:{}),[c,d,u,s,i,r])}(T,{enabled:"trigger"in d&&"hover"===d.trigger}),N=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:s=!0,event:l="click",toggle:u=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=t,f=o.useRef(),p=o.useRef(!1);return o.useMemo((()=>s?{reference:{onPointerDown(e){f.current=e.pointerType},onMouseDown(e){0===e.button&&(ie(f.current,!0)&&c||"click"!==l&&(!n||!u||i.current.openEvent&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent)):r(!1,e.nativeEvent)))},onClick(e){"mousedown"===l&&f.current?f.current=void 0:ie(f.current,!0)&&c||(!n||!u||i.current.openEvent&&"click"!==i.current.openEvent.type?r(!0,e.nativeEvent):r(!1,e.nativeEvent))},onKeyDown(e){f.current=void 0,e.defaultPrevented||!d||be(e)||(" "!==e.key||ye(a)||(e.preventDefault(),p.current=!0),"Enter"===e.key&&r(!n||!u,e.nativeEvent))},onKeyUp(e){e.defaultPrevented||!d||be(e)||ye(a)||" "===e.key&&p.current&&(p.current=!1,r(!n||!u,e.nativeEvent))}}}:{}),[s,i,l,c,d,a,u,n,r])}(T,{enabled:"trigger"in d&&"click"===d.trigger}),I=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:s,domReference:l,floating:u},dataRef:c}=e,{enabled:d=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:h="pointerdown",referencePress:g=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:b}=t,y=J(),w=null!=G(),k=ke("function"==typeof p?p:()=>!1),x="function"==typeof p?k:p,S=o.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:E}=(e=>{var t,n;return{escapeKeyBubbles:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePressBubbles:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}})(b),_=ke((e=>{if(!n||!d||!f||"Escape"!==e.key)return;const t=y?he(y.nodesRef.current,a):[];if(!C&&(e.stopPropagation(),t.length>0)){let e=!0;if(t.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e)})),T=ke((e=>{const t=S.current;if(S.current=!1,t)return;if("function"==typeof x&&!x(e))return;const n=ge(e);if(ne(n)&&u){const t=n.clientWidth>0&&n.scrollWidth>n.clientWidth,r=n.clientHeight>0&&n.scrollHeight>n.clientHeight;let o=r&&e.offsetX>n.clientWidth;if(r&&"rtl"===ee(u).getComputedStyle(n).direction&&(o=e.offsetX<=n.offsetWidth-n.clientWidth),o||t&&e.offsetY>n.clientHeight)return}const o=y&&he(y.nodesRef.current,a).some((t=>{var n;return xe(e,null==(n=t.context)?void 0:n.elements.floating)}));if(xe(e,u)||xe(e,l)||o)return;const s=y?he(y.nodesRef.current,a):[];if(s.length>0){let e=!0;if(s.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:re(e)||oe(e)}}),r(!1,e)}));return o.useEffect((()=>{if(!n||!d)return;function e(e){r(!1,e)}c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=E;const t=Z(u);f&&t.addEventListener("keydown",_),x&&t.addEventListener(h,T);let o=[];return v&&(te(l)&&(o=(0,P.v9)(l)),te(u)&&(o=o.concat((0,P.v9)(u))),!te(s)&&s&&s.contextElement&&(o=o.concat((0,P.v9)(s.contextElement)))),o=o.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),o.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{f&&t.removeEventListener("keydown",_),x&&t.removeEventListener(h,T),o.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[c,u,l,s,f,x,h,n,r,v,d,C,E,_,T]),o.useEffect((()=>{S.current=!1}),[x,h]),o.useMemo((()=>d?{reference:{onKeyDown:_,[Se[m]]:e=>{g&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,e.nativeEvent))}},floating:{onKeyDown:_,[Ce[h]]:()=>{S.current=!0}}}:{}),[d,i,g,h,m,r,_])}(T,{referencePress:"tooltip"===l}),D=function(e,t){void 0===t&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,s=K();return o.useMemo((()=>{const e={id:r,role:a};return i?"tooltip"===a?{reference:{"aria-describedby":n?r:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===a?"dialog":a,"aria-controls":n?r:void 0,..."listbox"===a&&{role:"combobox"},..."menu"===a&&{id:s}},floating:{...e,..."menu"===a&&{"aria-labelledby":s}}}:{}}),[i,a,n,r,s])}(T,{role:l}),z=function(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:s}}=e,{listRef:l,activeIndex:u,onNavigate:c=(()=>{}),enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loop:h=!1,nested:g=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:w=!0,disabledIndices:k,orientation:x="vertical",cols:S=1,scrollItemIntoView:C=!0}=t,E=G(),_=J(),T=ke(c),R=o.useRef(b),O=o.useRef(null!=f?f:-1),L=o.useRef(null),P=o.useRef(!0),A=o.useRef(T),N=o.useRef(!!s),I=o.useRef(!1),D=o.useRef(!1),z=le(k),M=le(n),j=le(C),[U,F]=o.useState(),H=ke((function(e,t,n){void 0===n&&(n=!1);const r=e.current[t.current];r&&(v?F(r.id):pe(r,{preventScroll:!0,sync:!(!X().toLowerCase().startsWith("mac")||navigator.maxTouchPoints||!/apple/i.test(navigator.vendor))&&(Te||I.current)}),requestAnimationFrame((()=>{const e=j.current;e&&r&&(n||!P.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof e?{block:"nearest",inline:"nearest"}:e))})))}));B((()=>{document.createElement("div").focus({get preventScroll(){return Te=!0,!1}})}),[]),B((()=>{d&&(n&&s?R.current&&null!=f&&(D.current=!0,T(f)):N.current&&(O.current=-1,A.current(null)))}),[d,n,s,f,T]),B((()=>{if(d&&n&&s)if(null==u){if(I.current=!1,null!=f)return;if(N.current&&(O.current=-1,H(l,O)),!N.current&&R.current&&(null!=L.current||!0===R.current&&null==L.current)){let e=0;const t=()=>{null==l.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(O.current=null==L.current||Me(L.current,x,m)||g?je(l,z.current):Ue(l,z.current),L.current=null,T(O.current))};t()}}else Ne(l,u)||(O.current=u,H(l,O,D.current),D.current=!1)}),[d,n,s,u,f,g,l,x,m,T,H,z]),B((()=>{if(d&&N.current&&!s&&_){var e,t;const n=_.nodesRef.current,r=null==(e=n.find((e=>e.id===E)))||null==(t=e.context)?void 0:t.elements.floating,o=de(Z(s)),i=n.some((e=>e.context&&ae(e.context.elements.floating,o)));r&&!i&&r.focus({preventScroll:!0})}}),[d,s,_,E]),B((()=>{A.current=T,N.current=!!s})),B((()=>{n||(L.current=null)}),[n]);const $=null!=u,V=o.useMemo((()=>{function e(e){if(!n)return;const t=l.current.indexOf(e);-1!==t&&T(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...y&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;P.current&&"touch"!==t&&(O.current=-1,H(l,O),T(null),v||pe(i.floating.current,{preventScroll:!0}))}}}}),[n,i,H,y,l,T,v]);return o.useMemo((()=>{if(!d)return{};const e=z.current;function t(t){if(P.current=!1,I.current=!0,!M.current&&t.currentTarget===i.floating.current)return;if(g&&function(e,t,n){return De(t,n?e===Pe:e===Le,e===Re)}(t.key,x,m))return ve(t),r(!1,t.nativeEvent),void(ne(a)&&a.focus());const o=O.current,s=je(l,e),u=Ue(l,e);if("Home"===t.key&&(ve(t),O.current=s,T(O.current)),"End"===t.key&&(ve(t),O.current=u,T(O.current)),S>1){const n=O.current;if(t.key===Re){if(ve(t),-1===n)O.current=u;else if(O.current=Ie(l,{startingIndex:n,amount:S,decrement:!0,disabledIndices:e}),h&&(n-Se?r:r-S}Ne(l,O.current)&&(O.current=n),T(O.current)}if(t.key===Oe&&(ve(t),-1===n?O.current=s:(O.current=Ie(l,{startingIndex:n,amount:S,disabledIndices:e}),h&&n+S>u&&(O.current=Ie(l,{startingIndex:n%S-S,amount:S,disabledIndices:e}))),Ne(l,O.current)&&(O.current=n),T(O.current)),"both"===x){const r=Math.floor(n/S);t.key===Pe&&(ve(t),n%S!=S-1?(O.current=Ie(l,{startingIndex:n,disabledIndices:e}),h&&Ae(O.current,S,r)&&(O.current=Ie(l,{startingIndex:n-n%S-1,disabledIndices:e}))):h&&(O.current=Ie(l,{startingIndex:n-n%S-1,disabledIndices:e})),Ae(O.current,S,r)&&(O.current=n)),t.key===Le&&(ve(t),n%S!=0?(O.current=Ie(l,{startingIndex:n,disabledIndices:e,decrement:!0}),h&&Ae(O.current,S,r)&&(O.current=Ie(l,{startingIndex:n+(S-n%S),decrement:!0,disabledIndices:e}))):h&&(O.current=Ie(l,{startingIndex:n+(S-n%S),decrement:!0,disabledIndices:e})),Ae(O.current,S,r)&&(O.current=n));const o=Math.floor(u/S)===r;return Ne(l,O.current)&&(O.current=h&&o?t.key===Le?u:Ie(l,{startingIndex:n-n%S-1,disabledIndices:e}):n),void T(O.current)}}if(ze(t.key,x)){if(ve(t),n&&!v&&de(t.currentTarget.ownerDocument)===t.currentTarget)return O.current=Me(t.key,x,m)?s:u,void T(O.current);Me(t.key,x,m)?O.current=h?o>=u?p&&o!==l.current.length?-1:s:Ie(l,{startingIndex:o,disabledIndices:e}):Math.min(u,Ie(l,{startingIndex:o,disabledIndices:e})):O.current=h?o<=s?p&&-1!==o?l.current.length:u:Ie(l,{startingIndex:o,decrement:!0,disabledIndices:e}):Math.max(s,Ie(l,{startingIndex:o,decrement:!0,disabledIndices:e})),Ne(l,O.current)?T(null):T(O.current)}}function o(e){"auto"===b&&re(e.nativeEvent)&&(R.current=!0)}const s=v&&n&&$&&{"aria-activedescendant":U};return{reference:{...s,onKeyDown(o){P.current=!1;const i=0===o.key.indexOf("Arrow");if(v&&n)return t(o);if(!n&&!w&&i)return;const a=i||"Enter"===o.key||""===o.key.trim(),s=ze(o.key,x),u=function(e,t,n){return De(t,n?e===Le:e===Pe,e===Oe)}(o.key,x,m);a&&(L.current=g&&s?null:o.key),g?u&&(ve(o),n?(O.current=je(l,e),T(O.current)):r(!0,o.nativeEvent)):s&&(null!=f&&(O.current=f),ve(o),!n&&w?r(!0,o.nativeEvent):t(o),n&&T(O.current))},onFocus(){n&&T(null)},onPointerDown:function(e){R.current=b,"auto"===b&&oe(e.nativeEvent)&&(R.current=!0)},onMouseDown:o,onClick:o},floating:{"aria-orientation":"both"===x?void 0:x,...s,onKeyDown:t,onPointerMove(){P.current=!0}},item:V}}),[a,i,U,z,M,l,d,x,m,v,n,$,g,f,w,p,S,h,b,T,r,V])}(T,{listRef:k,activeIndex:p,loop:!0,focusItemOnHover:!1,onNavigate:g}),{getReferenceProps:M,getFloatingProps:j,getItemProps:U}=function(e){void 0===e&&(e=[]);const t=e,n=o.useCallback((t=>_e(t,e,"reference")),t),r=o.useCallback((t=>_e(t,e,"floating")),t),i=o.useCallback((t=>_e(t,e,"item")),e.map((e=>null==e?void 0:e.item)));return o.useMemo((()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i})),[n,r,i])}([O,L,N,I,D,z]),V={activeIndex:p,open:b,setOpen:"tooltip"===l?v:null,settings:{arrowSize:n,distance:i,borderRadius:a,viewPortMargin:s},calculated:{x:x,y:S,placement:C,arrow:_.arrow},refs:{arrowRef:y,listRef:k,...E},getReferenceProps:M,getFloatingProps:j,getItemProps:U};return(0,r.Y)($e.Provider,{value:V,children:(0,r.Y)("div",{ref:w,css:{position:"relative"},className:c,children:e})})})),We=({children:e})=>{const t=Be();return o.cloneElement(e,{"data-floating-state":t.open?"open":"closed",...t.getReferenceProps({ref:t.refs.setReference,onClick:()=>t.open&&t.setOpen?.(!1),...e.props})})},Ke=o.forwardRef((({children:e,backgroundColor:t,borderColor:n,borderWidth:o=1,shadowColor:i="rgba(0, 0, 0, 20%)",shadowBlur:a=4,padding:s=[4,8],className:l,hideArrowTip:u=!1},c)=>{const d=S(),{open:f,calculated:p,refs:h,settings:g,...m}=Be();if(!f)return null;const v=Ge(p.placement),b=Math.SQRT2*g.arrowSize,y=(w=[c,h.setFloating],e=>{w.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))});var w;return(0,r.FD)("div",{...m.getFloatingProps({ref:y}),css:{"--floating-background-color":t??d.colors.neutral05,"--floating-border-color":n??d.colors.neutral40,"--floating-border-width":`${o}px`,"--floating-shadow-blur":`${a}px`,"--floating-shadow-color":i,position:"absolute",...null!=p.x&&null!=p.y?{left:p.x,top:p.y}:{[Qe(v)]:"100%"},width:"max-content",maxWidth:`calc(100vw - ${2*g.viewPortMargin}px)`,zIndex:1e4,backgroundColor:"var(--floating-background-color)",borderRadius:g.borderRadius,boxShadow:"0 0 var(--floating-shadow-blur) var(--floating-shadow-color)",outline:"var(--floating-border-width) solid var(--floating-border-color)"},children:[(0,r.Y)("div",{className:l,css:{overflow:"hidden",borderRadius:g.borderRadius,padding:(Array.isArray(s)?s:[s]).map((e=>`${e}px`)).join(" ")},children:e}),(0,r.Y)("div",{css:{position:"absolute",display:u?"none":"block",..."top"===v||"bottom"===v?{left:0,right:0,height:g.arrowSize+a}:{top:0,bottom:0,width:g.arrowSize+a},[v]:"100%",pointerEvents:"none",overflow:"hidden"},children:(0,r.Y)("div",{ref:h.arrowRef,css:{position:"absolute",left:p.arrow?.x,top:p.arrow?.y,[v]:-b/2,height:b,width:b,transform:"rotate(45deg)",backgroundColor:"var(--floating-background-color)",boxShadow:`${a/6}px ${a/6}px var(--floating-shadow-blur) `+a/12+"px var(--floating-shadow-color)",outline:"var(--floating-border-width) solid var(--floating-border-color)"}})})]})})),Ye=o.forwardRef((({children:e,tooltip:t,tooltipCss:n,...o},i)=>{const a=S();return(0,r.FD)(qe,{ref:i,...o,trigger:"hover",placement:o.placement??"top",children:[(0,r.Y)(Ke,{css:{color:a.colors.neutral80,fontSize:14,maxWidth:"100%",...n},children:t}),(0,r.Y)(We,{children:e})]})})),Qe=e=>({top:"bottom",right:"left",bottom:"top",left:"right"}[e]),Ge=e=>e.split("-")[0];var Je=n(1699),Ze=n(2644);const Xe=({children:e,menu:t,floatingContainer:n})=>{const i=(0,o.useRef)(null);return(0,r.FD)(qe,{ref:i,placement:"bottom",trigger:"click",ariaRole:"menu",arrowSize:12,viewPortMargin:12,borderRadius:8,distance:6,...n,children:[(0,r.Y)(We,{children:e}),(0,r.Y)(et,{close:()=>i.current?.close(),...t})]})},et=({close:e,items:t,label:n,breakpoint:o})=>{const i=S(),{scheme:a,isHighContrast:s}=y(),l=Ve(),u=C(a,{light:()=>i.colors.neutral05,dark:()=>i.colors.neutral15,"dark-high-contrast":()=>i.colors.neutral05,"light-high-contrast":()=>i.colors.neutral05});return(0,r.Y)(Ke,{backgroundColor:u,borderWidth:"light"!==a?1:0,padding:0,shadowBlur:s?0:8,children:(0,r.Y)("div",{onClick:t=>{t.target===t.currentTarget&&e()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e()},css:{position:"relative",[`@media (max-width: ${o}px)`]:{position:"fixed",top:0,bottom:0,left:0,right:0,zIndex:1001,backgroundColor:"#000000a0"}},children:(0,r.FD)("ul",{css:{borderRadius:8,right:0,margin:0,paddingLeft:0,overflow:"hidden",listStyle:"none",li:{":first-of-type":{borderRadius:"8px 8px 0 0"},":last-of-type":{borderRadius:"0 0 8px 8px"}},[`@media (max-width: ${o}px)`]:{backgroundColor:u,borderRadius:"0 0 8px 8px",marginTop:0,position:"fixed",left:0,top:0,li:{":not(:first-of-type)":{borderRadius:0}}}},children:[(0,r.Y)(rt,{onClick:e,breakpoint:o,children:n}),t.map((({keepOpenAfterClick:t,...n},o)=>(0,r.Y)(tt,{...l(o),...n,onClick:r=>{n?.onClick?.(r),t||e()}},o)))]})})})},tt=(0,o.forwardRef)((({icon:e,children:t,wrapper:n,...o},i)=>{const a=S(),s=y().isHighContrast?a.colors.neutral90:a.colors.neutral10,l=y().isHighContrast?a.colors.neutral05:a.colors.neutral90,u={display:"flex",gap:16,alignItems:"center",minWidth:160,padding:12,textDecoration:"none",color:a.colors.neutral90,cursor:"pointer",whiteSpace:"nowrap","& > svg":{maxHeight:23,fontSize:23,width:24,strokeWidth:2,"& > path":{strokeWidth:"inherit"}},":hover, :focus":{backgroundColor:s,color:l},...lt(a,{inset:!0})},{className:c,...d}=o,f=n??(0,r.Y)(r.FK,{});return(0,r.Y)("li",{role:"menuitem",...d,css:{":not(:first-of-type)":{borderTop:`1px solid ${a.colors.neutral30}`},...!n&&u},...!n&&{className:c,ref:e=>"function"==typeof i?i(e):i?i.current=e:{}},children:(0,Je.Y)(f.type,{key:f.key,...f.props,children:(0,r.FD)(r.FK,{children:[e??(0,r.Y)("svg",{}),(0,r.Y)("div",{children:t})]}),...n&&{className:c,ref:e=>"function"==typeof i?i(e):i?i.current=e:{}},...n&&{css:[u,{borderRadius:"inherit"}]}})})})),nt=({checked:e,onClick:t,children:n})=>({icon:e?(0,r.Y)(Ze.YrT,{}):void 0,onClick:t,onKeyDown:e=>{document.activeElement===e.currentTarget&&"Enter"===e.key&&t()},tabIndex:0,children:n,role:"checkbox","aria-checked":e,css:{...e&&{cursor:"default"}}}),rt=({onClick:e,breakpoint:t,children:n})=>{const o=S();return(0,r.FD)("div",{css:{borderBottom:`1px solid ${o.colors.neutral40}`,display:"flex",alignItems:"center",[`@media not all and (max-width: ${t}px)`]:{display:"none"}},children:[(0,r.Y)(a,{onClick:e,tabIndex:0,css:{display:"flex",alignItems:"center",cursor:"pointer",padding:"24px 12px",opacity:.75,":hover, :focus":{opacity:1},...lt(o,{inset:!0}),"> svg":{maxHeight:23,fontSize:23,width:24,strokeWidth:2}},children:(0,r.Y)(Ze.kRp,{})}),(0,r.Y)("span",{css:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:o.colors.neutral60},children:n})]})},ot=o.forwardRef((({size:e="1em",strokeColor:t="currentcolor",...n},o)=>(0,r.Y)("svg",{ref:o,viewBox:"0 0 50 50",css:{width:e,height:e,animation:`2s linear infinite none ${(0,Je.i7)({"0%":{transform:"rotate(0)"},"100%":{transform:"rotate(360deg)"}})}`,"& > circle":{fill:"none",stroke:t,strokeWidth:4,strokeDasharray:83,strokeLinecap:"round"}},...n,children:(0,r.Y)("circle",{cx:"25",cy:"25",r:"20"})})));var it=n(4708),at=n.n(it);const st=(0,o.forwardRef)((({title:e,closable:t=!0,children:n,className:i,closeOnOutsideClick:s=!1,open:l=!1,initialFocus:c,text:d},f)=>{const p=S(),[h,g]=(0,o.useState)(l),m="dark"===y().scheme;return(0,o.useImperativeHandle)(f,(()=>({isOpen:()=>h,open:()=>g(!0),close:()=>g(!1)})),[h]),(0,o.useEffect)((()=>{const e=e=>{t&&"Escape"===e.key&&g(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[t]),N.createPortal(h&&(0,r.Y)(at(),{focusTrapOptions:{initialFocus:c},children:(0,r.Y)("div",{...t&&s&&{onClick:e=>{e.target===e.currentTarget&&g(!1)}},css:{position:"fixed",top:0,bottom:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10001},children:(0,r.FD)("div",{className:i,css:{backgroundColor:p.colors.neutral05,borderRadius:4,minWidth:"clamp(300px, 90%, 400px)",margin:16,...m&&{border:`1px solid ${p.colors.neutral25}`}},children:[(0,r.FD)("div",{css:{padding:"12px 16px",borderBottom:`1px solid ${p.colors.neutral25}`,display:"flex",alignItems:"center"},children:[(0,r.Y)("h2",{css:{flex:1},children:e}),t&&(0,r.Y)(a,{"aria-label":d.close,tabIndex:0,onClick:()=>g(!1),css:{fontSize:32,cursor:"pointer",display:"inline-flex",borderRadius:4,...lt(p)},children:(0,r.Y)(u.SXS,{})})]}),(0,r.Y)("div",{css:{padding:16},children:n})]})})}),document.body)})),lt=(e,t)=>{const n=t?.width??2.5,r=t?.inset??!1,o=t?.offset??0;return{"&:focus-visible":{outline:`${n}px solid ${e.colors.focus}`,outlineOffset:`${r?-n:o}px`}}}},3855:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});const r={publicPath:"/",settingsPath:void 0,showLegalNotices:"1",buildDate:"2024-12-11",commitSha:"e1207fb"}},4631:function(e,t,n){"use strict";n.d(t,{cI:function(){return N},Kq:function(){return $},Z1:function(){return H}});var r=n(6540),o=n(2017),i=n.n(o),a=Object.prototype.toString,s=Array.isArray||function(e){return"[object Array]"===a.call(e)};function l(e){return"function"==typeof e}function u(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function c(e,t){return null!=e&&"object"==typeof e&&t in e}var d=RegExp.prototype.test,f=/\S/;var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},h=/\s*/,g=/\s+/,m=/\s*=/,v=/\s*\}/,b=/#|\^|\/|>|\{|&|=|!/;function y(e){this.string=e,this.tail=e,this.pos=0}function w(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function k(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}y.prototype.eos=function(){return""===this.tail},y.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},y.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},w.prototype.push=function(e){return new w(e,this)},w.prototype.lookup=function(e){var t,n,r,o=this.cache;if(o.hasOwnProperty(e))t=o[e];else{for(var i,a,s,u=this,d=!1;u;){if(e.indexOf(".")>0)for(i=u.view,a=e.split("."),s=0;null!=i&&s0?o[o.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],o=0,i=e.length;o"===a?s=this.renderPartial(i,t,n,o):"&"===a?s=this.unescapedValue(i,t):"name"===a?s=this.escapedValue(i,t,o):"text"===a&&(s=this.rawValue(i)),void 0!==s&&(l+=s);return l},k.prototype.renderSection=function(e,t,n,r,o){var i=this,a="",u=t.lookup(e[1]);if(u){if(s(u))for(var c=0,d=u.length;c0||!n)&&(o[i]=r+o[i]);return o.join("\n")},k.prototype.renderPartial=function(e,t,n,r){if(n){var o=this.getConfigTags(r),i=l(n)?n(e[1]):n[e[1]];if(null!=i){var a=e[6],s=e[5],u=e[4],c=i;0==s&&u&&(c=this.indentPartial(i,u,a));var d=this.parse(c,o);return this.renderTokens(d,t,n,c,r)}}},k.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},k.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||x.escape,o=t.lookup(e[1]);if(null!=o)return"number"==typeof o&&r===x.escape?String(o):r(o)},k.prototype.rawValue=function(e){return e[1]},k.prototype.getConfigTags=function(e){return s(e)?e:e&&"object"==typeof e?e.tags:void 0},k.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!s(e)?e.escape:void 0};var x={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){S.templateCache=e},get templateCache(){return S.templateCache}},S=new k;x.clearCache=function(){return S.clearCache()},x.parse=function(e,t){return S.parse(e,t)},x.render=function(e,t,n,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(s(o=e)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)');var o;return S.render(e,t,n,r)},x.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return p[e]}))},x.Scanner=y,x.Context=w,x.Writer=k;var C=x,E=n(2104),_=n(2268),T=n(3747);const R="connected",O="logged_in",L="network_error",P="invalid_response",A="incorrect_login";class N{#e="unconfigured";#t=null;#n=null;#r=null;#o=null;updateGlobalOc=null;constructor(e){null!=e?.serverUrl&&(this.#t=e.serverUrl.endsWith("/")?e.serverUrl.slice(0,-1):e.serverUrl,!0===e.loginProvided?this.#n=!0:e.loginName&&e.loginPassword?this.#n={username:e.loginName,password:e.loginPassword}:this.#n=null)}static async init(e){const t=new N(e);return await t.updateUser(),t}async getSeries(){if(null===this.#t)throw new Error("Connection not configured");const e=await this.jsonRequest("studio-api/series.json");if(t=e,!Array.isArray(t)||!t.every((e=>"object"==typeof e&&"id"in e&&"title"in e&&"string"==typeof e.id&&"string"==typeof e.title)))throw new z("unexpected result from series API",null);var t;return new Map(e.map((e=>[e.id,e.title])))}setGlobalInstance(e){this.updateGlobalOc||(0,E.jr)("'updateGlobalOc' not set"),this.updateGlobalOc?.(e)}async refreshConnection(){null!==this.#t&&await this.updateUser()&&this.updateGlobalOc?.(this)}async updateUser(){let e;try{e=await this.getInfoMe()}catch(e){if(!(e instanceof I))throw e;console.error("error when getting info/me",e);const t=this.#e;e instanceof D?this.#e=L:e instanceof M?this.#e=A:e instanceof j?this.#e="response_not_ok":e instanceof U?this.#e=A:e instanceof z&&(this.#e=P);const n=null!==this.#r||null!==this.#o||t!==this.#e;return this.#r=null,this.#o=null,n}const t=!i()(e,this.#r);if(t&&(this.#r=e,this.#e="anonymous"===e?.user?.username?this.#n?A:R:e?.user?.username?O:P),!0!==this.#n){const e=t||null!==this.#o;return this.#o=null,e}let n;try{n=await this.getLti()}catch(e){if(!(e instanceof I))throw e;console.error("Error when getting LTI info: ",e);const n=this.#e;e instanceof D&&(this.#e=L);const r=t||null!==this.#o||n!==this.#e;return this.#o=null,r}const r=!i()(n,this.#o);return this.#o=n,t||r}async getInfoMe(){return await this.jsonRequest("info/me.json")}getUsername(){return this.#r&&"object"==typeof this.#r&&"user"in this.#r&&this.#r.user&&"object"==typeof this.#r.user&&"name"in this.#r.user&&"string"==typeof this.#r.user.name?this.#r.user.name:null}async getLti(){return await this.jsonRequest("lti")}async jsonRequest(e){const t=`${this.#t}/${e}`,n=await this.request(e);try{const t=await n.json();if("object"!=typeof t)throw new Error(`'${e}' did not return an object`);return t}catch(e){throw new z(t,e)}}async request(e,t){const n=`${this.#t}/${e}`;let r,o={};!0!==this.#n&&this.#n?.username&&this.#n?.password&&(o={Authorization:`Basic ${btoa(unescape(encodeURIComponent(this.#n.username+":"+this.#n.password)))}`});try{r=await fetch(n,{...t,credentials:"same-origin",redirect:"manual",headers:o})}catch(e){throw new D(n,e)}if(401===r.status||403===r.status)throw new M(r.status,r.statusText,n);if("opaqueredirect"===r.type)throw new U(n);if(!r.ok)throw new j(r.status,r.statusText,n);return r}async upload(e){let{recordings:t,title:n,presenter:r,series:o,start:i,end:a,uploadSettings:s,startTime:l,endTime:u,onProgress:c}=e;switch(await this.refreshConnection(),this.#e){case O:break;case L:return"network_error";case A:case R:return"not_authorized";case P:return"unexpected_response";default:return"unknown_error"}try{let e=await this.request("ingest/createMediaPackage").then((e=>e.text()));return e=await this.addDcCatalog({mediaPackage:e,uploadSettings:s,title:n,presenter:r,series:o,startTime:l,endTime:u}),!1!==s?.acl&&(e=await this.attachAcl({mediaPackage:e,uploadSettings:s})),e=await this.uploadTracks({mediaPackage:e,recordings:t,onProgress:c,title:n,presenter:r}),null==i&&null==a||(e=await this.addCuttingInformation({mediaPackage:e,start:i||0,end:a||Number.MAX_VALUE})),await this.finishIngest({mediaPackage:e,uploadSettings:s}),"success"}catch(e){if(!(e instanceof I))throw e;return console.error("Error occured during upload: ",e),e instanceof D?"network_error":e instanceof U||e instanceof M?"not_authorized":e instanceof j?"unexpected_response":"unknown_error"}}async addDcCatalog(e){let{mediaPackage:t,uploadSettings:n,series:r,...o}=e;const i=r||n?.seriesId,a=n?.dcc||q,s=this.constructDcc(a,{...o,seriesId:i}),l=new FormData;return l.append("mediaPackage",t),l.append("dublinCore",encodeURIComponent(s)),l.append("flavor","dublincore/episode"),await this.request("ingest/addDCCatalog",{method:"post",body:l}).then((e=>e.text()))}async attachAcl(e){let{mediaPackage:t,uploadSettings:n}=e;const r=!0!==n?.acl&&n?.acl?n?.acl:W,o=this.constructAcl(r),i=new FormData;return i.append("flavor","security/xacml+episode"),i.append("mediaPackage",t),i.append("BODY",new Blob([o]),"acl.xml"),await this.request("ingest/addAttachment",{method:"post",body:i}).then((e=>e.text()))}async addCuttingInformation(e){let{mediaPackage:t,start:n,end:r}=e;const o=new FormData;o.append("flavor","smil/cutting"),o.append("mediaPackage",t),o.append("BODY",new Blob([K({start:n,end:r})]),"cutting.smil");const i=await this.request("ingest/addCatalog",{method:"post",body:o});return await i.text()}async uploadTracks(e){let{mediaPackage:t,recordings:n,onProgress:r,title:o,presenter:i}=e;const a=n.map((e=>e.media.size)).reduce(((e,t)=>e+t),0);let s=0;for(const{deviceType:e,media:l,mimeType:u}of n){const n=s;let c="presentation/source";"desktop"===e?c="presentation/source":"video"===e&&(c="presenter/source");const d="desktop"===e?"presentation":"presenter",f=(0,_.F2)({mime:u,flavor:d,title:o,presenter:i}),p=new FormData;p.append("mediaPackage",t),p.append("flavor",c),p.append("tags",""),p.append("BODY",l,f);const h=`${this.#t}/ingest/addTrack`;t=await new Promise(((e,t)=>{const o=new XMLHttpRequest;if(o.open("POST",h),!0!==this.#n&&this.#n?.username&&this.#n?.password){const e=btoa(unescape(encodeURIComponent(this.#n.username+":"+this.#n.password)));o.setRequestHeader("Authorization",`Basic ${e}`)}o.onload=()=>e(o.responseText),o.onerror=()=>{401===o.status||403===o.status?t(new M(o.status,o.statusText,h)):t(new j(o.status,o.statusText,h))},o.upload.onprogress=e=>{if(r){const t=e.loaded+n;r(t/a)}};try{o.send(p)}catch(e){t(new D(h,e))}})),s+=l.size}return t}async finishIngest(e){let{mediaPackage:t,uploadSettings:n}=e;const r=n?.workflowId,o=new FormData;o.append("mediaPackage",t),r&&o.append("workflowDefinitionId",r),await this.request("ingest/ingest",{method:"post",body:o})}getState(){return this.#e}isLoginProvided(){return!0===this.#n}isReadyToUpload(){return this.#e===O}prettyServerUrl(){const e=this.#t;return e&&e.startsWith("https")?new URL(e).hostname:null}constructAcl(e){if(null==(t=this.#r)||"object"!=typeof t||!("roles"in t)||!Array.isArray(t.roles))throw new Error(`'currentUser' is '${this.#r}' in 'constructAcl'`);var t;const n={user:this.#r,lti:this.#o,roleOAuthUser:this.#r.roles.find((e=>"ROLE_OAUTH_USER"===e))};return V(e,n)}constructDcc(e,t){let{title:n,presenter:r,startTime:o,endTime:i,seriesId:a}=t;const s={user:this.#r,lti:this.#o,title:n,presenter:r,seriesId:a,now:(new Date).toISOString(),startTime:o.toISOString(),endTime:i.toISOString()};return V(e,s)}}class I extends Error{}class D extends I{constructor(e,t){super(`network error when accessing '${e}': ${t}`)}}class z extends I{constructor(e,t){super(`invalid JSON when accessing ${e}: ${t}`)}}class M extends I{constructor(e,t,n){super(`got ${e} ${t} when accessing ${n}`)}}class j extends I{constructor(e,t,n){super(`unexpected ${e} ${t} response when accessing ${n}`)}}class U extends I{constructor(e){super(`unexpected redirect when accessing ${e}`)}}const F=r.createContext(null),H=()=>(0,_.se)(F,"useOpencast"),$=e=>{let{initial:t,children:n}=e;const[,o]=(0,r.useState)(0),[i,a]=(0,r.useState)(t);return i.updateGlobalOc=e=>{a(e),i===e&&o((e=>e+1))},(0,r.useEffect)((()=>{console.debug("Current Opencast connection: ",i);const e=setInterval((()=>i.refreshConnection()),3e5);return()=>clearInterval(e)})),(0,T.Y)(F.Provider,{value:i,children:n})},B=e=>(new XMLSerializer).serializeToString(new Text(e)),V=(e,t)=>{const n=C.escape;C.escape=B;const r=C.render(e,t);return C.escape=n,r},q='\n\n {{ now }}\n {{ title }}\n {{ #presenter }}{{ presenter }}{{ /presenter }}\n {{ #seriesId }}{{ seriesId }}{{ /seriesId }}\n \n start={{ startTime }}; end={{ endTime }}; scheme=W3CDTF;\n \n Opencast Studio\n\n',W='\n\n \n \n \n \n \n read\n \n \n \n \n \n \n \n {{ user.userRole }}\n \n \n \n \n \n \n \n \n \n write\n \n \n \n \n \n \n \n {{ user.userRole }}\n \n \n \n \n\n',K=e=>{let{start:t,end:n}=e;return`\n \n \n \n \n \n \n`}},6606:function(e,t,n){"use strict";n.d(t,{CA:function(){return P},Kq:function(){return A},Vr:function(){return y},t0:function(){return L}});var r=n(6540),o=n(4744),i=n.n(o),a=n(6970),s=n.n(a),l=n(2104),u=n(2268),c=n(3855),d=n(3747);const f="ocStudioSettings",p="settingsFile",h="hidden",g="optional",m="required",v=["opencast"],b={opencast:{serverUrl:"https://develop.opencast.org/",loginName:"admin",loginPassword:"opencast"}};class y{contextSettings=Object.create(null);urlSettings=Object.create(null);#i=Object.create(null);onChange=()=>{};static async init(){const e=new y,t=window.localStorage.getItem(f);if(null!==t){let n;try{n=JSON.parse(t)}catch{console.warn("Could not parse settings stored in local storage. Ignoring.")}e.#i=w(n,!1,"src-local-storage","from local storage user settings")}const n=await y.loadContextSettings()||Object.create(null);e.contextSettings=w(n,!1,"src-server","from server settings file");const r=new URLSearchParams(window.location.search);r.delete(p);const o=r.get("config");if(o){const t=e=>{let t;try{t=(0,u.xQ)(e)}catch(e){return console.warn("Could not decode hex-encoded string given to GET parameter 'config'. Ignoring. Error:",e),null}try{return s()(t)}catch(e){console.warn("Could not parse (as TOML) decoded hex-string given to GET parameter 'config'. Ignoring. Error:",e)}return null};for(const e of r.keys())"config"!==e&&console.warn(`URL GET parameter '${e}' is ignored as 'config' is specified. Either specify all configuration via the 'config' GET parameter hex string or via direct GET parameters. Mixing is not allowed.`);const n=t(o);e.urlSettings=w(n??{},!1,"src-url","given as URL `config` GET parameter")}else{const t=Object.create(null);for(const[e,n]of r){let r=t;const o=e.split(".");o.slice(0,-1).forEach((e=>{e in r||(r[e]=Object.create(null)),r=r[e]})),r[o[o.length-1]]=n}e.urlSettings=w(t,!0,"src-url","given as URL GET parameter")}return e}static async loadContextSettings(){let e=c.h.settingsPath||"settings.toml";const t=new URLSearchParams(window.location.search).get(p);if(t)if(t.includes("/")||t.includes("\\"))console.warn(`You can only specify a filename via '${p}', not a path`);else{const n=e.split("/");n[n.length-1]=t,e=n.join("/")}const n=e.startsWith("/")?"":c.h.publicPath,r=`${window.location.origin}${n}${e}`;let o;try{o=await fetch(r)}catch(t){return console.warn(`Could not access '${e}' due to network error!`,t||""),null}if(404===o.status)return console.debug(`'${e}' returned 404: ignoring`),null;if(!o.ok)return console.error(`Fetching '${e}' failed: ${o.status} ${o.statusText}`),null;if(o.headers.get("Content-Type")?.startsWith("text/html"))return console.warn(`'${e}' request has 'Content-Type: text/html' -> ignoring...`),null;try{return s()(await o.text())}catch(t){throw console.error(`Could not parse '${e}' as TOML: `,t),new SyntaxError(`Could not parse '${e}' as TOML: ${t}`)}}saveSettings(e){this.#i=E(this.#i,e),window.localStorage.setItem(f,JSON.stringify(this.#i)),this.onChange(this.settings())}settings(){return _([this.#i,this.contextSettings,this.urlSettings])}formValues(){return E(b,this.#i)}fixedSettings(){return E(this.contextSettings,this.urlSettings)}isConfigurable(e){let t=this.fixedSettings();const n=e.split(".");for(const e of n){if(!(e in t))return!0;t=t[e]}return!1}isUsernameConfigurable(){return this.isConfigurable("opencast.loginName")&&!0!==this.fixedSettings().opencast?.loginProvided}isPasswordConfigurable(){return this.isConfigurable("opencast.loginPassword")&&!0!==this.fixedSettings().opencast?.loginProvided}}const w=(e,t,n,r)=>{const o=(e,t,n)=>"function"==typeof e?i(e,t,n):t&&"object"==typeof t?a(e,t,n):(0,l.HB)(),i=(e,o,i)=>{try{const r=e(o,t,n);return void 0===r?o:r}catch(e){return console.warn(`Validation of setting '${i}' (${r}) with value '${o}' failed: ${e}. Ignoring.`),null}},a=(e,t,n)=>{const i=Object.create(null);for(const[a,s]of Object.entries(t)){const l=n?`${n}.${a}`:a;if(a in e&&a in t){const t=o(e[a],s,l);null!==t&&(i[a]=t)}else console.warn(`'${l}' (${r}) is not a valid settings key. Ignoring.`)}return i};return o(S,e,"")},k={string:e=>{if("string"!=typeof e)throw new Error("is not a string, but should be");return e},int:(e,t)=>{if(Number.isInteger(e))return e;if(t&&"string"==typeof e){if(/^[-+]?(\d+)$/.test(e))return Number(e);throw new Error("can't be parsed as integer")}throw new Error("is not an integer")},boolean:(e,t)=>{if("boolean"==typeof e)return e;if(t){if("true"===e)return!0;if("false"===e)return!1;throw new Error("can't be parsed as boolean")}throw new Error("is not a boolean")},positiveInteger:(e,t)=>{const n=k.int(e,t);if(n<=0)throw new Error("has to be positive, but isn't");return n},array:e=>(t,n,r)=>{if("string"==typeof t&&n)try{t=JSON.parse(t)}catch{throw new Error("can't be parsed as array")}if(!Array.isArray(t))throw new Error("is not an array");return t.map((t=>{try{return e(t,n,r)}catch(e){throw new Error(`failed to validate element '${t}' of array: ${e}`)}}))}},x=e=>{if("string"!=typeof e)throw new Error("has to be a string");if(![h,g,m].includes(e))throw new Error(`has to be either '${h}', '${g}' or '${m}', but is '${e}'`);return e},S={opencast:{serverUrl:e=>{const t=k.string(e);if("/"===t||""===t)return;const n=new URL(t);if("https:"!==n.protocol&&"http:"!==n.protocol)throw new Error('the URL does not start with "http:" or "https:"');return e},loginName:k.string,loginPassword:k.string,loginProvided:k.boolean},upload:{seriesId:k.string,workflowId:k.string,acl:(e,t)=>{if(t&&"false"===e||!1===e)return!1;if(t&&"true"===e||!0===e)return!0;if("string"==typeof e&&e.trim().startsWith("<"))return e;throw new Error("needs to be 'true', 'false' or an XML string")},dcc:k.string,titleField:x,presenterField:x,seriesField:x,autofillPresenter:(e,t,n)=>{const r=k.array((e=>{const t=k.string(e);if(!v.includes(t))throw new Error("invalid presenter name source");return t}))(e,t,n);if(new Set(r).size{if("src-server"!==n)throw new Error("this configuration cannot be specified via the URL or local storage, but must be specified in 'settings.toml'");return C(e,t,n)}),label:k.string,target:e=>{if("string"!=typeof e)throw new Error("has to be a string");if(!e.startsWith("/")&&!e.startsWith("http"))throw new Error("has to start with '/' or 'http'");return e}}};var C;const E=(e,t)=>i()(e,t,{arrayMerge:T}),_=e=>i().all(e,{arrayMerge:T}),T=(e,t,n)=>t,R=r.createContext(null),O=r.createContext(null),L=()=>(0,u.se)(R,"useSettings"),P=()=>(0,u.se)(O,"useSettingsManager"),A=e=>{let{settingsManager:t,children:n}=e;const[o,i]=(0,r.useState)(t.settings());return t.onChange=e=>i(e),(0,r.useEffect)((()=>{console.debug("Current settings: ",o)})),(0,d.Y)(O.Provider,{value:t,children:(0,d.Y)(R.Provider,{value:o,children:n})})}},3015:function(e,t,n){"use strict";n.d(t,{Kq:function(){return d},pv:function(){return p},wA:function(){return f}});var r=n(6540),o=n(2104),i=n(2268),a=n(3747);const s=e=>({hasWebcam:e,mediaDevices:[],audioAllowed:null,audioStream:null,audioUnexpectedEnd:!1,audioSupported:(0,i.eL)(),displayAllowed:null,displayStream:null,displayUnexpectedEnd:!1,displaySupported:(0,i.fF)(),userAllowed:null,userStream:null,userUnexpectedEnd:!1,userSupported:(0,i.eL)(),videoChoice:"none",audioChoice:"none",isRecording:!1,prematureRecordingEnd:!1,recordings:[],title:"",presenter:"",start:null,end:null,recordingStartTime:null,recordingEndTime:null,upload:{error:null,state:"not_uploaded",secondsLeft:null,currentProgress:0}}),l=(e,t)=>{switch(t.type){case"UPDATE_MEDIA_DEVICES":return{...e,mediaDevices:t.devices};case"CHOOSE_AUDIO":return{...e,audioChoice:t.choice};case"CHOOSE_VIDEO":return{...e,videoChoice:t.choice};case"SHARE_AUDIO":return{...e,audioStream:t.stream,audioAllowed:!0,audioUnexpectedEnd:!1};case"BLOCK_AUDIO":return{...e,audioStream:null,audioAllowed:!1,audioUnexpectedEnd:!1};case"UNSHARE_AUDIO":return{...e,audioStream:null,audioUnexpectedEnd:!1};case"AUDIO_UNEXPECTED_END":return{...e,audioStream:null,audioUnexpectedEnd:!0};case"SHARE_DISPLAY":return{...e,displayStream:t.stream,displayAllowed:!0,displayUnexpectedEnd:!1};case"BLOCK_DISPLAY":return{...e,displayStream:null,displayAllowed:!1,displayUnexpectedEnd:!1};case"UNSHARE_DISPLAY":return{...e,displayStream:null,displayAllowed:null,displayUnexpectedEnd:!1};case"DISPLAY_UNEXPECTED_END":return{...e,displayStream:null,displayUnexpectedEnd:!0};case"SHARE_USER":return{...e,userStream:t.stream,userAllowed:!0,userUnexpectedEnd:!1};case"BLOCK_USER":return{...e,userStream:null,userAllowed:!1,userUnexpectedEnd:!1};case"UNSHARE_USER":return{...e,userStream:null,userAllowed:null,userUnexpectedEnd:!1};case"USER_UNEXPECTED_END":return{...e,userStream:null,userUnexpectedEnd:!0};case"START_RECORDING":return{...e,isRecording:!0,recordingStartTime:new Date};case"STOP_RECORDING":return{...e,isRecording:!1,recordingEndTime:new Date};case"STOP_RECORDING_PREMATURELY":return{...e,isRecording:!1,prematureRecordingEnd:!0,recordingEndTime:new Date};case"CLEAR_RECORDINGS":return{...e,recordings:[],prematureRecordingEnd:!1};case"ADD_RECORDING":return{...e,recordings:[...e.recordings.filter((e=>e.deviceType!==t.recording.deviceType)),t.recording]};case"UPLOAD_ERROR":return{...e,upload:{...e.upload,error:t.msg,state:"error"}};case"UPLOAD_REQUEST":return{...e,upload:{...e.upload,error:null,state:"uploading"}};case"UPLOAD_SUCCESS":return{...e,upload:{...e.upload,error:null,state:"uploaded"}};case"UPLOAD_PROGRESS_UPDATE":return{...e,upload:{...e.upload,secondsLeft:t.secondsLeft,currentProgress:t.currentProgress}};case"MARK_DOWNLOADED":return{...e,recordings:e.recordings.map(((e,n)=>n===t.index?{...e,downloaded:!0}:e))};case"UPDATE_TITLE":return{...e,title:t.value};case"UPDATE_PRESENTER":return{...e,presenter:t.value};case"UPDATE_START":return{...e,start:t.time};case"UPDATE_END":return{...e,end:t.time};case"RESET":return s(e.hasWebcam);default:(0,o.xb)(t)}},u=(0,r.createContext)(null),c=(0,r.createContext)(null),d=e=>{let{hasWebcam:t,children:n}=e;const[o,i]=(0,r.useReducer)(l,s(t));return(0,a.Y)(c.Provider,{value:i,children:(0,a.Y)(u.Provider,{value:o,children:n})})},f=()=>(0,i.se)(c,"useDispatch"),p=()=>(0,i.se)(u,"useStudioState")},2268:function(e,t,n){"use strict";n.d(t,{Bb:function(){return m},F2:function(){return h},GG:function(){return y},LO:function(){return a},VM:function(){return p},Y$:function(){return s},eL:function(){return c},fF:function(){return u},kh:function(){return l},lm:function(){return i},oC:function(){return d},q4:function(){return f},r_:function(){return w},se:function(){return k},xQ:function(){return v},yy:function(){return b}});var r=n(6540),o=n(2104);const i=o.PV.colors,a=o.PV.breakpoints,s=(e,t)=>{let n=o.PV;return t&&(n={colors:{...o.PV.colors,focus:t},breakpoints:o.PV.breakpoints}),(0,o.Y$)(n,e)},l=()=>/Android|iPhone|iPad|iPod/i.test(navigator.platform)||/Android/i.test(navigator.userAgent),u=()=>"mediaDevices"in navigator&&"getDisplayMedia"in navigator.mediaDevices&&!l(),c=()=>"mediaDevices"in navigator&&"getUserMedia"in navigator.mediaDevices,d=()=>"undefined"!=typeof MediaRecorder,f=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),p=e=>{const{width:t,height:n}=e?.getVideoTracks()?.[0]?.getSettings()??{};return null==t||null==n?null:[t,n]},h=e=>{let{mime:t,flavor:n,title:r,presenter:o}=e;const i=(r?` - ${r}`:"").substring(0,50),a=(o?` - ${o}`:"").substring(0,50);return`${g()}${i}${a} (${n}, OC Studio).${(e=>{if(e){const t=e.toLowerCase();if(t.startsWith("video/webm"))return"webm";if(t.startsWith("video/mp4"))return"mp4";if(t.startsWith("video/x-matroska"))return"mkv";if(t.startsWith("video/avi"))return"avi";if(t.startsWith("video/quicktime"))return"mov"}return f()?"mp4":"webm"})(t)}`},g=()=>{const e=e=>(e>=10?"":"0")+e,t=new Date;return t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+" "+e(t.getHours())+"-"+e(t.getMinutes())},m=async()=>"mediaDevices"in navigator&&(await navigator.mediaDevices.enumerateDevices()).some((e=>"videoinput"===e.kind)),v=e=>{if(e.length%2!=0)throw new SyntaxError("hex string does not have an even length");const t=e=>{if(e>="0"&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if(e>="a"&&e<="f")return e.charCodeAt(0)-"a".charCodeAt(0)+10;if(e>="A"&&e<="F")return e.charCodeAt(0)-"A".charCodeAt(0)+10;throw new RangeError(`invalid hex digit '${e}'`)},n=new Uint8Array(e.length/2);for(let r=0;rnew Promise((t=>setTimeout(t,e))),y=async e=>{e({type:"UPDATE_MEDIA_DEVICES",devices:await navigator.mediaDevices.enumerateDevices()})},w=(e,t)=>{const n=[];for(const r of e)r.kind===t&&(n.some((e=>e.deviceId===r.deviceId))||n.push(r));return n},k=(e,t)=>(0,r.useContext)(e)??(0,o.jr)(`hook '${t}' called without parent context provider`)},4744:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function o(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||o,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=r;var u=Array.isArray(n);return u===Array.isArray(e)?u?l.arrayMerge(e,n,l):function(e,t,n){var o={};return n.isMergeableObject(e)&&i(e).forEach((function(t){o[t]=r(e[t],n)})),i(t).forEach((function(i){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(a(e,i)&&n.isMergeableObject(t[i])?o[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,n)(e[i],t[i],n):o[i]=r(t[i],n))})),o}(e,n,l):r(n,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return s(e,n,t)}),{})};var l=s;e.exports=l},2017:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},4708:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n1?r-1:0),i=1;i element.");return u.cloneElement(t,{ref:function(n){var r=e.props.containerElements;t&&("function"==typeof t.ref?t.ref(n):t.ref&&(t.ref.current=n)),e.focusTrapElements=r||[n]}})}return null}}])&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(u.Component),h="undefined"==typeof Element?Function:Element;p.propTypes={active:c.bool,paused:c.bool,focusTrapOptions:c.shape({document:c.object,onActivate:c.func,onPostActivate:c.func,checkCanFocusTrap:c.func,onPause:c.func,onPostPause:c.func,onUnpause:c.func,onPostUnpause:c.func,onDeactivate:c.func,onPostDeactivate:c.func,checkCanReturnFocus:c.func,initialFocus:c.oneOfType([c.instanceOf(h),c.string,c.bool,c.func]),fallbackFocus:c.oneOfType([c.instanceOf(h),c.string,c.func]),escapeDeactivates:c.oneOfType([c.bool,c.func]),clickOutsideDeactivates:c.oneOfType([c.bool,c.func]),returnFocusOnDeactivate:c.bool,setReturnFocus:c.oneOfType([c.instanceOf(h),c.string,c.bool,c.func]),allowOutsideClick:c.oneOfType([c.bool,c.func]),preventScroll:c.bool,tabbableOptions:c.shape({displayCheck:c.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:c.oneOfType([c.bool,c.func])}),trapStack:c.array,isKeyForward:c.func,isKeyBackward:c.func}),containerElements:c.arrayOf(c.instanceOf(h)),children:c.oneOfType([c.element,c.instanceOf(h)])},p.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:d},e.exports=p},2697:function(e,t,n){"use strict";n.r(t),n.d(t,{createFocusTrap:function(){return h}});var r=n(9054);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t1?t-1:0),r=1;r1?n-1:0),i=1;i=0)e=o.activeElement;else{var t=m.tabbableGroups[0];e=t&&t.firstTabbableNode||y("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},k=function(){if(m.containerGroups=m.containers.map((function(e){var t=(0,r.tabbable)(e,g.tabbableOptions),n=(0,r.focusable)(e,g.tabbableOptions),o=t.length>0?t[0]:void 0,i=t.length>0?t[t.length-1]:void 0,a=n.find((function(e){return(0,r.isTabbable)(e)})),s=n.slice().reverse().find((function(e){return(0,r.isTabbable)(e)})),l=!!t.find((function(e){return(0,r.getTabIndex)(e)>0}));return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.indexOf(e);return i<0?o?n.slice(n.indexOf(e)+1).find((function(e){return(0,r.isTabbable)(e)})):n.slice(0,n.indexOf(e)).reverse().find((function(e){return(0,r.isTabbable)(e)})):t[i+(o?1:-1)]}}})),m.tabbableGroups=m.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),m.tabbableGroups.length<=0&&!y("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(m.containerGroups.find((function(e){return e.posTabIndexesFound}))&&m.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},x=function e(t){var n=t.activeElement;if(n)return n.shadowRoot&&null!==n.shadowRoot.activeElement?e(n.shadowRoot):n},S=function e(t){!1!==t&&t!==x(document)&&(t&&t.focus?(t.focus({preventScroll:!!g.preventScroll}),m.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(w()))},C=function(e){var t=y("setReturnFocus",e);return t||!1!==t&&e},E=function(e){var t=e.target,n=e.event,o=e.isBackward,i=void 0!==o&&o;t=t||f(n),k();var s=null;if(m.tabbableGroups.length>0){var l=b(t,n),u=l>=0?m.containerGroups[l]:void 0;if(l<0)s=i?m.tabbableGroups[m.tabbableGroups.length-1].lastTabbableNode:m.tabbableGroups[0].firstTabbableNode;else if(i){var d=c(m.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(d<0&&(u.container===t||(0,r.isFocusable)(t,g.tabbableOptions)&&!(0,r.isTabbable)(t,g.tabbableOptions)&&!u.nextTabbableNode(t,!1))&&(d=l),d>=0){var p=0===d?m.tabbableGroups.length-1:d-1,h=m.tabbableGroups[p];s=(0,r.getTabIndex)(t)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else a(n)||(s=u.nextTabbableNode(t,!1))}else{var v=c(m.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(v<0&&(u.container===t||(0,r.isFocusable)(t,g.tabbableOptions)&&!(0,r.isTabbable)(t,g.tabbableOptions)&&!u.nextTabbableNode(t))&&(v=l),v>=0){var w=v===m.tabbableGroups.length-1?0:v+1,x=m.tabbableGroups[w];s=(0,r.getTabIndex)(t)>=0?x.firstTabbableNode:x.firstDomTabbableNode}else a(n)||(s=u.nextTabbableNode(t))}}else s=y("fallbackFocus");return s},_=function(e){var t=f(e);b(t,e)>=0||(d(g.clickOutsideDeactivates,e)?n.deactivate({returnFocus:g.returnFocusOnDeactivate}):d(g.allowOutsideClick,e)||e.preventDefault())},T=function(e){var t=f(e),n=b(t,e)>=0;if(n||t instanceof Document)n&&(m.mostRecentlyFocusedNode=t);else{var o;e.stopImmediatePropagation();var i=!0;if(m.mostRecentlyFocusedNode)if((0,r.getTabIndex)(m.mostRecentlyFocusedNode)>0){var a=b(m.mostRecentlyFocusedNode),s=m.containerGroups[a].tabbableNodes;if(s.length>0){var l=s.findIndex((function(e){return e===m.mostRecentlyFocusedNode}));l>=0&&(g.isKeyForward(m.recentNavEvent)?l+1=0&&(o=s[l-1],i=!1))}}else m.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return(0,r.getTabIndex)(e)>0}))}))||(i=!1);else i=!1;i&&(o=E({target:m.mostRecentlyFocusedNode,isBackward:g.isKeyBackward(m.recentNavEvent)})),S(o||m.mostRecentlyFocusedNode||w())}m.recentNavEvent=void 0},R=function(e){if(("Escape"===(null==(t=e)?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode))&&!1!==d(g.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();var t;(g.isKeyForward(e)||g.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m.recentNavEvent=e;var n=E({event:e,isBackward:t});n&&(a(e)&&e.preventDefault(),S(n))}(e,g.isKeyBackward(e))},O=function(e){var t=f(e);b(t,e)>=0||d(g.clickOutsideDeactivates,e)||d(g.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},L=function(){if(m.active)return function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)}(h,n),m.delayInitialFocusTimer=g.delayInitialFocus?u((function(){S(w())})):S(w()),o.addEventListener("focusin",T,!0),o.addEventListener("mousedown",_,{capture:!0,passive:!1}),o.addEventListener("touchstart",_,{capture:!0,passive:!1}),o.addEventListener("click",O,{capture:!0,passive:!1}),o.addEventListener("keydown",R,{capture:!0,passive:!1}),n},P=function(){if(m.active)return o.removeEventListener("focusin",T,!0),o.removeEventListener("mousedown",_,!0),o.removeEventListener("touchstart",_,!0),o.removeEventListener("click",O,!0),o.removeEventListener("keydown",R,!0),n},A="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===m.mostRecentlyFocusedNode}))}))&&S(w())})):void 0,N=function(){A&&(A.disconnect(),m.active&&!m.paused&&m.containers.map((function(e){A.observe(e,{subtree:!0,childList:!0})})))};return(n={get active(){return m.active},get paused(){return m.paused},activate:function(e){if(m.active)return this;var t=v(e,"onActivate"),n=v(e,"onPostActivate"),r=v(e,"checkCanFocusTrap");r||k(),m.active=!0,m.paused=!1,m.nodeFocusedBeforeActivation=o.activeElement,null==t||t();var i=function(){r&&k(),L(),N(),null==n||n()};return r?(r(m.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!m.active)return this;var t=i({onDeactivate:g.onDeactivate,onPostDeactivate:g.onPostDeactivate,checkCanReturnFocus:g.checkCanReturnFocus},e);clearTimeout(m.delayInitialFocusTimer),m.delayInitialFocusTimer=void 0,P(),m.active=!1,m.paused=!1,N(),function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}(h,n);var r=v(t,"onDeactivate"),o=v(t,"onPostDeactivate"),a=v(t,"checkCanReturnFocus"),s=v(t,"returnFocus","returnFocusOnDeactivate");null==r||r();var l=function(){u((function(){s&&S(C(m.nodeFocusedBeforeActivation)),null==o||o()}))};return s&&a?(a(C(m.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(e){if(m.paused||!m.active)return this;var t=v(e,"onPause"),n=v(e,"onPostPause");return m.paused=!0,null==t||t(),P(),N(),null==n||n(),this},unpause:function(e){if(!m.paused||!m.active)return this;var t=v(e,"onUnpause"),n=v(e,"onPostUnpause");return m.paused=!1,null==t||t(),k(),L(),N(),null==n||n(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return m.containers=t.map((function(e){return"string"==typeof e?o.querySelector(e):e})),m.active&&k(),N(),this}}).updateContainerElements(e),n}},4146:function(e,t,n){"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),m=0;m