blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
327
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
5
134
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
46 values
visit_date
timestamp[us]date
2016-08-02 22:44:29
2023-09-06 08:39:28
revision_date
timestamp[us]date
1977-08-08 00:00:00
2023-09-05 12:13:49
committer_date
timestamp[us]date
1977-08-08 00:00:00
2023-09-05 12:13:49
github_id
int64
19.4k
671M
star_events_count
int64
0
40k
fork_events_count
int64
0
32.4k
gha_license_id
stringclasses
14 values
gha_event_created_at
timestamp[us]date
2012-06-21 16:39:19
2023-09-14 21:52:42
gha_created_at
timestamp[us]date
2008-05-25 01:21:32
2023-06-28 13:19:12
gha_language
stringclasses
60 values
src_encoding
stringclasses
24 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
7
9.18M
extension
stringclasses
20 values
filename
stringlengths
1
141
content
stringlengths
7
9.18M
2db90bbd0bd0cfee54ee74082e6621c63c0a272c
672982793c40413d9c9e941b0fd31bca5936960b
/plot1.R
4f457f97ad269305988e80cbc11a8e93b11871f7
[]
no_license
Giackgamba/ExData_Plotting1
59a5ccb3c91cac9a2d45f1c39d7b8b439fe72ca6
3754fbf2ef916c645cca9b02d487816925806d8b
refs/heads/master
2021-01-15T18:32:15.377669
2015-03-06T13:03:34
2015-03-06T13:03:34
31,661,691
0
0
null
2015-03-04T14:40:27
2015-03-04T14:40:27
null
UTF-8
R
false
false
784
r
plot1.R
## Download the zip file and store in a temporary file, ## unzip it and read only the relvant data temp <- tempfile() download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip', destfile = temp) data <- read.table(unz(temp, 'household_power_consumption.txt'), skip = 66637, nrow = 2880, sep = ';') unlink(temp) names(data) <- c('Date', 'Time', 'Global_active_power','Global_reactive_power', 'Voltage', 'Global_intensity', 'Sub_metering_1', 'Sub_metering_2', 'Sub_metering_3') png(filename = 'plot1.png', width = 480, height = 480) hist(data$Global_active_power, col = 'red', xlab = 'Global Active Power (kilowatts)', main = 'Global Active Power') dev.off()
fd7c7eb33a160f652ce16fc6f89cdd0e13705a08
c1fe5ed7db9ad19e2b257b6ef21a4095a92b6689
/dist/glitch-js.min.js
6162c976420315b2dfa9e6e556f89a2bddf27984
[]
no_license
BubbleMakersLab/glitchjs
83dbd8d272c6df9f29cdd22eeade691510cdff6d
656c0d7ed9e560cc7ca095167ee26d07db88da0b
refs/heads/master
2020-05-16T18:28:27.986091
2019-04-25T16:24:32
2019-04-25T16:24:32
183,226,066
0
0
null
null
null
null
UTF-8
R
true
true
402,891
js
glitch-js.min.js
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),n(6),n(7),e.exports=n(8)},function(e,t,n){var r=n(2);"string"==typeof r&&(r=[[e.i,r,""]]);n(4)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,".App{text-align:center}.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite;height:40vmin;pointer-events:none}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;height:2000px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.glitch-js-selected-text{background-color:#ff0;border:1px solid #00f}",""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),a=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(a).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(o=0;o<e.length;o++){var i=e[o];null!=i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),t.push(i))}},t}},function(e,t,n){var r,o,a,i={},l=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),u=(a={},function(e,t){if("function"==typeof e)return e();if(void 0===a[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}a[e]=n}return a[e]}),s=null,c=0,d=[],f=n(5);function p(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(g(r.parts[a],t))}else{var l=[];for(a=0;a<r.parts.length;a++)l.push(g(r.parts[a],t));i[r.id]={id:r.id,refs:1,parts:l}}}}function h(e,t){for(var n=[],r={},o=0;o<e.length;o++){var a=e[o],i=t.base?a[0]+t.base:a[0],l={css:a[1],media:a[2],sourceMap:a[3]};r[i]?r[i].parts.push(l):n.push(r[i]={id:i,parts:[l]})}return n}function m(e,t){var n=u(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=u(e.insertAt.before,n);n.insertBefore(t,o)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);0<=t&&d.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=n.nc;r&&(e.attrs.nonce=r)}return b(t,e.attrs),m(e,t),t}function b(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var i=c++;n=s||(s=y(t)),r=k.bind(null,n,i,!1),o=k.bind(null,n,i,!0)}else o=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",b(t,e.attrs),m(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=f(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=l()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return p(n,t),function(e){for(var r=[],o=0;o<n.length;o++){var a=n[o];(l=i[a.id]).refs--,r.push(l)}for(e&&p(h(e,t),t),o=0;o<r.length;o++){var l;if(0===(l=r[o]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete i[l.id]}}}};var x,w=(x=[],function(e,t){return x[e]=t,x.filter(Boolean).join("\n")});function k(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t){(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";var r=n(1),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=r.createContext&&r.createContext(o),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};function u(e){return function(t){return r.createElement(s,i({attr:i({},e.attr)},t),function e(t){return t&&t.map(function(t,n){return r.createElement(t.tag,i({key:n},t.attr),e(t.child))})}(e.child))}}function s(e){function t(t){var n,o=e.size||t.size||"1em";t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className);var a=e.attr,u=l(e,["attr"]);return r.createElement("svg",i({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,u,{className:n,style:i({color:e.color||t.color},t.style,e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),e.children)}return void 0!==a?r.createElement(a.Consumer,null,function(e){return t(e)}):t(o)}n.d(t,"a",function(){return u})},function(e,t,n){"use strict";e.exports=n(121)},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=n(128)()},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(127);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.sheetsManager=void 0;var o=r(n(9)),a=r(n(4)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(5)),f=r(n(1)),p=r(n(3)),h=(r(n(15)),r(n(48))),m=n(8),v=n(73),y=r(n(151)),b=r(n(79)),g=r(n(80)),x=r(n(165)),w=r(n(52)),k=r(n(53)),_=r(n(81)),E=r(n(181)),S=r(n(182)),C=(0,v.create)((0,b.default)()),O=(0,_.default)(),P=-1e11,T=new Map;t.sheetsManager=T;var M={},j=(0,w.default)({typography:{suppressWarning:!0}});m.ponyfillGlobal.__MUI_STYLES__||(m.ponyfillGlobal.__MUI_STYLES__={}),m.ponyfillGlobal.__MUI_STYLES__.withStyles||(m.ponyfillGlobal.__MUI_STYLES__.withStyles=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,m=t.withTheme,v=void 0!==m&&m,b=t.flip,w=void 0===b?null:b,_=t.name,R=(0,d.default)(t,["withTheme","flip","name"]),N=(0,E.default)(e),D=N.themingEnabled||"string"==typeof _||v;P+=1,N.options.index=P;var I,A=(I=f.default.Component,(0,c.default)(F,I),(0,l.default)(F,[{key:"componentDidMount",value:function(){var e=this;D&&(this.unsubscribeId=k.default.subscribe(this.context,function(t){var n=e.theme;e.theme=t,e.attach(e.theme),e.setState({},function(){e.detach(n)})}))}},{key:"componentDidUpdate",value:function(){this.stylesCreatorSaved}},{key:"componentWillUnmount",value:function(){this.detach(this.theme),null!==this.unsubscribeId&&k.default.unsubscribe(this.context,this.unsubscribeId)}},{key:"getClasses",value:function(){if(this.disableStylesGeneration)return this.props.classes||{};var e=!1,t=x.default.get(this.sheetsManager,this.stylesCreatorSaved,this.theme);return t.sheet.classes!==this.cacheClasses.lastJSS&&(this.cacheClasses.lastJSS=t.sheet.classes,e=!0),this.props.classes!==this.cacheClasses.lastProp&&(this.cacheClasses.lastProp=this.props.classes,e=!0),e&&(this.cacheClasses.value=(0,g.default)({baseClasses:this.cacheClasses.lastJSS,newClasses:this.props.classes,Component:n})),this.cacheClasses.value}},{key:"attach",value:function(e){if(!this.disableStylesGeneration){var t=this.stylesCreatorSaved,n=x.default.get(this.sheetsManager,t,e);if(n||(n={refs:0,sheet:null},x.default.set(this.sheetsManager,t,e,n)),0===n.refs){var r;this.sheetsCache&&(r=x.default.get(this.sheetsCache,t,e)),r||((r=this.createSheet(e)).attach(),this.sheetsCache&&x.default.set(this.sheetsCache,t,e,r)),n.sheet=r;var o=this.context[y.default.sheetsRegistry];o&&o.add(r)}n.refs+=1}}},{key:"createSheet",value:function(e){var t=this.stylesCreatorSaved.create(e,_),r=_;return this.jss.createStyleSheet(t,(0,a.default)({meta:r,classNamePrefix:r,flip:"boolean"==typeof w?w:"rtl"===e.direction,link:!1},this.sheetOptions,this.stylesCreatorSaved.options,{name:_||n.displayName},R))}},{key:"detach",value:function(e){if(!this.disableStylesGeneration){var t=x.default.get(this.sheetsManager,this.stylesCreatorSaved,e);if(t.refs-=1,0===t.refs){x.default.delete(this.sheetsManager,this.stylesCreatorSaved,e),this.jss.removeStyleSheet(t.sheet);var n=this.context[y.default.sheetsRegistry];n&&n.remove(t.sheet)}}}},{key:"render",value:function(){var e=this.props,t=(e.classes,e.innerRef),r=(0,d.default)(e,["classes","innerRef"]),o=(0,S.default)({theme:this.theme,name:_,props:r});return v&&!o.theme&&(o.theme=this.theme),f.default.createElement(n,(0,a.default)({},o,{classes:this.getClasses(),ref:t}))}}]),F);function F(e,t){var n;(0,i.default)(this,F),(n=(0,u.default)(this,(0,s.default)(F).call(this,e,t))).jss=t[y.default.jss]||C,n.sheetsManager=T,n.unsubscribeId=null;var r=t.muiThemeProviderOptions;return r&&(r.sheetsManager&&(n.sheetsManager=r.sheetsManager),n.sheetsCache=r.sheetsCache,n.disableStylesGeneration=r.disableStylesGeneration),n.stylesCreatorSaved=N,n.sheetOptions=(0,a.default)({generateClassName:O},t[y.default.sheetOptions]),n.theme=D?k.default.initial(t)||j:M,n.attach(n.theme),n.cacheClasses={value:null,lastProp:null,lastJSS:{}},n}return A.contextTypes=(0,a.default)((r={muiThemeProviderOptions:p.default.object},(0,o.default)(r,y.default.jss,p.default.object),(0,o.default)(r,y.default.sheetOptions,p.default.object),(0,o.default)(r,y.default.sheetsRegistry,p.default.object),r),D?k.default.contextTypes:{}),(0,h.default)(A,n),A}}),t.default=function(e,t){return m.ponyfillGlobal.__MUI_STYLES__.withStyles(e,(0,a.default)({defaultTheme:j},t))}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"==a||"number"==a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"==a)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.r(t);var r=n(68),o=n.n(r);n.d(t,"componentPropType",function(){return o.a});var a=n(69),i=n.n(a);n.d(t,"chainPropTypes",function(){return i.a});var l=n(70),u=n.n(l);n.d(t,"exactProp",function(){return u.a});var s=n(71),c=n.n(s);n.d(t,"getDisplayName",function(){return c.a});var d=n(72),f=n.n(d);n.d(t,"ponyfillGlobal",function(){return f.a})},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(27),o=n(38);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(130);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},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})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var a=n(46);function i(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?Object(a.a)(e):t}n.d(t,"a",function(){return i})},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(122)},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(10)),a=r(n(11)),i=r(n(12)),l=r(n(13)),u=r(n(14)),s=r(n(27)),c=r(n(5)),d=r(n(4)),f=r(n(1));r(n(3)),r(n(15));var p,h=(p=null,function(){if(null!==p)return p;var e,t,n=!1;try{window.addEventListener("test",null,(e={},t={get:function(){n=!0}},Object.defineProperty(e,"passive",t)))}catch(e){}return p=n}()),m={capture:!1,passive:!1};function v(e){return d({},m,e)}function y(e,t,n){var r=[e,t];return r.push(h?n:n.capture),r}function b(e,t,n,r){e.addEventListener.apply(e,y(t,n,r))}function g(e,t,n,r){e.removeEventListener.apply(e,y(t,n,r))}var x=(u(w,f.PureComponent),a(w,[{key:"componentDidMount",value:function(){this.applyListeners(b)}},{key:"componentDidUpdate",value:function(e){this.applyListeners(g,e),this.applyListeners(b)}},{key:"componentWillUnmount",value:function(){this.applyListeners(g)}},{key:"applyListeners",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.props,n=t.target;if(n){var r=n;"string"==typeof n&&(r=window[n]),function(e,t){e.children,e.target;var n=c(e,["children","target"]);Object.keys(n).forEach(function(e){if("on"===e.substring(0,2)){var r=n[e],o=s(r),a="object"===o;if(a||"function"===o){var i="capture"===e.substr(-7).toLowerCase(),l=e.substring(2).toLowerCase();l=i?l.substring(0,l.length-7):l,a?t(l,r.handler,r.options):t(l,r,v({capture:i}))}}})}(t,e.bind(null,r))}}},{key:"render",value:function(){return this.props.children||null}}]),w);function w(){return o(this,w),i(this,l(w).apply(this,arguments))}x.propTypes={},t.withOptions=function(e,t){return{handler:e,options:v(t)}},t.default=x},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.contains=a,t.findIndex=i,t.find=function(e,t){var n=i(e,t);return-1<n?e[n]:void 0},t.createChainedFunction=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}},function(){})};var o=r(n(27));function a(e,t){return Object.keys(t).every(function(n){return e.hasOwnProperty(n)&&e[n]===t[n]})}function i(e,t){for(var n=(0,o.default)(t),r=0;r<e.length;r+=1){if("function"===n&&1==!!t(e[r],r,e))return r;if("object"===n&&a(e[r],t))return r;if(-1!==["string","number","boolean"].indexOf(n))return e.indexOf(t)}return-1}r(n(15))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){return e&&e.ownerDocument||document}},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:(0,l.default)({lineHeight:1.75},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,d.fade)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},flat:{},flatPrimary:{},flatSecondary:{},outlined:{padding:"5px 16px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,d.fade)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,d.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,d.fade)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,d.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground},"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},raised:{},raisedPrimary:{},raisedSecondary:{},fab:{borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]}},extendedFab:{borderRadius:24,padding:"0 16px",width:"auto",minWidth:48,height:48},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},mini:{width:40,height:40},sizeSmall:{padding:"4px 8px",minWidth:64,fontSize:e.typography.pxToRem(13)},sizeLarge:{padding:"8px 24px",fontSize:e.typography.pxToRem(15)},fullWidth:{width:"100%"}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(9)),i=r(n(5)),l=r(n(4)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(6))),d=n(35),f=r(n(96)),p=n(23);function h(e){var t,n=e.children,r=e.classes,o=e.className,c=e.color,d=e.disabled,h=e.disableFocusRipple,m=e.focusVisibleClassName,v=e.fullWidth,y=e.mini,b=e.size,g=e.variant,x=(0,i.default)(e,["children","classes","className","color","disabled","disableFocusRipple","focusVisibleClassName","fullWidth","mini","size","variant"]),w="fab"===g||"extendedFab"===g,k="contained"===g||"raised"===g,_="text"===g||"flat"===g,E=(0,s.default)(r.root,(t={},(0,a.default)(t,r.fab,w),(0,a.default)(t,r.mini,w&&y),(0,a.default)(t,r.extendedFab,"extendedFab"===g),(0,a.default)(t,r.text,_),(0,a.default)(t,r.textPrimary,_&&"primary"===c),(0,a.default)(t,r.textSecondary,_&&"secondary"===c),(0,a.default)(t,r.flat,_),(0,a.default)(t,r.flatPrimary,_&&"primary"===c),(0,a.default)(t,r.flatSecondary,_&&"secondary"===c),(0,a.default)(t,r.contained,k||w),(0,a.default)(t,r.containedPrimary,(k||w)&&"primary"===c),(0,a.default)(t,r.containedSecondary,(k||w)&&"secondary"===c),(0,a.default)(t,r.raised,k||w),(0,a.default)(t,r.raisedPrimary,(k||w)&&"primary"===c),(0,a.default)(t,r.raisedSecondary,(k||w)&&"secondary"===c),(0,a.default)(t,r.outlined,"outlined"===g),(0,a.default)(t,r.outlinedPrimary,"outlined"===g&&"primary"===c),(0,a.default)(t,r.outlinedSecondary,"outlined"===g&&"secondary"===c),(0,a.default)(t,r["size".concat((0,p.capitalize)(b))],"medium"!==b),(0,a.default)(t,r.disabled,d),(0,a.default)(t,r.fullWidth,v),(0,a.default)(t,r.colorInherit,"inherit"===c),t),o);return u.default.createElement(f.default,(0,l.default)({className:E,disabled:d,focusRipple:!h,focusVisibleClassName:(0,s.default)(r.focusVisible,m)},x),u.default.createElement("span",{className:r.label},n))}t.styles=o,h.defaultProps={color:"default",component:"button",disabled:!1,disableFocusRipple:!1,fullWidth:!1,mini:!1,size:"medium",type:"button",variant:"text"};var m=(0,c.default)(o,{name:"MuiButton"})(h);t.default=m},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){function n(e){return(n="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})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="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},a=s(n(28)),i=s(n(49)),l=s(n(39));function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return e&&e.__esModule?e:{default:e}}var c=(function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(d,[{key:"prop",value:function(e,t){if(void 0===t)return this.style[e];if(this.style[e]===t)return this;var n=null==(t=this.options.jss.plugins.onChangeValue(t,e,this))||!1===t,r=e in this.style;if(n&&!r)return this;var o=n&&r;if(o?delete this.style[e]:this.style[e]=t,this.renderable)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,t),this;var i=this.options.sheet;return i&&i.attached&&(0,a.default)(!1,'Rule is not linked. Missing sheet option "link: true".'),this}},{key:"applyTo",value:function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this}},{key:"toJSON",value:function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==(void 0===n?"undefined":o(n))?e[t]=n:Array.isArray(n)&&(e[t]=(0,l.default)(n))}return e}},{key:"toString",value:function(e){var t=this.options.sheet,n=t&&t.options.link?r({},e,{allowEmpty:!0}):e;return(0,i.default)(this.selector,this.style,n)}},{key:"selector",set:function(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable&&!this.renderer.setSelector(this.renderable,e)&&this.renderable)){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}},get:function(){return this.selectorText}}]),d);function d(e,t,n){!function(e,t){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function")}(this),this.type="style",this.isProcessed=!1;var r=n.sheet,o=n.Renderer,a=n.selector;this.key=e,this.options=n,this.style=t,a&&(this.selectorText=a),this.renderer=r?r.renderer:new o}t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce(function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e},{})}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t){return a.default.createElement(l.default.Consumer,null,function(n){return a.default.createElement(e,(0,o.default)({muiFormControl:n},t))})}return(0,i.default)(t,e),t};var o=r(n(4)),a=r(n(1)),i=r(n(48)),l=r(n(56));n(8)},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.cloneElementWithClassName=i,t.cloneChildrenWithClassName=function(e,t){return o.default.Children.map(e,function(e){return o.default.isValidElement(e)&&i(e,t)})},t.isMuiElement=function(e,t){return o.default.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)},t.setRef=function(e,t){"function"==typeof e?e(t):e&&(e.current=t)};var o=r(n(1)),a=r(n(7));function i(e,t){return o.default.cloneElement(e,{className:(0,a.default)(e.props.className,t)})}},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return i});var r=n(0),o=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"}}]})(e)};o.displayName="FaSlack";var a=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M488 192H336v56c0 39.7-32.3 72-72 72s-72-32.3-72-72V126.4l-64.9 39C107.8 176.9 96 197.8 96 220.2v47.3l-80 46.2C.7 322.5-4.6 342.1 4.3 357.4l80 138.6c8.8 15.3 28.4 20.5 43.7 11.7L231.4 448H368c35.3 0 64-28.7 64-64h16c17.7 0 32-14.3 32-32v-64h8c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zm147.7-37.4L555.7 16C546.9.7 527.3-4.5 512 4.3L408.6 64H306.4c-12 0-23.7 3.4-33.9 9.7L239 94.6c-9.4 5.8-15 16.1-15 27.1V248c0 22.1 17.9 40 40 40s40-17.9 40-40v-88h184c30.9 0 56 25.1 56 56v28.5l80-46.2c15.3-8.9 20.5-28.4 11.7-43.7z"}}]})(e)};a.displayName="FaHandsHelping";var i=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M312 320h136V56c0-13.3-10.7-24-24-24H24C10.7 32 0 42.7 0 56v400c0 13.3 10.7 24 24 24h264V344c0-13.2 10.8-24 24-24zm129 55l-98 98c-4.5 4.5-10.6 7-17 7h-6V352h128v6.1c0 6.3-2.5 12.4-7 16.9z"}}]})(e)};i.displayName="FaStickyNote"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=s(n(40)),a=s(n(76)),i=s(n(29)),l=s(n(137));function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return e&&e.__esModule?e:{default:e}}var c=(function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(d,[{key:"add",value:function(e,t,n){var a=this.options,u=a.parent,s=a.sheet,c=a.jss,d=a.Renderer,f=a.generateClassName;!(n=r({classes:this.classes,parent:u,sheet:s,jss:c,Renderer:d,generateClassName:f},n)).selector&&this.classes[e]&&(n.selector="."+(0,l.default)(this.classes[e])),this.raw[e]=t;var p=(0,o.default)(e,t,n),h=void 0;!n.selector&&p instanceof i.default&&(h=f(p,s),p.selector="."+(0,l.default)(h)),this.register(p,h);var m=void 0===n.index?this.index.length:n.index;return this.index.splice(m,0,p),p}},{key:"get",value:function(e){return this.map[e]}},{key:"remove",value:function(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:"indexOf",value:function(e){return this.index.indexOf(e)}},{key:"process",value:function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:"register",value:function(e,t){(this.map[e.key]=e)instanceof i.default&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:"unregister",value:function(e){delete this.map[e.key],e instanceof i.default&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:"link",value:function(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var r=e[n],o=this.options.sheet.renderer.getKey(r);t[o]&&(o=t[o]);var i=this.map[o];i&&(0,a.default)(i,r)}}},{key:"toString",value:function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+="\n"),t+=a)}return t}}]),d);function d(e){var t=this;!function(e,t){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function")}(this),this.map={},this.raw={},this.index=[],this.update=function(e,n){var r=t.options,o=r.jss.plugins,a=r.sheet;if("string"==typeof e)o.onUpdate(n,t.get(e),a);else for(var i=0;i<t.index.length;i++)o.onUpdate(e,t.index[i],a)},this.options=e,this.classes=e.classes}t.default=c},function(e,t,n){"use strict";var r=n(2);function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:n<e?n:e}function a(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(function(e){return e+e})),n?"rgb(".concat(n.map(function(e){return parseInt(e,16)}).join(", "),")"):""}function i(e){if("#"===e.charAt(0))return i(a(e));var t=e.indexOf("("),n=e.substring(0,t),r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map(function(e){return parseFloat(e)})}}function l(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")&&(n=n.map(function(e,t){return t<3?parseInt(e,10):e})),-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e.type,"(").concat(n.join(", "),")")}function u(e){var t=i(e);if(-1===t.type.indexOf("rgb"))return t.values[2]/100;var n=t.values.map(function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function s(e,t){if(!e)return e;if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function c(e,t){if(!e)return e;if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexToRGB=a,t.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=i(e).values;return t=t.map(function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t}),"#".concat(t.join(""))},t.decomposeColor=i,t.recomposeColor=l,t.getContrastRatio=function(e,t){var n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.getLuminance=u,t.emphasize=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.15;return.5<u(e)?s(e,t):c(e,t)},t.fade=function(e,t){return e?(e=i(e),t=o(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),e.values[3]=t,l(e)):e},t.darken=s,t.lighten=c,r(n(15))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.isNumber=t.isString=t.formatMs=t.duration=t.easing=void 0;var o=r(n(5)),a=(r(n(15)),{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"});t.easing=a;var i={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}t.duration=i,t.formatMs=l,t.isString=function(e){return"string"==typeof e},t.isNumber=function(e){return!isNaN(parseFloat(e))};var u={easing:a,duration:i,create:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["all"],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?i.standard:n,u=t.easing,s=void 0===u?a.easeInOut:u,c=t.delay,d=void 0===c?0:c;return(0,o.default)(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map(function(e){return"".concat(e," ").concat("string"==typeof r?r:l(r)," ").concat(s," ").concat("string"==typeof d?d:l(d))}).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.selectorTypes,r=void 0===n?["ID","Class","Tag","NthChild"]:n,o=t.attributesToIgnore,a=void 0===o?["id","class","length"]:o,i=t.excludeRegex,l=void 0===i?null:i,u=[],d=(0,c.getParents)(e),f=!0,p=!1,m=void 0;try{for(var v,y=d[Symbol.iterator]();!(f=(v=y.next()).done);f=!0){var b=h(v.value,r,a,l);Boolean(b)&&u.push(b)}}catch(e){p=!0,m=e}finally{try{!f&&y.return&&y.return()}finally{if(p)throw m}}var g=[],x=!0,w=!1,k=void 0;try{for(var _,E=u[Symbol.iterator]();!(x=(_=E.next()).done);x=!0){var S=_.value;g.unshift(S);var C=g.join(" > ");if((0,s.isUnique)(e,C))return C}}catch(e){w=!0,k=e}finally{try{!x&&E.return&&E.return()}finally{if(w)throw k}}return null};var r=n(260),o=n(261),a=n(262),i=n(263),l=n(264),u=n(265),s=n(266),c=n(267);function d(e,t){var n=e.parentNode.querySelectorAll(t);return 1===n.length&&n[0]===e}function f(e,t){return t.find(d.bind(null,e))}function p(e,t,n){var r=(0,a.getCombinations)(t,3),o=f(e,r);return Boolean(o)?o:Boolean(n)&&(o=f(e,r=r.map(function(e){return n+e})),Boolean(o))?o:null}function h(e,t,n,a){var s,c,f,h,m=void 0,v=(s=e,c=t,f=n,h={Tag:u.getTag,NthChild:l.getNthChild,Attributes:function(e){return(0,i.getAttributes)(e,f)},Class:o.getClassSelectors,ID:r.getID},c.reduce(function(e,t){return e[t]=h[t](s),e},{}));a&&a instanceof RegExp&&(v.ID=a.test(v.ID)?null:v.ID,v.Class=v.Class.filter(function(e){return!a.test(e)}));var y=!0,b=!1,g=void 0;try{for(var x,w=t[Symbol.iterator]();!(y=(x=w.next()).done);y=!0){var k=x.value,_=v.ID,E=v.Tag,S=v.Class,C=v.Attributes,O=v.NthChild;switch(k){case"ID":if(Boolean(_)&&d(e,_))return _;break;case"Tag":if(Boolean(E)&&d(e,E))return E;break;case"Class":if(Boolean(S)&&S.length&&(m=p(e,S,E)))return m;break;case"Attributes":if(Boolean(C)&&C.length&&(m=p(e,C,E)))return m;break;case"NthChild":if(Boolean(O))return O}}}catch(e){b=!0,g=e}finally{try{!y&&w.return&&w.return()}finally{if(b)throw g}}return"*"}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var o=0;o<e.length&&"!important"!==e[o];o++)n&&(n+=", "),n+=r(e[o]," ");else n=r(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};var r=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"unnamed",t=arguments[1],n=arguments[2],i=n.jss,l=(0,a.default)(t);return i.plugins.onCreateRule(e,l,n)||("@"===e[0]&&(0,r.default)(!1,"[JSS] Unknown at-rule %s",e),new o.default(e,l,n))};var r=i(n(28)),o=i(n(29)),a=i(n(134));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n.r(t),n.d(t,"isBrowser",function(){return o});var 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},o="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType;t.default=o},function(e,t,n){e.exports=function(){"use strict";var e=function(e){return!(!e||"object"!=typeof e||(n=e,"[object RegExp]"===(r=Object.prototype.toString.call(n))||"[object Date]"===r||n.$$typeof===t));var n,r},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function o(t,a,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e;var l=Array.isArray(a);return l===Array.isArray(t)?l?i.arrayMerge(t,a,i):function(e,t,r){var a={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(t){a[t]=n(e[t],r)}),Object.keys(t).forEach(function(i){r.isMergeableObject(t[i])&&e[i]?a[i]=function(e,t){if(!t.customMerge)return o;var n=t.customMerge(e);return"function"==typeof n?n:o}(i,r)(e[i],t[i],r):a[i]=n(t[i],r)}),a}(t,a,i):n(a,i)}return o.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return o(e,n,t)},{})},o}()},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(4)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(1)),p=(r(n(3)),r(n(48))),h=n(8),m=r(n(52)),v=r(n(53));h.ponyfillGlobal.__MUI_STYLES__||(h.ponyfillGlobal.__MUI_STYLES__={}),h.ponyfillGlobal.__MUI_STYLES__.withTheme||(h.ponyfillGlobal.__MUI_STYLES__.withTheme=function(){return function(e){var t,n=(t=f.default.Component,(0,d.default)(r,t),(0,u.default)(r,[{key:"componentDidMount",value:function(){var e=this;this.unsubscribeId=v.default.subscribe(this.context,function(t){e.setState({theme:t})})}},{key:"componentWillUnmount",value:function(){null!==this.unsubscribeId&&v.default.unsubscribe(this.context,this.unsubscribeId)}},{key:"render",value:function(){var t=this.props,n=t.innerRef,r=(0,i.default)(t,["innerRef"]);return f.default.createElement(e,(0,a.default)({theme:this.state.theme,ref:n},r))}}]),r);function r(e,t){var n;return(0,l.default)(this,r),(n=(0,s.default)(this,(0,c.default)(r).call(this))).state={theme:v.default.initial(t)||o||(o=(0,m.default)({typography:{suppressWarning:!0}}))},n}return n.contextTypes=v.default.contextTypes,(0,p.default)(n,e),n}});var y=h.ponyfillGlobal.__MUI_STYLES__.withTheme;t.default=y},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24));t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window,n=(0,o.default)(e);return n.defaultView||n.parentView||t}},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(3)),o=l(n(1)),a=l(n(21)),i=n(89);function l(e){return e&&e.__esModule?e:{default:e}}n(234);var u="unmounted";t.UNMOUNTED=u;var s="exited";t.EXITED=s;var c="entering";t.ENTERING=c;var d="entered";t.ENTERED=d,t.EXITING="exiting";var f=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,a=n.transitionGroup,i=a&&!a.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=s,r.appearStatus=c):o=d:o=t.unmountOnExit||t.mountOnEnter?u:s,r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:s}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==d&&(t=c):n!==c&&n!==d||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=a.default.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===s&&this.setState({status:u})},i.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,a=this.getTimeouts(),i=o?a.appear:a.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,function(){n.safeSetState({status:d},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:d},function(){n.props.onEntered(e)})},i.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:s},function(){t.props.onExited(e)})})})):this.safeSetState({status:s},function(){t.props.onExited(e)})},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function p(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:p,onEntering:p,onEntered:p,onExit:p,onExiting:p,onExited:p},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r,o,a;r=e,a=n[o=t],o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})}return e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(67),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var s=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)return t;if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=u(t),m=u(n),v=0;v<i.length;++v){var y=i[v];if(!(a[y]||r&&r[y]||m&&m[y]||l&&l[y])){var b=f(n,y);try{s(t,y,b)}catch(e){}}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r="";if(!t)return r;var i=n.indent,l=void 0===i?0:i,u=t.fallbacks;if(l++,u)if(Array.isArray(u))for(var s=0;s<u.length;s++){var c=u[s];for(var d in c){var f=c[d];null!=f&&(r+="\n"+a(d+": "+(0,o.default)(f)+";",l))}}else for(var p in u){var h=u[p];null!=h&&(r+="\n"+a(p+": "+(0,o.default)(h)+";",l))}for(var m in t){var v=t[m];null!=v&&"fallbacks"!==m&&(r+="\n"+a(m+": "+(0,o.default)(v)+";",l))}return r||n.allowEmpty?r=a(e+" {"+r+"\n",--l)+a("}",l):r};var r,o=(r=n(39))&&r.__esModule?r:{default:r};function a(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(74))&&r.__esModule?r:{default:r};t.default=new o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o="",a="";if(((r=n(41))&&r.__esModule?r:{default:r}).default){var i={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},l=document.createElement("p").style;for(var u in i)if(u+"Transform"in l){a=i[o=u];break}}t.default={js:o,css:a}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(n(9));var o=r(n(4)),a=r(n(5)),i=r(n(42)),l=r(n(166)),u=(r(n(15)),r(n(168))),s=r(n(169)),c=r(n(170)),d=r(n(176)),f=r(n(177)),p=r(n(178)),h=r(n(179)),m=r(n(36)),v=r(n(180));t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,y=void 0===r?{}:r,b=e.palette,g=void 0===b?{}:b,x=e.shadows,w=e.spacing,k=void 0===w?{}:w,_=e.typography,E=void 0===_?{}:_,S=(0,a.default)(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),C=(0,c.default)(g),O=(0,u.default)(n),P=(0,o.default)({},h.default,k);return(0,o.default)({breakpoints:O,direction:"ltr",mixins:(0,s.default)(O,P,y),overrides:{},palette:C,props:{},shadows:x||f.default,typography:(0,d.default)(C,E)},(0,i.default)({shape:p.default,spacing:P,transitions:m.default,zIndex:v.default},S,{isMergeableObject:l.default}))}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CHANNEL=void 0;var o=r(n(9)),a="__THEMING__";t.CHANNEL=a;var i={contextTypes:(0,o.default)({},a,function(){}),initial:function(e){return e[a]?e[a].getState():null},subscribe:function(e,t){return e[a]?e[a].subscribe(t):null},unsubscribe:function(e,t){e[a]&&e[a].unsubscribe(t)}};t.default=i},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(192))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(193))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1)).default.createContext();t.default=o},function(e,t){function n(e,t,n){var r,o,a,i,l;function u(){var s=Date.now()-i;s<t&&0<=s?r=setTimeout(u,t-s):(r=null,n||(l=e.apply(a,o),a=o=null))}function s(){a=this,o=arguments,i=Date.now();var s=n&&!r;return r||(r=setTimeout(u,t)),s&&(l=e.apply(a,o),a=o=null),l}return null==t&&(t=100),s.clear=function(){r&&(clearTimeout(r),r=null)},s.flush=function(){r&&(l=e.apply(a,o),a=o=null,clearTimeout(r),r=null)},s}n.debounce=n,e.exports=n},function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.hasValue=r,t.isFilled=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)},t.isAdornedStart=function(e){return e.startAdornment}},function(e,t,n){var r=n(210),o=n(211),a=n(212);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransitionProps=function(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode],delay:o.transitionDelay}},t.reflow=void 0,t.reflow=function(e){return e.scrollTop}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(237))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(275))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createGenerateClassName",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"createMuiTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"jssPreset",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"MuiThemeProvider",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"createStyles",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"withStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"withTheme",{enumerable:!0,get:function(){return c.default}});var o=r(n(81)),a=r(n(52)),i=r(n(79)),l=r(n(183)),u=r(n(186)),s=r(n(6)),c=r(n(43))},function(e,t,n){"use strict";var r=n(2);function o(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary[t?"dark":"light"]),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottom:"1px dotted ".concat(n)}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},multiline:{padding:"27px 12px 10px",boxSizing:"border-box"},input:{padding:"27px 12px 10px"},inputMarginDense:{paddingTop:24,paddingBottom:6},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(9)),i=r(n(4)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(55))),d=r(n(6));function f(e){var t=e.disableUnderline,n=e.classes,r=(0,l.default)(e,["disableUnderline","classes"]);return u.default.createElement(c.default,(0,i.default)({classes:(0,i.default)({},n,{root:(0,s.default)(n.root,(0,a.default)({},n.underline,!t)),underline:null})},r))}t.styles=o,c.default.defaultProps={fullWidth:!1,inputComponent:"input",multiline:!1,type:"text"},f.muiName="Input";var p=(0,d.default)(o,{name:"MuiFilledInput"})(f);t.default=p},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var s in n=Object(arguments[u]))o.call(n,s)&&(l[s]=n[s]);if(r){i=r(n);for(var c=0;c<i.length;c++)a.call(n,i[c])&&(l[i[c]]=n[i[c]])}}return l}},function(e,t,n){"use strict";e.exports=n(131)},function(e,t,n){"use strict";var r=n(2);function o(){return null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(n(27)),n(67),o.isRequired=function(){return null};var a=o;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e,t){return function(){return null}}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.specialProperty=void 0,r(n(9)),r(n(4)),t.specialProperty="exact-prop: ​",t.default=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionName=o,t.default=void 0;var r=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s\/]*)\s*/;function o(e){var t="".concat(e).match(r);return t&&t[1]||""}t.default=function(e){return"string"==typeof e?e:e?e.displayName||e.name||o(e)||"Component":void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.createGenerateClassName=t.sheets=t.RuleList=t.SheetsManager=t.SheetsRegistry=t.toCssValue=t.getDynamicStyles=void 0;var r=n(132);Object.defineProperty(t,"getDynamicStyles",{enumerable:!0,get:function(){return d(r).default}});var o=n(39);Object.defineProperty(t,"toCssValue",{enumerable:!0,get:function(){return d(o).default}});var a=n(74);Object.defineProperty(t,"SheetsRegistry",{enumerable:!0,get:function(){return d(a).default}});var i=n(133);Object.defineProperty(t,"SheetsManager",{enumerable:!0,get:function(){return d(i).default}});var l=n(34);Object.defineProperty(t,"RuleList",{enumerable:!0,get:function(){return d(l).default}});var u=n(50);Object.defineProperty(t,"sheets",{enumerable:!0,get:function(){return d(u).default}});var s=n(77);Object.defineProperty(t,"createGenerateClassName",{enumerable:!0,get:function(){return d(s).default}});var c=d(n(139));function d(e){return e&&e.__esModule?e:{default:e}}var f=t.create=function(e){return new c.default(e)};t.default=f()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=(function(e,t,n){t&&r(e.prototype,t)}(a,[{key:"add",value:function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:"reset",value:function(){this.registry=[]}},{key:"remove",value:function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:"toString",value:function(e){return this.registry.filter(function(e){return e.attached}).map(function(t){return t.toString(e)}).join("\n")}},{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),a);function a(){!function(e,t){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this),this.registry=[]}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(135))&&r.__esModule?r:{default:r};t.default=function(e){return e&&e[o.default]&&e===e[o.default]()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(28)),o=(a(n(78)),a(n(138)));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(){var e=0;return function(t,n){1e10<(e+=1)&&(0,r.default)(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",e);var a="c",i="";return n&&(a=n.options.classNamePrefix||"c",null!=n.options.jss.id&&(i+=n.options.jss.id)),""+a+o.default+i+e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=l(n(76)),a=l(n(34));function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e){return e&&e.__esModule?e:{default:e}}var u=(function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(s,[{key:"attach",value:function(){return this.attached||(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0),this}},{key:"detach",value:function(){return this.attached&&(this.renderer.detach(),this.attached=!1),this}},{key:"addRule",value:function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed&&(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))):this.deployed=!1,o}},{key:"insertRule",value:function(e){var t=this.renderer.insertRule(e);t&&this.options.link&&(0,o.default)(e,t)}},{key:"addRules",value:function(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"deleteRule",value:function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"deploy",value:function(){return this.renderer.deploy(),this.deployed=!0,this}},{key:"link",value:function(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:"toString",value:function(e){return this.rules.toString(e)}}]),s);function s(e,t){var n=this;for(var o in function(e,t){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this),this.update=function(e,t){return"string"==typeof e?n.rules.update(e,t):n.rules.update(e),n},this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=r({},t,{sheet:this,parent:this,classes:this.classes}),this.renderer=new t.Renderer(this),this.rules=new a.default(this.options),e)this.rules.add(o,e[o]);this.rules.process()}t.default=u},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(152)),a=r(n(153)),i=r(n(155)),l=r(n(157)),u=r(n(159)),s=r(n(164));t.default=function(){return{plugins:[(0,o.default)(),(0,a.default)(),(0,i.default)(),(0,l.default)(),"undefined"==typeof window?null:(0,u.default)(),(0,s.default)()]}}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4));r(n(15)),n(8),t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=(0,o.default)({},t);return Object.keys(n).forEach(function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))}),r}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.dangerouslyUseGlobalCSS,n=void 0!==t&&t,r=e.productionPrefix,a=void 0===r?"jss":r,i=e.seed,l=void 0===i?"":i,u=0;return function(e,t){return u+=1,n&&t&&t.options.name?"".concat(function(e){return String(e).replace(o,"-")}(t.options.name),"-").concat(e.key):"".concat(a).concat(l).concat(u)}},r(n(15));var o=/([[\].#*$><+~=|^:(),"'`\s])/g},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=function(e){if((!o&&0!==o||e)&&a.default){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),o=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return o};var o,a=r(n(83));e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ModalManager",{enumerable:!0,get:function(){return a.default}});var o=r(n(216)),a=r(n(85))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(10)),a=r(n(11)),i=r(n(221)),l=r(n(82)),u=r(n(24)),s=r(n(229)),c=n(87);function d(e,t){var n=-1;return e.some(function(e,r){return!!t(e)&&(n=r,!0)}),n}function f(e){return parseInt((0,i.default)(e,"paddingRight")||0,10)}var p=((0,a.default)(h,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&(0,c.ariaHidden)(e.modalRef,!1),this.hideSiblingNodes&&(0,c.ariaHiddenSiblings)(t,e.mountNode,e.modalRef,!0);var r=d(this.data,function(e){return e.container===t});if(-1!==r)return this.data[r].modals.push(e),n;var o={modals:[e],container:t,overflowing:(0,s.default)(t),prevPaddings:[]};return this.data.push(o),n}},{key:"mount",value:function(e){var t=d(this.data,function(t){return-1!==t.modals.indexOf(e)}),n=this.data[t];!n.style&&this.handleContainerOverflow&&function(e){e.style={overflow:e.container.style.overflow,paddingRight:e.container.style.paddingRight};var t={overflow:"hidden"};if(e.overflowing){var n=(0,l.default)();t.paddingRight="".concat(f(e.container)+n,"px");for(var r=(0,u.default)(e.container).querySelectorAll(".mui-fixed"),o=0;o<r.length;o+=1){var a=f(r[o]);e.prevPaddings.push(a),r[o].style.paddingRight="".concat(a+n,"px")}}Object.keys(t).forEach(function(n){e.container.style[n]=t[n]})}(n)}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=d(this.data,function(t){return-1!==t.modals.indexOf(e)}),r=this.data[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)this.handleContainerOverflow&&function(e){e.style&&Object.keys(e.style).forEach(function(t){e.container.style[t]=e.style[t]});for(var t=(0,u.default)(e.container).querySelectorAll(".mui-fixed"),n=0;n<t.length;n+=1)t[n].style.paddingRight="".concat(e.prevPaddings[n],"px")}(r),e.modalRef&&(0,c.ariaHidden)(e.modalRef,!0),this.hideSiblingNodes&&(0,c.ariaHiddenSiblings)(r.container,e.mountNode,e.modalRef,!1),this.data.splice(n,1);else if(this.hideSiblingNodes){var o=r.modals[r.modals.length-1];o.modalRef&&(0,c.ariaHidden)(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}]),h);function h(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(this,h);var t=e.hideSiblingNodes,n=void 0===t||t,r=e.handleContainerOverflow,a=void 0===r||r;this.hideSiblingNodes=n,this.handleContainerOverflow=a,this.modals=[],this.data=[]}t.default=p},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=function(e){return(0,o.default)(e.replace(a,"ms-"))};var o=r(n(222)),a=/^-ms-/;e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ariaHidden=o,t.ariaHiddenSiblings=function(e,t,n,a){var i,l;i=e,l=[t,n],[].forEach.call(i.children,function(e){var t;-1===l.indexOf(e)&&1===(t=e).nodeType&&-1===r.indexOf(t.tagName.toLowerCase())&&function(e){o(e,a)}(e)})};var r=["template","script","style"];function o(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(233))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==l){var u=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),a.__suppressDeprecationWarning=o.__suppressDeprecationWarning=r.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1)),a=r(n(91)),i=r(n(94)),l=o.default.createElement("path",{d:"M7 10l5 5 5-5z"}),u=function(e){return o.default.createElement(i.default,e,l)};(u=(0,a.default)(u)).muiName="SvgIcon";var s=u;t.default=s},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=void 0;var o=r(n(243)),a=r(n(247)),i=(r(n(92)),r(n(93)),function(e){return(0,o.default)(function(e,t){return!(0,a.default)(e,t)})(e)});t.default=i},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=void 0;var o=r(n(245));t.default=function(e){return(0,o.default)("displayName",e)}},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=void 0;var o=r(n(246));t.default=function(e,t){return t+"("+(0,o.default)(e)+")"}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(249))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(1)),u=(r(n(3)),r(n(7)));n(8),t.default=function(e){var t,n=e.children,r=e.classes,s=e.className,c=e.disabled,d=e.IconComponent,f=e.inputRef,p=e.name,h=e.onChange,m=e.value,v=e.variant,y=(0,i.default)(e,["children","classes","className","disabled","IconComponent","inputRef","name","onChange","value","variant"]);return l.default.createElement("div",{className:r.root},l.default.createElement("select",(0,o.default)({className:(0,u.default)(r.select,(t={},(0,a.default)(t,r.filled,"filled"===v),(0,a.default)(t,r.outlined,"outlined"===v),(0,a.default)(t,r.disabled,c),t),s),name:p,disabled:c,onChange:h,value:m,ref:f},y),n),l.default.createElement(d,{className:r.icon}))}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(251))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.isElement=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":r(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===(void 0===e?"undefined":r(e))&&1===e.nodeType&&"string"==typeof e.nodeName}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(25))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1)),a=r(n(91)),i=r(n(94));t.default=function(e,t){var n=function(t){return o.default.createElement(i.default,t,e)};return n.displayName="".concat(t,"Icon"),(n=(0,a.default)(n)).muiName="SvgIcon",n}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(126))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(0),o=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 14 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7 1C3.14 1 0 4.14 0 8s3.14 7 7 7c.48 0 .94-.05 1.38-.14-.17-.08-.2-.73-.02-1.09.19-.41.81-1.45.2-1.8-.61-.35-.44-.5-.81-.91-.37-.41-.22-.47-.25-.58-.08-.34.36-.89.39-.94.02-.06.02-.27 0-.33 0-.08-.27-.22-.34-.23-.06 0-.11.11-.2.13-.09.02-.5-.25-.59-.33-.09-.08-.14-.23-.27-.34-.13-.13-.14-.03-.33-.11s-.8-.31-1.28-.48c-.48-.19-.52-.47-.52-.66-.02-.2-.3-.47-.42-.67-.14-.2-.16-.47-.2-.41-.04.06.25.78.2.81-.05.02-.16-.2-.3-.38-.14-.19.14-.09-.3-.95s.14-1.3.17-1.75c.03-.45.38.17.19-.13-.19-.3 0-.89-.14-1.11-.13-.22-.88.25-.88.25.02-.22.69-.58 1.16-.92.47-.34.78-.06 1.16.05.39.13.41.09.28-.05-.13-.13.06-.17.36-.13.28.05.38.41.83.36.47-.03.05.09.11.22s-.06.11-.38.3c-.3.2.02.22.55.61s.38-.25.31-.55c-.07-.3.39-.06.39-.06.33.22.27.02.5.08.23.06.91.64.91.64-.83.44-.31.48-.17.59.14.11-.28.3-.28.3-.17-.17-.19.02-.3.08-.11.06-.02.22-.02.22-.56.09-.44.69-.42.83 0 .14-.38.36-.47.58-.09.2.25.64.06.66-.19.03-.34-.66-1.31-.41-.3.08-.94.41-.59 1.08.36.69.92-.19 1.11-.09.19.1-.06.53-.02.55.04.02.53.02.56.61.03.59.77.53.92.55.17 0 .7-.44.77-.45.06-.03.38-.28 1.03.09.66.36.98.31 1.2.47.22.16.08.47.28.58.2.11 1.06-.03 1.28.31.22.34-.88 2.09-1.22 2.28-.34.19-.48.64-.84.92s-.81.64-1.27.91c-.41.23-.47.66-.66.8 3.14-.7 5.48-3.5 5.48-6.84 0-3.86-3.14-7-7-7L7 1zm1.64 6.56c-.09.03-.28.22-.78-.08-.48-.3-.81-.23-.86-.28 0 0-.05-.11.17-.14.44-.05.98.41 1.11.41.13 0 .19-.13.41-.05.22.08.05.13-.05.14zM6.34 1.7c-.05-.03.03-.08.09-.14.03-.03.02-.11.05-.14.11-.11.61-.25.52.03-.11.27-.58.3-.66.25zm1.23.89c-.19-.02-.58-.05-.52-.14.3-.28-.09-.38-.34-.38-.25-.02-.34-.16-.22-.19.12-.03.61.02.7.08.08.06.52.25.55.38.02.13 0 .25-.17.25zm1.47-.05c-.14.09-.83-.41-.95-.52-.56-.48-.89-.31-1-.41-.11-.1-.08-.19.11-.34.19-.15.69.06 1 .09.3.03.66.27.66.55.02.25.33.5.19.63h-.01z"}}]})(e)};o.displayName="GoGlobe"},function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(21),i=n(3),l=n.n(i),u=n(104),s=n.n(u),c=n(105),d=n.n(c),f=n(106),p=n.n(f),h=n(107),m=n.n(h),v=n(22),y=n.n(v),b=/chrome/gi.test(window.navigator.userAgent)?function(e){for(var t=e.cloneRange(),n=[],r=e.endContainer;null!=r;r=r.parentNode){var o=r===e.commonAncestorContainer;o?t.setStart(e.startContainer,e.startOffset):t.setStart(t.endContainer,0);var a,i=Array.from(t.getClientRects());if(n.push(i),o)return n.reverse(),(a=[]).concat.apply(a,n);t.setEndBefore(r)}m()(!1,"Found an unexpected detached subtree when getting range client rects.")}:function(e){return Array.from(e.getClientRects())};function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(w,r.Component),function(e,t,n){t&&k(e.prototype,t),n&&k(e,n)}(w,[{key:"render",value:function(){var e=this,t=this.props,n=t.selectionRef,r=t.measureRef,a=t.gap,i=t.scrollRef,l=t.placementStrategy,u=t.contentRect,s=t.windowHeight,c=t.windowWidth,d=t.children,f=t.className,p=this.state.selectionPosition,h="boolean"==typeof this.props.isOpen?this.props.isOpen:this.state.isOpen,m={};return null!==p&&null!=u.bounds.width&&0!==u.bounds.width&&((m=l({gap:a,frameWidth:c,frameHeight:s,frameLeft:0,frameTop:0,boxWidth:u.bounds.width,boxHeight:u.bounds.height,selectionTop:p.top,selectionLeft:p.left,selectionWidth:p.width,selectionHeight:p.height})).pointerEvents=!0===this.state.mousePressed?"none":"auto"),[o.a.createElement(y.a,{key:"update-position",target:document,onSelectionChange:this.updatePosition}),o.a.createElement(y.a,{key:"on-resize-window",target:window,onResize:this.updatePosition}),o.a.createElement(y.a,{key:"on-scroll",target:i&&i.current?i.current:window,onScroll:this.updatePosition}),o.a.createElement(y.a,{key:"on-mouse-up",target:n&&n.current?n.current:document.body,onMouseUp:function(){return e.setState({mousePressed:!1})}}),o.a.createElement(y.a,{key:"on-mouse-down",target:n&&n.current?n.current:document,onMouseDown:function(){return e.setState({mousePressed:!0})}}),null!=p&&h&&0!=u.bounds.width?o.a.createElement("div",{key:"popup",className:f,style:m,ref:r},d):null]}}]),w);function w(){var e,t,n;!function(e,t){if(!(e instanceof w))throw new TypeError("Cannot call a class as a function")}(this);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=n=g(this,(e=w.__proto__||Object.getPrototypeOf(w)).call.apply(e,[this].concat(o))),n.state={isPressed:!1,selectionPosition:null,isTextSelected:!1,isOpen:!1},n.updatePosition=function(){var e=document.getSelection(),t=n.props,r=t.onTextSelect,o=t.onTextUnselect,a=n.props.selectionRef&&n.props.selectionRef.current,i=function(e){var t=window.getSelection();if(!t.rangeCount)return null;var n=function(e){var t=b(e),n=0,r=0,o=0,a=0;if(t.length){if(1<t.length&&0===t[0].width){var i=t[1];n=i.top,r=i.right,o=i.bottom,a=i.left}else{var l=t[0];n=l.top,r=l.right,o=l.bottom,a=l.left}for(var u=1;u<t.length;u++){var s=t[u];0!==s.height&&0!==s.width&&(n=Math.min(n,s.top),r=Math.max(r,s.right),o=Math.max(o,s.bottom),a=Math.min(a,s.left))}}return{top:n,right:r,bottom:o,left:a,width:r-a,height:o-n}}(t.getRangeAt(0)),r=n.top,o=n.right,a=n.bottom,i=n.left;return 0===r&&0===o&&0===a&&0===i?null:n}();null!=i&&null!=a&&null!=e&&!0===a.contains(e.anchorNode)&&!0===a.contains(e.focusNode)?(!1===e.isCollapsed?(r&&r(),n.setState({isTextSelected:!0,isOpen:!0})):(o&&o(),n.setState({isTextSelected:!1,isOpen:!1})),n.setState({selectionPosition:i})):n.state.isTextSelected&&(o&&o(),n.setState({isTextSelected:!1,isOpen:!1}))},g(n,t)}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}x.defaultProps={selectionRef:{current:document.body},scrollRef:{current:window},placementStrategy:function(e){var t=e.gap,n=e.frameWidth,r=e.frameLeft,o=e.frameTop,a=e.boxHeight,i=e.boxWidth,l=e.selectionTop,u=e.selectionLeft,s=e.selectionWidth,c=e.selectionHeight,d={position:"fixed"};return d.left=u+s/2-i/2,d.top=l-a-t,d.left<r?d.left=r:d.left+i>n&&(d.left=n-i),d.top<o&&(d.top=l+c+t),d},gap:5},x.propTypes={containerNode:l.a.instanceOf(Element),measure:l.a.func.isRequired,selectionRef:l.a.shape({current:l.a.instanceOf(Element)}),scrollRef:l.a.shape({current:l.a.oneOfType([l.a.instanceOf(Element),l.a.instanceOf(window.constructor)])}),children:l.a.node.isRequired,onTextSelect:l.a.func,onTextUnselect:l.a.func,windowWidth:l.a.number,windowHeight:l.a.number,className:l.a.string,placementStrategy:l.a.func,measureRef:l.a.func.isRequired,contentRect:l.a.object.isRequired,gap:l.a.number,isOpen:l.a.bool};var _,E=(_=s()("bounds","offset")(p()({take:function(){return{windowWidth:window.innerWidth,windowHeight:window.innerHeight}},debounce:function(e){return d()(e,120)}})(x)),function(e){var t=e.children,n=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children"]);return Object(a.createPortal)(o.a.createElement(_,n,o.a.createElement(r.Fragment,null,t)),n.containerNode||document.body)});t.a=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e},a=n(1),i=(d(a),d(n(3))),l=d(n(187)),u=d(n(188)),s=d(n(189));function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.default=function(e){return function(t){var n,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(d,a.Component),o(d,[{key:"componentWillMount",value:function(){this._resizeObserver=new l.default(this.measure)}},{key:"componentWillUnmount",value:function(){this._resizeObserver&&this._node&&this._resizeObserver.disconnect(this._node),this._resizeObserver=null}},{key:"render",value:function(){var e=this.props,n=(e.innerRef,e.onResize,function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["innerRef","onResize"]));return(0,a.createElement)(t,r({},n,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))}}]),c=n=d,n.propTypes={client:i.default.bool,offset:i.default.bool,scroll:i.default.bool,bounds:i.default.bool,margin:i.default.bool,innerRef:i.default.func,onResize:i.default.func},c;function d(){var t,n,r;!function(e,t){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=f(this,(t=d.__proto__||Object.getPrototypeOf(d)).call.apply(t,[this].concat(a))),r.state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},r.measure=function(t){var n=(0,s.default)(r._node,e||(0,u.default)(r.props));t&&(n.entry=t[0].contentRect),r.setState({contentRect:n}),"function"==typeof r.props.onResize&&r.props.onResize(n)},r._handleRef=function(e){r._resizeObserver&&(e?r._resizeObserver.observe(e):r._resizeObserver.disconnect(r._node)),r._node=e,"function"==typeof r.props.innerRef&&r.props.innerRef(e)},f(r,n)}}}},function(e,t,n){(function(t){function n(){return c.Date.now()}var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,c=u||s||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min;function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==d.call(t))return NaN;var t;if(h(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=h(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var u=a.test(e);return u||i.test(e)?l(e.slice(2),u?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,r){var o,a,i,l,u,s,c=0,d=!1,v=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=o,r=a;return o=a=void 0,c=t,l=e.apply(r,n)}function g(e){var n=e-s;return void 0===s||t<=n||n<0||v&&i<=e-c}function x(){var e,r=n();if(g(r))return w(r);u=setTimeout(x,(e=t-(r-s),v?p(e,i-(r-c)):e))}function w(e){return u=void 0,y&&o?b(e):(o=a=void 0,l)}function k(){var e,r=n(),i=g(r);if(o=arguments,a=this,s=r,i){if(void 0===u)return c=e=s,u=setTimeout(x,t),d?b(e):l;if(v)return u=setTimeout(x,t),b(s)}return void 0===u&&(u=setTimeout(x,t)),l}return t=m(t)||0,h(r)&&(d=!!r.leading,i=(v="maxWait"in r)?f(m(r.maxWait)||0,t):i,y="trailing"in r?!!r.trailing:y),k.cancel=function(){void 0!==u&&clearTimeout(u),o=s=a=u=void(c=0)},k.flush=function(){return void 0===u?l:w(n())},k}}).call(this,n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(190))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,a,i,l],c=0;(u=new Error(t.replace(/%s/g,function(){return s[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(191))},function(e,t,n){"use strict";var r=n(268),o=n(59),a=n(272),i=n(273),l=n(274);function u(e,t){return t.encode?t.strict?a(e):encodeURIComponent(e):e}function s(e,t){return t.decode?i(e):e}function c(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){var n=function(e){var n;switch((t=Object.assign({decode:!0,arrayFormat:"none"},t)).arrayFormat){case"index":return function(e,t,r){n=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),n?(void 0===r[e]&&(r[e]={}),r[e][n[1]]=t):r[e]=t};case"bracket":return function(e,t,r){n=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),n?void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=[t]:r[e]=t};case"comma":return function(e,t,n){var r="string"==typeof t&&-1<t.split("").indexOf(",")?t.split(","):t;n[e]=r};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(),o=Object.create(null);if("string"!=typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;var a=!0,i=!1,u=void 0;try{for(var c,d=e.split("&")[Symbol.iterator]();!(a=(c=d.next()).done);a=!0){var f=c.value,p=l(f.replace(/\+/g," "),"="),h=r(p,2),m=h[0],v=h[1];v=void 0===v?null:s(v,t),n(s(m,t),v,o)}}catch(e){i=!0,u=e}finally{try{a||null==d.return||d.return()}finally{if(i)throw u}}return Object.keys(o).sort().reduce(function(e,t){var n=o[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort(function(e,t){return Number(e)-Number(t)}).map(function(e){return t[e]}):t}(n):e[t]=n,e},Object.create(null))}t.extract=c,t.parse=d,t.stringify=function(e,t){if(!e)return"";var n=function(e){switch(e.arrayFormat){case"index":return function(t){return function(n,r){var a=n.length;return void 0===r?n:[].concat(o(n),null===r?[[u(t,e),"[",a,"]"].join("")]:[[u(t,e),"[",u(a,e),"]=",u(r,e)].join("")])}};case"bracket":return function(t){return function(n,r){return void 0===r?n:[].concat(o(n),null===r?[[u(t,e),"[]"].join("")]:[[u(t,e),"[]=",u(r,e)].join("")])}};case"comma":return function(t){return function(n,r,o){return r?0===o?[[u(t,e),"=",u(r,e)].join("")]:[[n,u(r,e)].join(",")]:n}};default:return function(t){return function(n,r){return void 0===r?n:[].concat(o(n),null===r?[u(t,e)]:[[u(t,e),"=",u(r,e)].join("")])}}}}(t=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},t)),r=Object.keys(e);return!1!==t.sort&&r.sort(t.sort),r.map(function(r){var o=e[r];return void 0===o?"":null===o?u(r,t):Array.isArray(o)?o.reduce(n(r),[]).join("&"):u(r,t)+"="+u(o,t)}).filter(function(e){return 0<e.length}).join("&")},t.parseUrl=function(e,t){var n=e.indexOf("#");return-1!==n&&(e=e.slice(0,n)),{url:e.split("?")[0]||"",query:d(c(e),t)}}},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden"},container:{height:"100%",outline:"none"},paper:{display:"flex",flexDirection:"column",margin:48,position:"relative",overflowY:"auto"},paperScrollPaper:{flex:"0 1 auto",maxHeight:"calc(100% - 96px)"},paperScrollBody:{margin:"48px auto"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,360),"&$paperScrollBody":(0,f.default)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,360)+96),{margin:48})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":(0,f.default)({},e.breakpoints.down(e.breakpoints.values.sm+96),{margin:48})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":(0,f.default)({},e.breakpoints.down(e.breakpoints.values.md+96),{margin:48})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":(0,f.default)({},e.breakpoints.down(e.breakpoints.values.lg+96),{margin:48})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":(0,f.default)({},e.breakpoints.down(e.breakpoints.values.xl+96),{margin:48})},paperFullWidth:{width:"100%"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(9)),p=r(n(1)),h=(r(n(3)),r(n(7))),m=(n(8),r(n(6))),v=n(23),y=r(n(84)),b=r(n(88)),g=n(36),x=r(n(61));t.styles=o;var w,k=(w=p.default.Component,(0,d.default)(_,w),(0,u.default)(_,[{key:"render",value:function(){var e,t=this.props,n=t.BackdropProps,r=t.children,o=t.classes,l=t.className,u=t.disableBackdropClick,s=t.disableEscapeKeyDown,c=t.fullScreen,d=t.fullWidth,m=t.maxWidth,b=t.onBackdropClick,g=t.onClose,x=t.onEnter,w=t.onEntered,k=t.onEntering,_=t.onEscapeKeyDown,E=t.onExit,S=t.onExited,C=t.onExiting,O=t.open,P=t.PaperComponent,T=t.PaperProps,M=void 0===T?{}:T,j=t.scroll,R=t.TransitionComponent,N=t.transitionDuration,D=t.TransitionProps,I=(0,i.default)(t,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"]);return p.default.createElement(y.default,(0,a.default)({className:(0,h.default)(o.root,l),BackdropProps:(0,a.default)({transitionDuration:N},n),closeAfterTransition:!0,disableBackdropClick:u,disableEscapeKeyDown:s,onBackdropClick:b,onEscapeKeyDown:_,onClose:g,open:O,role:"dialog"},I),p.default.createElement(R,(0,a.default)({appear:!0,in:O,timeout:N,onEnter:x,onEntering:k,onEntered:w,onExit:E,onExiting:C,onExited:S},D),p.default.createElement("div",{className:(0,h.default)(o.container,o["scroll".concat((0,v.capitalize)(j))]),onClick:this.handleBackdropClick,onMouseDown:this.handleMouseDown,role:"document"},p.default.createElement(P,(0,a.default)({elevation:24},M,{className:(0,h.default)(o.paper,o["paperScroll".concat((0,v.capitalize)(j))],(e={},(0,f.default)(e,o["paperWidth".concat(m?(0,v.capitalize)(m):"")],m),(0,f.default)(e,o.paperFullScreen,c),(0,f.default)(e,o.paperFullWidth,d),e),M.className)}),r))))}}]),_);function _(){var e,t;(0,l.default)(this,_);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,s.default)(this,(e=(0,c.default)(_)).call.apply(e,[this].concat(r)))).handleMouseDown=function(e){t.mouseDownTarget=e.target},t.handleBackdropClick=function(e){e.target===e.currentTarget&&e.target===t.mouseDownTarget&&(t.mouseDownTarget=null,t.props.onBackdropClick&&t.props.onBackdropClick(e),!t.props.disableBackdropClick&&t.props.onClose&&t.props.onClose(e,"backdropClick"))},t}k.defaultProps={disableBackdropClick:!1,disableEscapeKeyDown:!1,fullScreen:!1,fullWidth:!1,maxWidth:"sm",PaperComponent:x.default,scroll:"paper",TransitionComponent:b.default,transitionDuration:{enter:g.duration.enteringScreen,exit:g.duration.leavingScreen}};var E=(0,m.default)(o,{name:"MuiDialog"})(k);t.default=E},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(1)),l=(r(n(3)),r(n(7))),u=r(n(6)),s=r(n(62)),c={root:{margin:0,padding:"24px 24px 20px",flex:"0 0 auto"}};function d(e){var t=e.children,n=e.classes,r=e.className,u=e.disableTypography,c=(0,a.default)(e,["children","classes","className","disableTypography"]);return i.default.createElement("div",(0,o.default)({className:(0,l.default)(n.root,r)},c),u?t:i.default.createElement(s.default,{variant:"title",internalDeprecatedVariant:!0},t))}t.styles=c,d.defaultProps={disableTypography:!1};var f=(0,u.default)(c,{name:"MuiDialogTitle"})(d);t.default=f},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(1)),l=(r(n(3)),r(n(7))),u=r(n(6)),s={root:{flex:"1 1 auto",overflowY:"auto",WebkitOverflowScrolling:"touch",padding:"0 24px 24px","&:first-child":{paddingTop:24}}};t.styles=s;var c=(0,u.default)(s,{name:"MuiDialogContent"})(function(e){var t=e.classes,n=e.children,r=e.className,u=(0,a.default)(e,["classes","children","className"]);return i.default.createElement("div",(0,o.default)({className:(0,l.default)(t.root,r)},u),n)});t.default=c},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(1)),i=(r(n(3)),r(n(6))),l=r(n(62)),u={root:{lineHeight:1.5}};t.styles=u;var s=(0,i.default)(u,{name:"MuiDialogContentText"})(function(e){return a.default.createElement(l.default,(0,o.default)({component:"p",internalDeprecatedVariant:!0,variant:"subheading",color:"textSecondary"},e))});t.default=s},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(1)),l=(r(n(3)),r(n(7))),u=r(n(6)),s=n(32);n(98);var c={root:{display:"flex",alignItems:"center",justifyContent:"flex-end",flex:"0 0 auto",margin:"8px 4px"},action:{margin:"0 4px"}};function d(e){var t=e.disableActionSpacing,n=e.children,r=e.classes,u=e.className,c=(0,a.default)(e,["disableActionSpacing","children","classes","className"]);return i.default.createElement("div",(0,o.default)({className:(0,l.default)(r.root,u)},c),t?n:(0,s.cloneChildrenWithClassName)(n,r.action))}t.styles=c,d.defaultProps={disableActionSpacing:!1};var f=(0,u.default)(c,{name:"MuiDialogActions"})(d);t.default=f},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(276))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(283))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1)),a=(0,r(n(99)).default)(o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),"Close");t.default=a},function(e,t,n){(function(t){var n=t&&t.pid?t.pid.toString(36):"";function r(){var e=Date.now(),t=r.last||e;return r.last=t<e?e:t+1}e.exports=e.exports.default=function(e){return(e||"")+""+n+r().toString(36)},e.exports.process=function(e){return(e||"")+n+r().toString(36)},e.exports.time=function(e){return(e||"")+r().toString(36)}}).call(this,n(284))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1)),a=(0,r(n(99)).default)(o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),o.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),"Delete");t.default=a},,function(e,t,n){"use strict";var r=n(66),o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,a,i,l){if(!e){if((e=void 0)===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,void 0,void 0,void 0,void 0,void 0],s=0;(e=Error(t.replace(/%s/g,function(){return u[s++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x={};function w(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||g}function k(){}function _(e,t,n){this.props=e,this.context=t,this.refs=x,this.updater=n||g}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b("85"),this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var E=_.prototype=new k;E.constructor=_,r(E,w.prototype),E.isPureReactComponent=!0;var S={current:null},C={current:null},O=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r=void 0,o={},i=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)O.call(t,r)&&!P.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:a,type:e,key:i,ref:l,props:o,_owner:C.current}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var j=/\/+/g,R=[];function N(e,t,n,r){if(R.length){var o=R.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,R.length<10&&R.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case i:u=!0}}if(u)return r(o,t,""===n?"."+A(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var c=n+A(l=t[s],s);u+=e(l,c,r,o)}else if("function"==typeof(c=null===t||"object"!=typeof t?null:"function"==typeof(c=y&&t[y]||t["@@iterator"])?c:null))for(t=c.call(t),s=0;!(l=t.next()).done;)u+=e(l=l.value,c=n+A(l,s++),r,o);else"object"===l&&b("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return u}(e,"",t,n)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function F(e,t){e.func.call(e.context,t,e.count++)}function z(e,t,n){var r,o,i=e.result,l=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?L(e,i,n,function(e){return e}):null!=e&&(M(e)&&(o=l+(!(r=e).key||t&&t.key===e.key?"":(""+e.key).replace(j,"$&/")+"/")+n,e={$$typeof:a,type:r.type,key:o,ref:r.ref,props:r.props,_owner:r._owner}),i.push(e))}function L(e,t,n,r,o){var a="";null!=n&&(a=(""+n).replace(j,"$&/")+"/"),I(e,z,t=N(t,a,r,o)),D(t)}function U(){var e=S.current;return null===e&&b("321"),e}var W={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return L(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;I(e,F,t=N(null,null,t,n)),D(t)},count:function(e){return I(e,function(){return null},null)},toArray:function(e){var t=[];return L(e,t,null,function(e){return e}),t},only:function(e){return M(e)||b("143"),e}},createRef:function(){return{current:null}},Component:w,PureComponent:_,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:p,render:e}},lazy:function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return U().useCallback(e,t)},useContext:function(e,t){return U().useContext(e,t)},useEffect:function(e,t){return U().useEffect(e,t)},useImperativeHandle:function(e,t,n){return U().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return U().useLayoutEffect(e,t)},useMemo:function(e,t){return U().useMemo(e,t)},useReducer:function(e,t,n){return U().useReducer(e,t,n)},useRef:function(e){return U().useRef(e)},useState:function(e){return U().useState(e)},Fragment:l,StrictMode:u,Suspense:h,createElement:T,cloneElement:function(e,t,n){null==e&&b("267",e);var o=void 0,i=r({},e.props),l=e.key,u=e.ref,s=e._owner;if(null!=t){void 0!==t.ref&&(u=t.ref,s=C.current),void 0!==t.key&&(l=""+t.key);var c=void 0;for(o in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)O.call(t,o)&&!P.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==c?c[o]:t[o])}if(1==(o=arguments.length-2))i.children=n;else if(1<o){c=Array(o);for(var d=0;d<o;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:a,type:e.type,key:l,ref:u,props:i,_owner:s}},createFactory:function(e){var t=T.bind(null,e);return t.type=e,t},isValidElement:M,version:"16.8.6",unstable_ConcurrentMode:f,unstable_Profiler:s,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:S,ReactCurrentOwner:C,assign:r}};e.exports=W.default||W},function(e,t,n){"use strict";var r=n(1),o=n(66),a=n(123);function i(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,a,i,l){if(!e){if((e=void 0)===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,void 0,void 0,void 0,void 0,void 0],s=0;(e=Error(t.replace(/%s/g,function(){return u[s++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}r||i("227");var l=!1,u=null,s=!1,c=null,d={onError:function(e){l=!0,u=e}},f=null,p={};function h(){if(f)for(var e in p){var t=p[e],n=f.indexOf(e);if(-1<n||i("96",e),!v[n])for(var r in t.extractEvents||i("97",e),n=(v[n]=t).eventTypes){var o=void 0,a=n[r],l=t,u=r;y.hasOwnProperty(u)&&i("99",u);var s=(y[u]=a).phasedRegistrationNames;if(s){for(o in s)s.hasOwnProperty(o)&&m(s[o],l,u);o=!0}else o=!!a.registrationName&&(m(a.registrationName,l,u),!0);o||i("98",r,e)}}}function m(e,t,n){b[e]&&i("100",e),b[e]=t,g[e]=t.eventTypes[n].dependencies}var v=[],y={},b={},g={},x=null,w=null,k=null;function _(e,t,n){var r=e.type||"unknown-event";e.currentTarget=k(n),function(e,t,n,r,o,a,f,p,h){if(function(e,t,n,r,o,a,i,s,c){l=!1,u=null,function(e,t,n,r,o,a,i,l,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}.apply(d,arguments)}.apply(this,arguments),l){if(l){var m=u;l=!1,u=null}else i("198"),m=void 0;s||(s=!0,c=m)}}(r,t,void 0,e),e.currentTarget=null}function E(e,t){return null==t&&i("30"),null==e?t:Array.isArray(e)?(Array.isArray(t)?e.push.apply(e,t):e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function S(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var C=null;function O(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)_(e,t[r],n[r]);else t&&_(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var P={injectEventPluginOrder:function(e){f&&i("101"),f=Array.prototype.slice.call(e),h()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];p.hasOwnProperty(t)&&p[t]===r||(p[t]&&i("102",t),p[t]=r,n=!0)}n&&h()}};function T(e,t){var n=e.stateNode;if(!n)return null;var r=x(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&i("231",t,typeof n),n)}function M(e){if(null!==e&&(C=E(C,e)),e=C,C=null,e&&(S(e,O),C&&i("95"),s))throw e=c,s=!1,c=null,e}var j=Math.random().toString(36).slice(2),R="__reactInternalInstance$"+j,N="__reactEventHandlers$"+j;function D(e){if(e[R])return e[R];for(;!e[R];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[R]).tag||6===e.tag?e:null}function I(e){return!(e=e[R])||5!==e.tag&&6!==e.tag?null:e}function A(e){if(5===e.tag||6===e.tag)return e.stateNode;i("33")}function F(e){return e[N]||null}function z(e){for(;(e=e.return)&&5!==e.tag;);return e||null}function L(e,t,n){(t=T(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=E(n._dispatchListeners,t),n._dispatchInstances=E(n._dispatchInstances,e))}function U(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=z(t);for(t=n.length;0<t--;)L(n[t],"captured",e);for(t=0;t<n.length;t++)L(n[t],"bubbled",e)}}function W(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=T(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=E(n._dispatchListeners,t),n._dispatchInstances=E(n._dispatchInstances,e))}function B(e){e&&e.dispatchConfig.registrationName&&W(e._targetInst,null,e)}function V(e){S(e,U)}var H=!("undefined"==typeof window||!window.document||!window.document.createElement);function $(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var q={animationend:$("Animation","AnimationEnd"),animationiteration:$("Animation","AnimationIteration"),animationstart:$("Animation","AnimationStart"),transitionend:$("Transition","TransitionEnd")},K={},G={};function Y(e){if(K[e])return K[e];if(!q[e])return e;var t,n=q[e];for(t in n)if(n.hasOwnProperty(t)&&t in G)return K[e]=n[t];return e}H&&(G=document.createElement("div").style,"AnimationEvent"in window||(delete q.animationend.animation,delete q.animationiteration.animation,delete q.animationstart.animation),"TransitionEvent"in window||delete q.transitionend.transition);var X=Y("animationend"),Q=Y("animationiteration"),J=Y("animationstart"),Z=Y("transitionend"),ee="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),te=null,ne=null,re=null;function oe(){if(re)return re;var e,t,n=ne,r=n.length,o="value"in te?te.value:te.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return re=o.slice(e,1<t?1-t:void 0)}function ae(){return!0}function ie(){return!1}function le(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?ae:ie,this.isPropagationStopped=ie,this}function ue(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function se(e){e instanceof this||i("279"),e.destructor(),this.eventPool.length<10&&this.eventPool.push(e)}function ce(e){e.eventPool=[],e.getPooled=ue,e.release=se}o(le.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:ie,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ie,this._dispatchInstances=this._dispatchListeners=null}}),le.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},le.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var a=new t;return o(a,n.prototype),((n.prototype=a).constructor=n).Interface=o({},r.Interface,e),n.extend=r.extend,ce(n),n},ce(le);var de=le.extend({data:null}),fe=le.extend({data:null}),pe=[9,13,27,32],he=H&&"CompositionEvent"in window,me=null;H&&"documentMode"in document&&(me=document.documentMode);var ve=H&&"TextEvent"in window&&!me,ye=H&&(!he||me&&8<me&&me<=11),be=String.fromCharCode(32),ge={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function we(e,t){switch(e){case"keyup":return-1!==pe.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var _e=!1,Ee={eventTypes:ge,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(he)e:{switch(e){case"compositionstart":o=ge.compositionStart;break e;case"compositionend":o=ge.compositionEnd;break e;case"compositionupdate":o=ge.compositionUpdate;break e}o=void 0}else _e?we(e,n)&&(o=ge.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=ge.compositionStart);return a=o?(ye&&"ko"!==n.locale&&(_e||o!==ge.compositionStart?o===ge.compositionEnd&&_e&&(a=oe()):(ne="value"in(te=r)?te.value:te.textContent,_e=!0)),o=de.getPooled(o,t,n,r),a?o.data=a:null!==(a=ke(n))&&(o.data=a),V(o),o):null,(e=ve?function(e,t){switch(e){case"compositionend":return ke(t);case"keypress":return 32!==t.which?null:(xe=!0,be);case"textInput":return(e=t.data)===be&&xe?null:e;default:return null}}(e,n):function(e,t){if(_e)return"compositionend"===e||!he&&we(e,t)?(e=oe(),re=ne=te=null,_e=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ye&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=fe.getPooled(ge.beforeInput,t,n,r)).data=e,V(t)):t=null,null===a?t:null===t?a:[a,t]}},Se=null,Ce=null,Oe=null;function Pe(e){if(e=w(e)){"function"!=typeof Se&&i("280");var t=x(e.stateNode);Se(e.stateNode,e.type,t)}}function Te(e){Ce?Oe?Oe.push(e):Oe=[e]:Ce=e}function Me(){if(Ce){var e=Ce,t=Oe;if(Oe=Ce=null,Pe(e),t)for(e=0;e<t.length;e++)Pe(t[e])}}function je(e,t){return e(t)}function Re(e,t,n){return e(t,n)}function Ne(){}var De=!1;function Ie(e,t){if(De)return e(t);De=!0;try{return je(e,t)}finally{De=!1,(null!==Ce||null!==Oe)&&(Ne(),Me())}}var Ae={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ae[e.type]:"textarea"===t}function ze(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Le(e){if(!H)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}function Ue(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function We(e){e._valueTracker||(e._valueTracker=function(e){var t=Ue(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Be(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ue(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var Ve=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ve.hasOwnProperty("ReactCurrentDispatcher")||(Ve.ReactCurrentDispatcher={current:null});var He=/^(.*)[\\\/]/,$e="function"==typeof Symbol&&Symbol.for,qe=$e?Symbol.for("react.element"):60103,Ke=$e?Symbol.for("react.portal"):60106,Ge=$e?Symbol.for("react.fragment"):60107,Ye=$e?Symbol.for("react.strict_mode"):60108,Xe=$e?Symbol.for("react.profiler"):60114,Qe=$e?Symbol.for("react.provider"):60109,Je=$e?Symbol.for("react.context"):60110,Ze=$e?Symbol.for("react.concurrent_mode"):60111,et=$e?Symbol.for("react.forward_ref"):60112,tt=$e?Symbol.for("react.suspense"):60113,nt=$e?Symbol.for("react.memo"):60115,rt=$e?Symbol.for("react.lazy"):60116,ot="function"==typeof Symbol&&Symbol.iterator;function at(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=ot&&e[ot]||e["@@iterator"])?e:null}function it(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ze:return"ConcurrentMode";case Ge:return"Fragment";case Ke:return"Portal";case Xe:return"Profiler";case Ye:return"StrictMode";case tt:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case Je:return"Context.Consumer";case Qe:return"Context.Provider";case et:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case nt:return it(e.type);case rt:if(e=1===e._status?e._result:null)return it(e)}return null}function lt(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,a=it(e.type);n=null,r&&(n=it(r.type)),r=a,a="",o?a=" (at "+o.fileName.replace(He,"")+":"+o.lineNumber+")":n&&(a=" (created by "+n+")"),n="\n in "+(r||"Unknown")+a}t+=n,e=e.return}while(e);return t}var ut=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,st=Object.prototype.hasOwnProperty,ct={},dt={};function ft(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new ft(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new ft(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new ft(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new ft(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pt[e]=new ft(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new ft(e,3,!0,e,null)}),["capture","download"].forEach(function(e){pt[e]=new ft(e,4,!1,e,null)}),["cols","rows","size","span"].forEach(function(e){pt[e]=new ft(e,6,!1,e,null)}),["rowSpan","start"].forEach(function(e){pt[e]=new ft(e,5,!1,e.toLowerCase(),null)});var ht=/[\-:]([a-z])/g;function mt(e){return e[1].toUpperCase()}function vt(e,t,n,r){var o,a=pt.hasOwnProperty(t)?pt[t]:null;(null!==a?0===a.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,n,r,o){if(null==n||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(t,n,r,o))return!0;if(o)return!1;if(null!==r)switch(r.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||n<1}return!1}(0,n,a,r)&&(n=null),r||null===a?(o=t,(st.call(dt,o)||!st.call(ct,o)&&(ut.test(o)?dt[o]=!0:!(ct[o]=!0)))&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n))):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function yt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function bt(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function gt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=yt(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function xt(e,t){null!=(t=t.checked)&&vt(e,"checked",t,!1)}function wt(e,t){xt(e,t);var n=yt(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?_t(e,t.type,n):t.hasOwnProperty("defaultValue")&&_t(e,t.type,yt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function kt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function _t(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ht,mt);pt[t]=new ft(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ht,mt);pt[t]=new ft(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ht,mt);pt[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new ft(e,1,!1,e.toLowerCase(),null)});var Et={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function St(e,t,n){return(e=le.getPooled(Et.change,e,t,n)).type="change",Te(n),V(e),e}var Ct=null,Ot=null;function Pt(e){M(e)}function Tt(e){if(Be(A(e)))return e}function Mt(e,t){if("change"===e)return t}var jt=!1;function Rt(){Ct&&(Ct.detachEvent("onpropertychange",Nt),Ot=Ct=null)}function Nt(e){"value"===e.propertyName&&Tt(Ot)&&Ie(Pt,e=St(Ot,e,ze(e)))}function Dt(e,t,n){"focus"===e?(Rt(),Ot=n,(Ct=t).attachEvent("onpropertychange",Nt)):"blur"===e&&Rt()}function It(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Tt(Ot)}function At(e,t){if("click"===e)return Tt(t)}function Ft(e,t){if("input"===e||"change"===e)return Tt(t)}H&&(jt=Le("input")&&(!document.documentMode||9<document.documentMode));var zt={eventTypes:Et,_isInputEventSupported:jt,extractEvents:function(e,t,n,r){var o=t?A(t):window,a=void 0,i=void 0,l=o.nodeName&&o.nodeName.toLowerCase();if("select"===l||"input"===l&&"file"===o.type?a=Mt:Fe(o)?jt?a=Ft:(a=It,i=Dt):(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=At),a&&(a=a(e,t)))return St(a,n,r);i&&i(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&_t(o,"number",o.value)}},Lt=le.extend({view:null,detail:null}),Ut={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ut[e])&&!!t[e]}function Bt(){return Wt}var Vt=0,Ht=0,$t=!1,qt=!1,Kt=Lt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Bt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Vt;return Vt=e.screenX,$t?"mousemove"===e.type?e.screenX-t:0:($t=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ht;return Ht=e.screenY,qt?"mousemove"===e.type?e.screenY-t:0:(qt=!0,0)}}),Gt=Kt.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Yt={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Xt={eventTypes:Yt,extractEvents:function(e,t,n,r){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a?(a=t,t=(t=n.relatedTarget||n.toElement)?D(t):null):a=null,a===t)return null;var i=void 0,l=void 0,u=void 0,s=void 0;"mouseout"===e||"mouseover"===e?(i=Kt,l=Yt.mouseLeave,u=Yt.mouseEnter,s="mouse"):"pointerout"!==e&&"pointerover"!==e||(i=Gt,l=Yt.pointerLeave,u=Yt.pointerEnter,s="pointer");var c=null==a?o:A(a);if(o=null==t?o:A(t),(e=i.getPooled(l,a,n,r)).type=s+"leave",e.target=c,e.relatedTarget=o,(n=i.getPooled(u,t,n,r)).type=s+"enter",n.target=o,n.relatedTarget=c,r=t,a&&r)e:{for(o=r,s=0,i=t=a;i;i=z(i))s++;for(i=0,u=o;u;u=z(u))i++;for(;0<s-i;)t=z(t),s--;for(;0<i-s;)o=z(o),i--;for(;s--;){if(t===o||t===o.alternate)break e;t=z(t),o=z(o)}t=null}else t=null;for(o=t,t=[];a&&a!==o&&(null===(s=a.alternate)||s!==o);)t.push(a),a=z(a);for(a=[];r&&r!==o&&(null===(s=r.alternate)||s!==o);)a.push(r),r=z(r);for(r=0;r<t.length;r++)W(t[r],"bubbled",e);for(r=a.length;0<r--;)W(a[r],"captured",n);return[e,n]}};function Qt(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var Jt=Object.prototype.hasOwnProperty;function Zt(e,t){if(Qt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Jt.call(t,n[r])||!Qt(e[n[r]],t[n[r]]))return!1;return!0}function en(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function tn(e){2!==en(e)&&i("188")}function nn(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=en(e))&&i("188"),1===t?null:e;for(var n=e,r=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var l=o.child;l;){if(l===n)return tn(o),e;if(l===r)return tn(o),t;l=l.sibling}i("188")}if(n.return!==r.return)n=o,r=a;else{l=!1;for(var u=o.child;u;){if(u===n){l=!0,n=o,r=a;break}if(u===r){l=!0,r=o,n=a;break}u=u.sibling}if(!l){for(u=a.child;u;){if(u===n){l=!0,n=a,r=o;break}if(u===r){l=!0,r=a,n=o;break}u=u.sibling}l||i("189")}}n.alternate!==r&&i("190")}return 3!==n.tag&&i("188"),n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t=(t.child.return=t).child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var rn=le.extend({animationName:null,elapsedTime:null,pseudoElement:null}),on=le.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),an=Lt.extend({relatedTarget:null});function ln(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var un={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cn=Lt.extend({key:function(e){if(e.key){var t=un[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ln(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?sn[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Bt,charCode:function(e){return"keypress"===e.type?ln(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ln(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),dn=Kt.extend({dataTransfer:null}),fn=Lt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Bt}),pn=le.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),hn=Kt.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),mn=[["abort","abort"],[X,"animationEnd"],[Q,"animationIteration"],[J,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[Z,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],vn={},yn={};function bn(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},vn[e]=t,yn[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){bn(e,!0)}),mn.forEach(function(e){bn(e,!1)});var gn={eventTypes:vn,isInteractiveTopLevelEventType:function(e){return void 0!==(e=yn[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var o=yn[e];if(!o)return null;switch(e){case"keypress":if(0===ln(n))return null;case"keydown":case"keyup":e=cn;break;case"blur":case"focus":e=an;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Kt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=dn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=fn;break;case X:case Q:case J:e=rn;break;case Z:e=pn;break;case"scroll":e=Lt;break;case"wheel":e=hn;break;case"copy":case"cut":case"paste":e=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Gt;break;default:e=le}return V(t=e.getPooled(o,t,n,r)),t}},xn=gn.isInteractiveTopLevelEventType,wn=[];function kn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=3!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=D(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=ze(e.nativeEvent);r=e.topLevelType;for(var a=e.nativeEvent,i=null,l=0;l<v.length;l++){var u=v[l];u&&(u=u.extractEvents(r,t,a,o))&&(i=E(i,u))}M(i)}}var _n=!0;function En(e,t){if(!t)return null;var n=(xn(e)?Cn:On).bind(null,e);t.addEventListener(e,n,!1)}function Sn(e,t){if(!t)return null;var n=(xn(e)?Cn:On).bind(null,e);t.addEventListener(e,n,!0)}function Cn(e,t){Re(On,e,t)}function On(e,t){if(_n){var n=ze(t);if(null===(n=D(n))||"number"!=typeof n.tag||2===en(n)||(n=null),wn.length){var r=wn.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Ie(kn,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,wn.length<10&&wn.push(e)}}}var Pn={},Tn=0,Mn="_reactListenersID"+(""+Math.random()).slice(2);function jn(e){return Object.prototype.hasOwnProperty.call(e,Mn)||(e[Mn]=Tn++,Pn[e[Mn]]={}),Pn[e[Mn]]}function Rn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Nn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dn(e,t){var n,r=Nn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&t<=n)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Nn(r)}}function In(){for(var e=window,t=Rn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Rn((e=t.contentWindow).document)}return t}function An(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Fn=H&&"documentMode"in document&&document.documentMode<=11,zn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ln=null,Un=null,Wn=null,Bn=!1;function Vn(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Bn||null==Ln||Ln!==Rn(n)?null:(n="selectionStart"in(n=Ln)&&An(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Wn&&Zt(Wn,n)?null:(Wn=n,(e=le.getPooled(zn.select,Un,e,t)).type="select",e.target=Ln,V(e),e))}var Hn={eventTypes:zn,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=jn(a),o=g.onSelect;for(var i=0;i<o.length;i++){var l=o[i];if(!a.hasOwnProperty(l)||!a[l]){a=!1;break e}}a=!0}o=!a}if(o)return null;switch(a=t?A(t):window,e){case"focus":(Fe(a)||"true"===a.contentEditable)&&(Ln=a,Un=t,Wn=null);break;case"blur":Wn=Un=Ln=null;break;case"mousedown":Bn=!0;break;case"contextmenu":case"mouseup":case"dragend":return Bn=!1,Vn(n,r);case"selectionchange":if(Fn)break;case"keydown":case"keyup":return Vn(n,r)}return null}};function $n(e,t){return e=o({children:void 0},t),n=t.children,a="",r.Children.forEach(n,function(e){null!=e&&(a+=e)}),(t=a)&&(e.children=t),e;var n,a}function qn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+yt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Kn(e,t){return null!=t.dangerouslySetInnerHTML&&i("91"),o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gn(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&i("92"),Array.isArray(t)&&(t.length<=1||i("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:yt(n)}}function Yn(e,t){var n=yt(t.value),r=yt(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Xn(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}P.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x=F,w=I,k=A,P.injectEventPluginsByName({SimpleEventPlugin:gn,EnterLeaveEventPlugin:Xt,ChangeEventPlugin:zt,SelectEventPlugin:Hn,BeforeInputEventPlugin:Ee});var Qn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Jn(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Zn(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Jn(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var er,tr=void 0,nr=(er=function(e,t){if(e.namespaceURI!==Qn.svg||"innerHTML"in e)e.innerHTML=t;else{for((tr=tr||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=tr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return er(e,t)})}:er);function rr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var or={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ar=["Webkit","ms","Moz","O"];function ir(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||or.hasOwnProperty(e)&&or[e]?(""+t).trim():t+"px"}function lr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ir(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(or).forEach(function(e){ar.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),or[t]=or[e]})});var ur=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sr(e,t){t&&(ur[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&i("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&i("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||i("61")),null!=t.style&&"object"!=typeof t.style&&i("62",""))}function cr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function dr(e,t){var n=jn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=g[t];for(var r=0;r<t.length;r++){var o=t[r];if(!n.hasOwnProperty(o)||!n[o]){switch(o){case"scroll":Sn("scroll",e);break;case"focus":case"blur":Sn("focus",e),Sn("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":Le(o)&&Sn(o,e);break;case"invalid":case"submit":case"reset":break;default:-1===ee.indexOf(o)&&En(o,e)}n[o]=!0}}}function fr(){}var pr=null,hr=null;function mr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function vr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var yr="function"==typeof setTimeout?setTimeout:void 0,br="function"==typeof clearTimeout?clearTimeout:void 0,gr=a.unstable_scheduleCallback,xr=a.unstable_cancelCallback;function wr(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function kr(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var _r=[],Er=-1;function Sr(e){Er<0||(e.current=_r[Er],_r[Er]=null,Er--)}function Cr(e,t){_r[++Er]=e.current,e.current=t}var Or={},Pr={current:Or},Tr={current:!1},Mr=Or;function jr(e,t){var n=e.type.contextTypes;if(!n)return Or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Rr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Nr(e){Sr(Tr),Sr(Pr)}function Dr(e){Sr(Tr),Sr(Pr)}function Ir(e,t,n){Pr.current!==Or&&i("168"),Cr(Pr,t),Cr(Tr,n)}function Ar(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())a in e||i("108",it(t)||"Unknown",a);return o({},n,r)}function Fr(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Or,Mr=Pr.current,Cr(Pr,t),Cr(Tr,Tr.current),!0}function zr(e,t,n){var r=e.stateNode;r||i("169"),n?(t=Ar(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=t,Sr(Tr),Sr(Pr),Cr(Pr,t)):Sr(Tr),Cr(Tr,n)}var Lr=null,Ur=null;function Wr(e){return function(t){try{return e(t)}catch(t){}}}function Br(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Vr(e,t,n,r){return new Br(e,t,n,r)}function Hr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return null===n?((n=Vr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,(n.alternate=e).alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.contextDependencies=e.contextDependencies,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function qr(e,t,n,r,o,a){var l=2;if("function"==typeof(r=e))Hr(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case Ge:return Kr(n.children,o,a,t);case Ze:return Gr(n,3|o,a,t);case Ye:return Gr(n,2|o,a,t);case Xe:return(e=Vr(12,n,t,4|o)).elementType=Xe,e.type=Xe,e.expirationTime=a,e;case tt:return(e=Vr(13,n,t,o)).elementType=tt,e.type=tt,e.expirationTime=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Qe:l=10;break e;case Je:l=9;break e;case et:l=11;break e;case nt:l=14;break e;case rt:l=16,r=null;break e}i("130",null==e?e:typeof e,"")}return(t=Vr(l,n,t,o)).elementType=e,t.type=r,t.expirationTime=a,t}function Kr(e,t,n,r){return(e=Vr(7,e,r,t)).expirationTime=n,e}function Gr(e,t,n,r){return e=Vr(8,e,r,t),t=0==(1&t)?Ye:Ze,e.elementType=t,e.type=t,e.expirationTime=n,e}function Yr(e,t,n){return(e=Vr(6,e,null,t)).expirationTime=n,e}function Xr(e,t,n){return(t=Vr(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qr(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:n<t?e.earliestPendingTime=t:e.latestPendingTime>t&&(e.latestPendingTime=t),eo(t,e)}function Jr(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=0:r:r===t&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,r=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=t:n<t?e.earliestSuspendedTime=t:t<r&&(e.latestSuspendedTime=t),eo(t,e)}function Zr(e,t){var n=e.earliestPendingTime;return t<n&&(t=n),(e=e.earliestSuspendedTime)>t&&(t=e),t}function eo(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,o=t.earliestPendingTime,a=t.latestPingedTime;0===(o=0!==o?o:a)&&(0===e||r<e)&&(o=r),0!==(e=o)&&e<n&&(e=n),t.nextExpirationTimeToWorkOn=o,t.expirationTime=e}function to(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var no=(new r.Component).refs;function ro(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var oo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===en(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=bl(),o=Ka(r=$i(r,e));o.payload=t,null!=n&&(o.callback=n),Ui(),Ya(e,o),Gi(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=bl(),o=Ka(r=$i(r,e));o.tag=Wa,o.payload=t,null!=n&&(o.callback=n),Ui(),Ya(e,o),Gi(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=bl(),r=Ka(n=$i(n,e));r.tag=Ba,null!=t&&(r.callback=t),Ui(),Ya(e,r),Gi(e,n)}};function ao(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!(t.prototype&&t.prototype.isPureReactComponent&&Zt(n,r)&&Zt(o,a))}function io(e,t,n){var r=!1,o=Or,a=t.contextType;return t=new t(n,a="object"==typeof a&&null!==a?La(a):(o=Rr(t)?Mr:Pr.current,(r=null!==(r=t.contextTypes)&&void 0!==r)?jr(e,o):Or)),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=oo,(e.stateNode=t)._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function lo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&oo.enqueueReplaceState(t,t.state,null)}function uo(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=no;var a=t.contextType;"object"==typeof a&&null!==a?o.context=La(a):(a=Rr(t)?Mr:Pr.current,o.context=jr(e,a)),null!==(a=e.updateQueue)&&(Za(e,a,n,o,r),o.state=e.memoizedState),"function"==typeof(a=t.getDerivedStateFromProps)&&(ro(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&oo.enqueueReplaceState(o,o.state,null),null!==(a=e.updateQueue)&&(Za(e,a,n,o,r),o.state=e.memoizedState)),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var so=Array.isArray;function co(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){n=n._owner;var r=void 0;n&&(1!==n.tag&&i("309"),r=n.stateNode),r||i("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===no&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}"string"!=typeof e&&i("284"),n._owner||i("290",e)}return e}function fo(e,t){"textarea"!==e.type&&i("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function po(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return(e=$r(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function l(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?(t=Yr(n,e.mode,r)).return=e:(t=o(t,n)).return=e,t}function s(e,t,n,r){return null!==t&&t.elementType===n.type?(r=o(t,n.props)).ref=co(e,t,n):(r=qr(n.type,n.key,n.props,null,e.mode,r)).ref=co(e,t,n),r.return=e,r}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Xr(n,e.mode,r)).return=e:(t=o(t,n.children||[])).return=e,t}function d(e,t,n,r,a){return null===t||7!==t.tag?(t=Kr(n,e.mode,r,a)).return=e:(t=o(t,n)).return=e,t}function f(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Yr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case qe:return(n=qr(t.type,t.key,t.props,null,e.mode,n)).ref=co(e,null,t),n.return=e,n;case Ke:return(t=Xr(t,e.mode,n)).return=e,t}if(so(t)||at(t))return(t=Kr(t,e.mode,n,null)).return=e,t;fo(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case qe:return n.key===o?n.type===Ge?d(e,t,n.props.children,r,o):s(e,t,n,r):null;case Ke:return n.key===o?c(e,t,n,r):null}if(so(n)||at(n))return null!==o?null:d(e,t,n,r,null);fo(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case qe:return e=e.get(null===r.key?n:r.key)||null,r.type===Ge?d(t,e,r.props.children,o,r.key):s(t,e,r,o);case Ke:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(so(r)||at(r))return d(t,e=e.get(n)||null,r,o,null);fo(t,r)}return null}return function(u,s,c,d){var m="object"==typeof c&&null!==c&&c.type===Ge&&null===c.key;m&&(c=c.props.children);var v="object"==typeof c&&null!==c;if(v)switch(c.$$typeof){case qe:e:{for(v=c.key,m=s;null!==m;){if(m.key===v){if(7===m.tag?c.type===Ge:m.elementType===c.type){n(u,m.sibling),(s=o(m,c.type===Ge?c.props.children:c.props)).ref=co(u,m,c),s.return=u,u=s;break e}n(u,m);break}t(u,m),m=m.sibling}u=c.type===Ge?((s=Kr(c.props.children,u.mode,d,c.key)).return=u,s):((d=qr(c.type,c.key,c.props,null,u.mode,d)).ref=co(u,s,c),d.return=u,d)}return l(u);case Ke:e:{for(m=c.key;null!==s;){if(s.key===m){if(4===s.tag&&s.stateNode.containerInfo===c.containerInfo&&s.stateNode.implementation===c.implementation){n(u,s.sibling),(s=o(s,c.children||[])).return=u,u=s;break e}n(u,s);break}t(u,s),s=s.sibling}(s=Xr(c,u.mode,d)).return=u,u=s}return l(u)}if("string"==typeof c||"number"==typeof c)return c=""+c,l((null!==s&&6===s.tag?(n(u,s.sibling),(s=o(s,c)).return=u):(n(u,s),(s=Yr(c,u.mode,d)).return=u),u=s));if(so(c))return function(o,i,l,u){for(var s=null,c=null,d=i,m=i=0,v=null;null!==d&&m<l.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var y=p(o,d,l[m],u);if(null===y){null===d&&(d=v);break}e&&d&&null===y.alternate&&t(o,d),i=a(y,i,m),null===c?s=y:c.sibling=y,c=y,d=v}if(m===l.length)return n(o,d),s;if(null===d){for(;m<l.length;m++)(d=f(o,l[m],u))&&(i=a(d,i,m),null===c?s=d:c.sibling=d,c=d);return s}for(d=r(o,d);m<l.length;m++)(v=h(d,o,m,l[m],u))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),i=a(v,i,m),null===c?s=v:c.sibling=v,c=v);return e&&d.forEach(function(e){return t(o,e)}),s}(u,s,c,d);if(at(c))return function(o,l,u,s){var c=at(u);"function"!=typeof c&&i("150"),null==(u=c.call(u))&&i("151");for(var d=c=null,m=l,v=l=0,y=null,b=u.next();null!==m&&!b.done;v++,b=u.next()){m.index>v?(y=m,m=null):y=m.sibling;var g=p(o,m,b.value,s);if(null===g){m||(m=y);break}e&&m&&null===g.alternate&&t(o,m),l=a(g,l,v),null===d?c=g:d.sibling=g,d=g,m=y}if(b.done)return n(o,m),c;if(null===m){for(;!b.done;v++,b=u.next())null!==(b=f(o,b.value,s))&&(l=a(b,l,v),null===d?c=b:d.sibling=b,d=b);return c}for(m=r(o,m);!b.done;v++,b=u.next())null!==(b=h(m,o,v,b.value,s))&&(e&&null!==b.alternate&&m.delete(null===b.key?v:b.key),l=a(b,l,v),null===d?c=b:d.sibling=b,d=b);return e&&m.forEach(function(e){return t(o,e)}),c}(u,s,c,d);if(v&&fo(u,c),void 0===c&&!m)switch(u.tag){case 1:case 0:i("152",(d=u.type).displayName||d.name||"Component")}return n(u,s)}}var ho=po(!0),mo=po(!1),vo={},yo={current:vo},bo={current:vo},go={current:vo};function xo(e){return e===vo&&i("174"),e}function wo(e,t){Cr(go,t),Cr(bo,e),Cr(yo,vo);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Zn(null,"");break;default:t=Zn(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}Sr(yo),Cr(yo,t)}function ko(e){Sr(yo),Sr(bo),Sr(go)}function _o(e){xo(go.current);var t=xo(yo.current),n=Zn(t,e.type);t!==n&&(Cr(bo,e),Cr(yo,n))}function Eo(e){bo.current===e&&(Sr(yo),Sr(bo))}var So=0,Co=2,Oo=4,Po=8,To=16,Mo=32,jo=64,Ro=128,No=Ve.ReactCurrentDispatcher,Do=0,Io=null,Ao=null,Fo=null,zo=null,Lo=null,Uo=null,Wo=0,Bo=null,Vo=0,Ho=!1,$o=null,qo=0;function Ko(){i("321")}function Go(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qt(e[n],t[n]))return!1;return!0}function Yo(e,t,n,r,o,a){if(Do=a,Io=t,Fo=null!==e?e.memoizedState:null,No.current=null===Fo?ua:sa,t=n(r,o),Ho){for(;Ho=!1,qo+=1,Fo=null!==e?e.memoizedState:null,Uo=zo,Bo=Lo=Ao=null,No.current=sa,t=n(r,o),Ho;);$o=null,qo=0}return No.current=la,(e=Io).memoizedState=zo,e.expirationTime=Wo,e.updateQueue=Bo,e.effectTag|=Vo,e=null!==Ao&&null!==Ao.next,Uo=Lo=zo=Fo=Ao=Io=null,Bo=null,Vo=Wo=Do=0,e&&i("300"),t}function Xo(){No.current=la,Uo=Lo=zo=Fo=Ao=Io=null,Ho=!1,$o=Bo=null,qo=Vo=Wo=Do=0}function Qo(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===Lo?zo=Lo=e:Lo=Lo.next=e,Lo}function Jo(){if(null!==Uo)Uo=(Lo=Uo).next,Fo=null!==(Ao=Fo)?Ao.next:null;else{null===Fo&&i("310");var e={memoizedState:(Ao=Fo).memoizedState,baseState:Ao.baseState,queue:Ao.queue,baseUpdate:Ao.baseUpdate,next:null};Lo=null===Lo?zo=e:Lo.next=e,Fo=Ao.next}return Lo}function Zo(e,t){return"function"==typeof t?t(e):t}function ea(e){var t=Jo(),n=t.queue;if(null===n&&i("311"),n.lastRenderedReducer=e,0<qo){var r=n.dispatch;if(null!==$o){var o=$o.get(n);if(void 0!==o){$o.delete(n);for(var a=t.memoizedState;a=e(a,o.action),null!==(o=o.next););return Qt(a,t.memoizedState)||(xa=!0),t.memoizedState=a,t.baseUpdate===n.last&&(t.baseState=a),[n.lastRenderedState=a,r]}}return[t.memoizedState,r]}r=n.last;var l=t.baseUpdate;if(a=t.baseState,null!==(r=null!==l?(null!==r&&(r.next=null),l.next):null!==r?r.next:null)){var u=o=null,s=r,c=!1;do{var d=s.expirationTime;d<Do?(c||(c=!0,u=l,o=a),Wo<d&&(Wo=d)):a=s.eagerReducer===e?s.eagerState:e(a,s.action),s=(l=s).next}while(null!==s&&s!==r);c||(u=l,o=a),Qt(a,t.memoizedState)||(xa=!0),t.memoizedState=a,t.baseUpdate=u,t.baseState=o,n.lastRenderedState=a}return[t.memoizedState,n.dispatch]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===Bo?(Bo={lastEffect:null}).lastEffect=e.next=e:null===(t=Bo.lastEffect)?Bo.lastEffect=e.next=e:(n=t.next,(t.next=e).next=n,Bo.lastEffect=e),e}function na(e,t,n,r){var o=Qo();Vo|=e,o.memoizedState=ta(t,n,void 0,void 0===r?null:r)}function ra(e,t,n,r){var o=Jo();r=void 0===r?null:r;var a=void 0;if(null!==Ao){var i=Ao.memoizedState;if(a=i.destroy,null!==r&&Go(r,i.deps))return void ta(So,n,a,r)}Vo|=e,o.memoizedState=ta(t,n,a,r)}function oa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function aa(){}function ia(e,t,n){qo<25||i("301");var r=e.alternate;if(e===Io||null!==r&&r===Io)if(Ho=!0,e={expirationTime:Do,action:n,eagerReducer:null,eagerState:null,next:null},null===$o&&($o=new Map),void 0===(n=$o.get(t)))$o.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{Ui();var o=bl(),a={expirationTime:o=$i(o,e),action:n,eagerReducer:null,eagerState:null,next:null},l=t.last;if(null===l)a.next=a;else{var u=l.next;null!==u&&(a.next=u),l.next=a}if(t.last=a,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var s=t.lastRenderedState,c=r(s,n);if(a.eagerReducer=r,Qt(a.eagerState=c,s))return}catch(e){}Gi(e,o)}}var la={readContext:La,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko},ua={readContext:La,useCallback:function(e,t){return Qo().memoizedState=[e,void 0===t?null:t],e},useContext:La,useEffect:function(e,t){return na(516,Ro|jo,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,na(4,Oo|Mo,oa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return na(4,Oo|Mo,e,t)},useMemo:function(e,t){var n=Qo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ia.bind(null,Io,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Qo().memoizedState=e},useState:function(e){var t=Qo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e}).dispatch=ia.bind(null,Io,e),[t.memoizedState,e]},useDebugValue:aa},sa={readContext:La,useCallback:function(e,t){var n=Jo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:La,useEffect:function(e,t){return ra(516,Ro|jo,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,Oo|Mo,oa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,Oo|Mo,e,t)},useMemo:function(e,t){var n=Jo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Go(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:ea,useRef:function(){return Jo().memoizedState},useState:function(e){return ea(Zo)},useDebugValue:aa},ca=null,da=null,fa=!1;function pa(e,t){var n=Vr(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ha(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function ma(e){if(fa){var t=da;if(t){var n=t;if(!ha(e,t)){if(!(t=wr(n))||!ha(e,t))return e.effectTag|=2,fa=!1,void(ca=e);pa(ca,n)}ca=e,da=kr(t)}else e.effectTag|=2,fa=!1,ca=e}}function va(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;ca=e}function ya(e){if(e!==ca)return!1;if(!fa)return va(e),!(fa=!0);var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!vr(t,e.memoizedProps))for(t=da;t;)pa(e,t),t=wr(t);return va(e),da=ca?wr(e.stateNode):null,!0}function ba(){da=ca=null,fa=!1}var ga=Ve.ReactCurrentOwner,xa=!1;function wa(e,t,n,r){t.child=null===e?mo(t,null,n,r):ho(t,e.child,n,r)}function ka(e,t,n,r,o){n=n.render;var a=t.ref;return za(t,o),r=Yo(e,t,n,r,a,o),null===e||xa?(t.effectTag|=1,wa(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),ja(e,t,o))}function _a(e,t,n,r,o,a){if(null!==e)return i=e.child,o<a&&(o=i.memoizedProps,(n=null!==(n=n.compare)?n:Zt)(o,r)&&e.ref===t.ref)?ja(e,t,a):(t.effectTag|=1,(e=$r(i,r)).ref=t.ref,(e.return=t).child=e);var i=n.type;return"function"!=typeof i||Hr(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=qr(n.type,null,r,null,t.mode,a)).ref=t.ref,(e.return=t).child=e):(t.tag=15,t.type=i,Ea(e,t,i,r,o,a))}function Ea(e,t,n,r,o,a){return null!==e&&Zt(e.memoizedProps,r)&&e.ref===t.ref&&(xa=!1,o<a)?ja(e,t,a):Ca(e,t,n,r,a)}function Sa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ca(e,t,n,r,o){var a=Rr(n)?Mr:Pr.current;return a=jr(t,a),za(t,o),n=Yo(e,t,n,r,a,o),null===e||xa?(t.effectTag|=1,wa(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),ja(e,t,o))}function Oa(e,t,n,r,o){if(Rr(n)){var a=!0;Fr(t)}else a=!1;if(za(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),io(t,n,r),uo(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var u=i.context,s=n.contextType;s="object"==typeof s&&null!==s?La(s):jr(t,s=Rr(n)?Mr:Pr.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||u!==s)&&lo(t,i,r,s),Ha=!1;var f=t.memoizedState;u=i.state=f;var p=t.updateQueue;null!==p&&(Za(t,p,r,i,o),u=t.memoizedState),r=l!==r||f!==u||Tr.current||Ha?("function"==typeof c&&(ro(t,n,c,r),u=t.memoizedState),(l=Ha||ao(t,n,l,r,f,u,s))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.effectTag|=4)):("function"==typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=s,l):("function"==typeof i.componentDidMount&&(t.effectTag|=4),!1)}else i=t.stateNode,l=t.memoizedProps,i.props=t.type===t.elementType?l:to(t.type,l),u=i.context,s="object"==typeof(s=n.contextType)&&null!==s?La(s):jr(t,s=Rr(n)?Mr:Pr.current),(d="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||u!==s)&&lo(t,i,r,s),Ha=!1,u=t.memoizedState,f=i.state=u,null!==(p=t.updateQueue)&&(Za(t,p,r,i,o),f=t.memoizedState),r=l!==r||u!==f||Tr.current||Ha?("function"==typeof c&&(ro(t,n,c,r),f=t.memoizedState),(c=Ha||ao(t,n,l,r,u,f,s))?(d||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,f,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,f,s)),"function"==typeof i.componentDidUpdate&&(t.effectTag|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=f),i.props=r,i.state=f,i.context=s,c):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),!1);return Pa(e,t,n,r,a,o)}function Pa(e,t,n,r,o,a){Sa(e,t);var i=0!=(64&t.effectTag);if(!r&&!i)return o&&zr(t,n,!1),ja(e,t,a);r=t.stateNode,ga.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&i?(t.child=ho(t,e.child,null,a),t.child=ho(t,null,l,a)):wa(e,t,l,a),t.memoizedState=r.state,o&&zr(t,n,!0),t.child}function Ta(e){var t=e.stateNode;t.pendingContext?Ir(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ir(0,t.context,!1),wo(e,t.containerInfo)}function Ma(e,t,n){var r=t.mode,o=t.pendingProps,a=t.memoizedState;if(0==(64&t.effectTag)){a=null;var i=!1}else a={timedOutAt:null!==a?a.timedOutAt:0},i=!0,t.effectTag&=-65;if(null===e)if(i){var l=o.fallback;e=Kr(null,r,0,null),0==(1&t.mode)&&(e.child=null!==t.memoizedState?t.child.child:t.child),r=Kr(l,r,n,null),e.sibling=r,(n=e).return=r.return=t}else n=r=mo(t,null,o.children,n);else null!==e.memoizedState?(l=(r=e.child).sibling,i?(n=o.fallback,o=$r(r,r.pendingProps),0==(1&t.mode)&&(i=null!==t.memoizedState?t.child.child:t.child)!==r.child&&(o.child=i),r=o.sibling=$r(l,n,l.expirationTime),(n=o).childExpirationTime=0,n.return=r.return=t):n=r=ho(t,r.child,o.children,n)):(l=e.child,i?(i=o.fallback,(o=Kr(null,r,0,null)).child=l,0==(1&t.mode)&&(o.child=null!==t.memoizedState?t.child.child:t.child),(r=o.sibling=Kr(i,r,n,null)).effectTag|=2,(n=o).childExpirationTime=0,n.return=r.return=t):r=n=ho(t,l,o.children,n)),t.stateNode=e.stateNode;return t.memoizedState=a,t.child=n,r}function ja(e,t,n){if(null!==e&&(t.contextDependencies=e.contextDependencies),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child&&i("153"),null!==t.child){for(n=$r(e=t.child,e.pendingProps,e.expirationTime),(t.child=n).return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$r(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}var Ra={current:null},Na=null,Da=null,Ia=null;function Aa(e,t){var n=e.type._context;Cr(Ra,n._currentValue),n._currentValue=t}function Fa(e){var t=Ra.current;Sr(Ra),e.type._context._currentValue=t}function za(e,t){Ia=Da=null;var n=(Na=e).contextDependencies;null!==n&&n.expirationTime>=t&&(xa=!0),e.contextDependencies=null}function La(e,t){return Ia!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(Ia=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Da?(null===Na&&i("308"),Da=t,Na.contextDependencies={first:t,expirationTime:0}):Da=Da.next=t),e._currentValue}var Ua=0,Wa=1,Ba=2,Va=3,Ha=!1;function $a(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function qa(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ka(e){return{expirationTime:e,tag:Ua,payload:null,callback:null,next:null,nextEffect:null}}function Ga(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Ya(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,o=null;null===r&&(r=e.updateQueue=$a(e.memoizedState))}else r=e.updateQueue,o=n.updateQueue,null===r?null===o?(r=e.updateQueue=$a(e.memoizedState),o=n.updateQueue=$a(n.memoizedState)):r=e.updateQueue=qa(o):null===o&&(o=n.updateQueue=qa(r));null===o||r===o?Ga(r,t):null===r.lastUpdate||null===o.lastUpdate?(Ga(r,t),Ga(o,t)):(Ga(r,t),o.lastUpdate=t)}function Xa(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=$a(e.memoizedState):Qa(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Qa(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=qa(t)),t}function Ja(e,t,n,r,a,i){switch(n.tag){case Wa:return"function"==typeof(e=n.payload)?e.call(i,r,a):e;case Va:e.effectTag=-2049&e.effectTag|64;case Ua:if(null===(a="function"==typeof(e=n.payload)?e.call(i,r,a):e)||void 0===a)break;return o({},r,a);case Ba:Ha=!0}return r}function Za(e,t,n,r,o){Ha=!1;for(var a=(t=Qa(e,t)).baseState,i=null,l=0,u=t.firstUpdate,s=a;null!==u;){var c=u.expirationTime;c<o?(null===i&&(i=u,a=s),l<c&&(l=c)):(s=Ja(e,0,u,s,n,r),null!==u.callback&&(e.effectTag|=32,(u.nextEffect=null)===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(c=null,u=t.firstCapturedUpdate;null!==u;){var d=u.expirationTime;d<o?(null===c&&(c=u,null===i&&(a=s)),l<d&&(l=d)):(s=Ja(e,0,u,s,n,r),null!==u.callback&&(e.effectTag|=32,(u.nextEffect=null)===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===i&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===c&&(a=s),t.baseState=a,t.firstUpdate=i,t.firstCapturedUpdate=c,e.expirationTime=l,e.memoizedState=s}function ei(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),ti(t.firstEffect,n),t.firstEffect=t.lastEffect=null,ti(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function ti(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;"function"!=typeof n&&i("191",n),n.call(r)}e=e.nextEffect}}function ni(e,t){return{value:e,source:t,stack:lt(t)}}function ri(e){e.effectTag|=4}var oi=void 0,ai=void 0,ii=void 0,li=void 0;oi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n=(n.child.return=n).child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ai=function(){},ii=function(e,t,n,r,a){var i=e.memoizedProps;if(i!==r){var l=t.stateNode;switch(xo(yo.current),e=null,n){case"input":i=bt(l,i),r=bt(l,r),e=[];break;case"option":i=$n(l,i),r=$n(l,r),e=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":i=Kn(l,i),r=Kn(l,r),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(l.onclick=fr)}sr(n,r),l=n=void 0;var u=null;for(n in i)if(!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&null!=i[n])if("style"===n){var s=i[n];for(l in s)s.hasOwnProperty(l)&&(u||(u={}),u[l]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(b.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var c=r[n];if(s=null!=i?i[n]:void 0,r.hasOwnProperty(n)&&c!==s&&(null!=c||null!=s))if("style"===n)if(s){for(l in s)!s.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(u||(u={}),u[l]="");for(l in c)c.hasOwnProperty(l)&&s[l]!==c[l]&&(u||(u={}),u[l]=c[l])}else u||(e||(e=[]),e.push(n,u)),u=c;else"dangerouslySetInnerHTML"===n?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(e=e||[]).push(n,""+c)):"children"===n?s===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(n,""+c):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(b.hasOwnProperty(n)?(null!=c&&dr(a,n),e||s===c||(e=[])):(e=e||[]).push(n,c))}u&&(e=e||[]).push("style",u),a=e,(t.updateQueue=a)&&ri(t)}},li=function(e,t,n,r){n!==r&&ri(t)};var ui="function"==typeof WeakSet?WeakSet:Set;function si(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=lt(n)),null!==n&&it(n.type),t=t.value,null!==e&&1===e.tag&&it(e.type);try{console.error(t)}catch(e){setTimeout(function(){throw e})}}function ci(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Hi(e,t)}else t.current=null}function di(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if((r.tag&e)!==So){var o=r.destroy;(r.destroy=void 0)!==o&&o()}(r.tag&t)!==So&&(o=r.create,r.destroy=o()),r=r.next}while(r!==n)}}function fi(e){switch("function"==typeof Ur&&Ur(e),e.tag){case 0:case 11:case 14:case 15:var t=e.updateQueue;if(null!==t&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n.destroy;if(void 0!==r){var o=e;try{r()}catch(t){Hi(o,t)}}n=n.next}while(n!==t)}break;case 1:if(ci(e),"function"==typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Hi(e,t)}break;case 5:ci(e);break;case 4:mi(e)}}function pi(e){return 5===e.tag||3===e.tag||4===e.tag}function hi(e){e:{for(var t=e.return;null!==t;){if(pi(t)){var n=t;break e}t=t.return}i("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:i("161")}16&n.effectTag&&(rr(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||pi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n=(n.child.return=n).child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(r){var a=t,l=o.stateNode,u=n;8===a.nodeType?a.parentNode.insertBefore(l,u):a.insertBefore(l,u)}else t.insertBefore(o.stateNode,n);else r?(l=t,u=o.stateNode,8===l.nodeType?(a=l.parentNode).insertBefore(u,l):(a=l).appendChild(u),null!==(l=l._reactRootContainer)&&void 0!==l||null!==a.onclick||(a.onclick=fr)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o=(o.child.return=o).child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function mi(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&i("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,l=a;;)if(fi(l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===a)break;for(;null===l.sibling;){if(null===l.return||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}o?(a=r,l=t.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):r.removeChild(t.stateNode)}else if(4===t.tag){if(null!==t.child){r=t.stateNode.containerInfo,o=!0,t=(t.child.return=t).child;continue}}else if(fi(t),null!==t.child){t=(t.child.return=t).child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function vi(e,t){switch(t.tag){case 0:case 11:case 14:case 15:di(Oo,Po,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;(t.updateQueue=null)!==a&&function(e,t,n,r,o){e[N]=o,"input"===n&&"radio"===o.type&&null!=o.name&&xt(e,o),cr(n,r),r=cr(n,o);for(var a=0;a<t.length;a+=2){var i=t[a],l=t[a+1];"style"===i?lr(e,l):"dangerouslySetInnerHTML"===i?nr(e,l):"children"===i?rr(e,l):vt(e,i,l,r)}switch(n){case"input":wt(e,o);break;case"textarea":Yn(e,o);break;case"select":t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!o.multiple,null!=(n=o.value)?qn(e,!!o.multiple,n,!1):t!==!!o.multiple&&(null!=o.defaultValue?qn(e,!!o.multiple,o.defaultValue,!0):qn(e,!!o.multiple,o.multiple?[]:"",!1))}}(n,a,o,e,r)}break;case 6:null===t.stateNode&&i("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 12:break;case 13:if(n=t.memoizedState,r=void 0,e=t,null===n?r=!1:(r=!0,e=t.child,0===n.timedOutAt&&(n.timedOutAt=bl())),null!==e&&function(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)r.style.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=ir("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else{if(13===n.tag&&null!==n.memoizedState){(r=n.child.sibling).return=n,n=r;continue}if(null!==n.child){n=(n.child.return=n).child;continue}}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(e,r),null!==(n=t.updateQueue)){t.updateQueue=null;var l=t.stateNode;null===l&&(l=t.stateNode=new ui),n.forEach(function(e){var n=function(e,t){var n=e.stateNode;null!==n&&n.delete(t),null!==(e=Ki(e,t=$i(t=bl(),e)))&&(Qr(e,t),0!==(t=e.expirationTime)&&gl(e,t))}.bind(null,t,e);l.has(e)||(l.add(e),e.then(n,n))})}break;case 17:break;default:i("163")}}var yi="function"==typeof WeakMap?WeakMap:Map;function bi(e,t,n){(n=Ka(n)).tag=Va,n.payload={element:null};var r=t.value;return n.callback=function(){Pl(r),si(e,t)},n}function gi(e,t,n){(n=Ka(n)).tag=Va;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Ii?Ii=new Set([this]):Ii.add(this));var n=t.value,o=t.stack;si(e,t),this.componentDidCatch(n,{componentStack:null!==o?o:""})}),n}function xi(e){switch(e.tag){case 1:Rr(e.type)&&Nr();var t=e.effectTag;return 2048&t?(e.effectTag=-2049&t|64,e):null;case 3:return ko(),Dr(),0!=(64&(t=e.effectTag))&&i("285"),e.effectTag=-2049&t|64,e;case 5:return Eo(e),null;case 13:return 2048&(t=e.effectTag)?(e.effectTag=-2049&t|64,e):null;case 18:return null;case 4:return ko(),null;case 10:return Fa(e),null;default:return null}}var wi=Ve.ReactCurrentDispatcher,ki=Ve.ReactCurrentOwner,_i=1073741822,Ei=!1,Si=null,Ci=null,Oi=0,Pi=-1,Ti=!1,Mi=null,ji=!1,Ri=null,Ni=null,Di=null,Ii=null;function Ai(){if(null!==Si)for(var e=Si.return;null!==e;){var t=e;switch(t.tag){case 1:null!=t.type.childContextTypes&&Nr();break;case 3:ko(),Dr();break;case 5:Eo(t);break;case 4:ko();break;case 10:Fa(t)}e=e.return}Oi=0,Ti=!(Pi=-1),Si=Ci=null}function Fi(){for(;null!==Mi;){var e=Mi.effectTag;if(16&e&&rr(Mi.stateNode,""),128&e){var t=Mi.alternate;null!==t&&null!==(t=t.ref)&&("function"==typeof t?t(null):t.current=null)}switch(14&e){case 2:hi(Mi),Mi.effectTag&=-3;break;case 6:hi(Mi),Mi.effectTag&=-3,vi(Mi.alternate,Mi);break;case 4:vi(Mi.alternate,Mi);break;case 8:mi(e=Mi),e.return=null,e.child=null,e.memoizedState=null,(e.updateQueue=null)!==(e=e.alternate)&&(e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null)}Mi=Mi.nextEffect}}function zi(){for(;null!==Mi;){if(256&Mi.effectTag)e:{var e=Mi.alternate,t=Mi;switch(t.tag){case 0:case 11:case 15:di(Co,So,t);break e;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:to(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break e;case 3:case 5:case 6:case 4:case 17:break e;default:i("163")}}Mi=Mi.nextEffect}}function Li(e,t){for(;null!==Mi;){var n=Mi.effectTag;if(36&n){var r=Mi.alternate,o=Mi,a=t;switch(o.tag){case 0:case 11:case 15:di(To,Mo,o);break;case 1:var l=o.stateNode;if(4&o.effectTag)if(null===r)l.componentDidMount();else{var u=o.elementType===o.type?r.memoizedProps:to(o.type,r.memoizedProps);l.componentDidUpdate(u,r.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}null!==(r=o.updateQueue)&&ei(0,r,l);break;case 3:if(null!==(r=o.updateQueue)){if((l=null)!==o.child)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}ei(0,r,l)}break;case 5:a=o.stateNode,null===r&&4&o.effectTag&&mr(o.type,o.memoizedProps)&&a.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:i("163")}}128&n&&null!==(o=Mi.ref)&&(a=Mi.stateNode,"function"==typeof o?o(a):o.current=a),512&n&&(Ri=e),Mi=Mi.nextEffect}}function Ui(){null!==Ni&&xr(Ni),null!==Di&&Di()}function Wi(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(1024&e.effectTag)){e:{var a=t,l=Oi,u=(t=Si=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:Rr(t.type)&&Nr();break;case 3:ko(),Dr(),(u=t.stateNode).pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),null!==a&&null!==a.child||(ya(t),t.effectTag&=-3),ai(t);break;case 5:Eo(t);var s=xo(go.current);if(l=t.type,null!==a&&null!=t.stateNode)ii(a,t,l,u,s),a.ref!==t.ref&&(t.effectTag|=128);else if(u){var c=xo(yo.current);if(ya(t)){a=(u=t).stateNode;var d=u.type,f=u.memoizedProps,p=s;switch(a[R]=u,a[N]=f,l=void 0,s=d){case"iframe":case"object":En("load",a);break;case"video":case"audio":for(d=0;d<ee.length;d++)En(ee[d],a);break;case"source":En("error",a);break;case"img":case"image":case"link":En("error",a),En("load",a);break;case"form":En("reset",a),En("submit",a);break;case"details":En("toggle",a);break;case"input":gt(a,f),En("invalid",a),dr(p,"onChange");break;case"select":a._wrapperState={wasMultiple:!!f.multiple},En("invalid",a),dr(p,"onChange");break;case"textarea":Gn(a,f),En("invalid",a),dr(p,"onChange")}for(l in sr(s,f),d=null,f)f.hasOwnProperty(l)&&(c=f[l],"children"===l?"string"==typeof c?a.textContent!==c&&(d=["children",c]):"number"==typeof c&&a.textContent!==""+c&&(d=["children",""+c]):b.hasOwnProperty(l)&&null!=c&&dr(p,l));switch(s){case"input":We(a),kt(a,f,!0);break;case"textarea":We(a),Xn(a);break;case"select":case"option":break;default:"function"==typeof f.onClick&&(a.onclick=fr)}l=d,u.updateQueue=l,(u=null!==l)&&ri(t)}else{f=t,p=l,a=u,d=9===s.nodeType?s:s.ownerDocument,c===Qn.html&&(c=Jn(p)),c===Qn.html?"script"===p?((a=d.createElement("div")).innerHTML="<script><\/script>",d=a.removeChild(a.firstChild)):"string"==typeof a.is?d=d.createElement(p,{is:a.is}):(d=d.createElement(p),"select"===p&&(p=d,a.multiple?p.multiple=!0:a.size&&(p.size=a.size))):d=d.createElementNS(c,p),(a=d)[R]=f,a[N]=u,oi(a,t,!1,!1),p=a;var h=s,m=cr(d=l,f=u);switch(d){case"iframe":case"object":En("load",p),s=f;break;case"video":case"audio":for(s=0;s<ee.length;s++)En(ee[s],p);s=f;break;case"source":En("error",p),s=f;break;case"img":case"image":case"link":En("error",p),En("load",p),s=f;break;case"form":En("reset",p),En("submit",p),s=f;break;case"details":En("toggle",p),s=f;break;case"input":gt(p,f),s=bt(p,f),En("invalid",p),dr(h,"onChange");break;case"option":s=$n(p,f);break;case"select":p._wrapperState={wasMultiple:!!f.multiple},s=o({},f,{value:void 0}),En("invalid",p),dr(h,"onChange");break;case"textarea":Gn(p,f),s=Kn(p,f),En("invalid",p),dr(h,"onChange");break;default:s=f}sr(d,s),c=void 0;var v=d,y=p,g=s;for(c in g)if(g.hasOwnProperty(c)){var x=g[c];"style"===c?lr(y,x):"dangerouslySetInnerHTML"===c?null!=(x=x?x.__html:void 0)&&nr(y,x):"children"===c?"string"==typeof x?("textarea"!==v||""!==x)&&rr(y,x):"number"==typeof x&&rr(y,""+x):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(b.hasOwnProperty(c)?null!=x&&dr(h,c):null!=x&&vt(y,c,x,m))}switch(d){case"input":We(p),kt(p,f,!1);break;case"textarea":We(p),Xn(p);break;case"option":null!=f.value&&p.setAttribute("value",""+yt(f.value));break;case"select":(s=p).multiple=!!f.multiple,null!=(p=f.value)?qn(s,!!f.multiple,p,!1):null!=f.defaultValue&&qn(s,!!f.multiple,f.defaultValue,!0);break;default:"function"==typeof s.onClick&&(p.onclick=fr)}(u=mr(l,u))&&ri(t),t.stateNode=a}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&i("166");break;case 6:a&&null!=t.stateNode?li(a,t,a.memoizedProps,u):("string"!=typeof u&&null===t.stateNode&&i("166"),a=xo(go.current),xo(yo.current),ya(t)?(l=(u=t).stateNode,a=u.memoizedProps,l[R]=u,(u=l.nodeValue!==a)&&ri(t)):(l=t,(u=(9===a.nodeType?a:a.ownerDocument).createTextNode(u))[R]=t,l.stateNode=u));break;case 11:break;case 13:if(u=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=l,Si=t;break e}u=null!==u,l=null!==a&&null!==a.memoizedState,null!==a&&!u&&l&&null!==(a=a.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=a).nextEffect=s:(t.firstEffect=t.lastEffect=a,a.nextEffect=null),a.effectTag=8),(u||l)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:ko(),ai(t);break;case 10:Fa(t);break;case 9:case 14:break;case 17:Rr(t.type)&&Nr();break;case 18:break;default:i("156")}Si=null}if(t=e,1===Oi||1!==t.childExpirationTime){for(u=0,l=t.child;null!==l;)(a=l.expirationTime)>u&&(u=a),(s=l.childExpirationTime)>u&&(u=s),l=l.sibling;t.childExpirationTime=u}if(null!==Si)return Si;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e))}else{if(null!==(e=xi(e)))return e.effectTag&=1023,e;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=1024)}if(null!==r)return r;if(null===n)break;e=n}return null}function Bi(e){var t=function(e,t,n){var r=t.expirationTime;if(null!==e){if(e.memoizedProps!==t.pendingProps||Tr.current)xa=!0;else if(r<n){switch(xa=!1,t.tag){case 3:Ta(t),ba();break;case 5:_o(t);break;case 1:Rr(t.type)&&Fr(t);break;case 4:wo(t,t.stateNode.containerInfo);break;case 10:Aa(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&n<=r?Ma(e,t,n):null!==(t=ja(e,t,n))?t.sibling:null}return ja(e,t,n)}}else xa=!1;switch(t.expirationTime=0,t.tag){case 2:r=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var o=jr(t,Pr.current);if(za(t,n),o=Yo(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,Xo(),Rr(r)){var a=!0;Fr(t)}else a=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null;var l=r.getDerivedStateFromProps;"function"==typeof l&&ro(t,r,l,e),o.updater=oo,uo((t.stateNode=o)._reactInternalFiber=t,r,e,n),t=Pa(null,t,r,!0,a,n)}else t.tag=0,wa(null,t,o,n),t=t.child;return t;case 16:switch(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),a=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)}),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t}}(o),t.type=e,o=t.tag=function(e){if("function"==typeof e)return Hr(e)?1:0;if(null!=e){if((e=e.$$typeof)===et)return 11;if(e===nt)return 14}return 2}(e),a=to(e,a),l=void 0,o){case 0:l=Ca(null,t,e,a,n);break;case 1:l=Oa(null,t,e,a,n);break;case 11:l=ka(null,t,e,a,n);break;case 14:l=_a(null,t,e,to(e.type,a),r,n);break;default:i("306",e,"")}return l;case 0:return r=t.type,o=t.pendingProps,Ca(e,t,r,o=t.elementType===r?o:to(r,o),n);case 1:return r=t.type,o=t.pendingProps,Oa(e,t,r,o=t.elementType===r?o:to(r,o),n);case 3:return Ta(t),null===(r=t.updateQueue)&&i("282"),o=null!==(o=t.memoizedState)?o.element:null,Za(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===o?(ba(),ja(e,t,n)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(da=kr(t.stateNode.containerInfo),ca=t,o=fa=!0),o?(t.effectTag|=2,t.child=mo(t,null,r,n)):(wa(e,t,r,n),ba()),t.child);case 5:return _o(t),null===e&&ma(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,l=o.children,vr(r,o)?l=null:null!==a&&vr(r,a)&&(t.effectTag|=16),Sa(e,t),1!==n&&1&t.mode&&o.hidden?(t.expirationTime=t.childExpirationTime=1,null):(wa(e,t,l,n),t.child);case 6:return null===e&&ma(t),null;case 13:return Ma(e,t,n);case 4:return wo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ho(t,null,r,n):wa(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,ka(e,t,r,o=t.elementType===r?o:to(r,o),n);case 7:return wa(e,t,t.pendingProps,n),t.child;case 8:case 12:return wa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,Aa(t,a=o.value),null!==l){var u=l.value;if(0==(a=Qt(u,a)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,a):1073741823))){if(l.children===o.children&&!Tr.current){t=ja(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.contextDependencies;if(null!==s){l=u.child;for(var c=s.first;null!==c;){if(c.context===r&&0!=(c.observedBits&a)){1===u.tag&&((c=Ka(n)).tag=Ba,Ya(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),c=n;for(var d=u.return;null!==d;){var f=d.alternate;if(d.childExpirationTime<c)d.childExpirationTime=c,null!==f&&f.childExpirationTime<c&&(f.childExpirationTime=c);else{if(!(null!==f&&f.childExpirationTime<c))break;f.childExpirationTime=c}d=d.return}s.expirationTime<n&&(s.expirationTime=n);break}c=c.next}}else l=10===u.tag&&u.type===t.type?null:u.child;if(null!==l)l.return=u;else for(l=u;null!==l;){if(l===t){l=null;break}if(null!==(u=l.sibling)){u.return=l.return,l=u;break}l=l.return}u=l}}wa(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(a=t.pendingProps).children,za(t,n),r=r(o=La(o,a.unstable_observedBits)),t.effectTag|=1,wa(e,t,r,n),t.child;case 14:return a=to(o=t.type,t.pendingProps),_a(e,t,o,a=to(o.type,a),r,n);case 15:return Ea(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:to(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,Rr(r)?(e=!0,Fr(t)):e=!1,za(t,n),io(t,r,o),uo(t,r,o,n),Pa(null,t,r,!0,e,n)}i("156")}(e.alternate,e,Oi);return e.memoizedProps=e.pendingProps,null===t&&(t=Wi(e)),ki.current=null,t}function Vi(e,t){Ei&&i("243"),Ui(),Ei=!0;var n=wi.current;wi.current=la;var r=e.nextExpirationTimeToWorkOn;r===Oi&&e===Ci&&null!==Si||(Ai(),Oi=r,Si=$r((Ci=e).current,null),e.pendingCommitExpirationTime=0);for(var o=!1;;){try{if(t)for(;null!==Si&&!kl();)Si=Bi(Si);else for(;null!==Si;)Si=Bi(Si)}catch(t){if(Ia=Da=Na=null,Xo(),null===Si)o=!0,Pl(t);else{null===Si&&i("271");var a=Si,l=a.return;if(null!==l){e:{var u=e,s=l,c=a,d=t;if(l=Oi,c.effectTag|=1024,c.firstEffect=c.lastEffect=null,null!==d&&"object"==typeof d&&"function"==typeof d.then){var f=d;d=s;var p=-1,h=-1;do{if(13===d.tag){var m=d.alternate;if(null!==m&&null!==(m=m.memoizedState)){h=10*(1073741822-m.timedOutAt);break}"number"==typeof(m=d.pendingProps.maxDuration)&&(m<=0?p=0:(-1===p||m<p)&&(p=m))}d=d.return}while(null!==d);d=s;do{if((m=13===d.tag)&&(m=void 0!==d.memoizedProps.fallback&&null===d.memoizedState),m){if(null===(s=d.updateQueue)?((s=new Set).add(f),d.updateQueue=s):s.add(f),0==(1&d.mode)){d.effectTag|=64,c.effectTag&=-1957,1===c.tag&&(null===c.alternate?c.tag=17:((l=Ka(1073741823)).tag=Ba,Ya(c,l))),c.expirationTime=1073741823;break e}s=l;var v=(c=u).pingCache;null===v?(v=c.pingCache=new yi,m=new Set,v.set(f,m)):void 0===(m=v.get(f))&&(m=new Set,v.set(f,m)),m.has(s)||(m.add(s),c=qi.bind(null,c,f,s),f.then(c,c)),0<=(u=-1===p?1073741823:(-1===h&&(h=10*(1073741822-Zr(u,l))-5e3),h+p))&&Pi<u&&(Pi=u),d.effectTag|=2048,d.expirationTime=l;break e}d=d.return}while(null!==d);d=Error((it(c.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+lt(c))}Ti=!0,d=ni(d,c),u=s;do{switch(u.tag){case 3:u.effectTag|=2048,u.expirationTime=l,Xa(u,l=bi(u,d,l));break e;case 1:if(p=d,h=u.type,c=u.stateNode,0==(64&u.effectTag)&&("function"==typeof h.getDerivedStateFromError||null!==c&&"function"==typeof c.componentDidCatch&&(null===Ii||!Ii.has(c)))){u.effectTag|=2048,u.expirationTime=l,Xa(u,l=gi(u,p,l));break e}}u=u.return}while(null!==u)}Si=Wi(a);continue}o=!0,Pl(t)}}break}if(Ei=!1,wi.current=n,Ia=Da=Na=null,Xo(),o)Ci=null,e.finishedWork=null;else if(null!==Si)e.finishedWork=null;else{if(null===(n=e.current.alternate)&&i("281"),Ci=null,Ti){if(o=e.latestPendingTime,a=e.latestSuspendedTime,l=e.latestPingedTime,0!==o&&o<r||0!==a&&a<r||0!==l&&l<r)return Jr(e,r),void yl(e,n,r,e.expirationTime,-1);if(!e.didError&&t)return e.didError=!0,r=e.nextExpirationTimeToWorkOn=r,t=e.expirationTime=1073741823,void yl(e,n,r,t,-1)}t&&-1!==Pi?(Jr(e,r),(t=10*(1073741822-Zr(e,r)))<Pi&&(Pi=t),t=10*(1073741822-bl()),t=Pi-t,yl(e,n,r,e.expirationTime,t<0?0:t)):(e.pendingCommitExpirationTime=r,e.finishedWork=n)}}function Hi(e,t){for(var n=e.return;null!==n;){switch(n.tag){case 1:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ii||!Ii.has(r)))return Ya(n,e=gi(n,e=ni(t,e),1073741823)),void Gi(n,1073741823);break;case 3:return Ya(n,e=bi(n,e=ni(t,e),1073741823)),void Gi(n,1073741823)}n=n.return}3===e.tag&&(Ya(e,n=bi(e,n=ni(t,e),1073741823)),Gi(e,1073741823))}function $i(e,t){var n=a.unstable_getCurrentPriorityLevel(),r=void 0;if(0==(1&t.mode))r=1073741823;else if(Ei&&!ji)r=Oi;else{switch(n){case a.unstable_ImmediatePriority:r=1073741823;break;case a.unstable_UserBlockingPriority:r=1073741822-10*(1+((1073741822-e+15)/10|0));break;case a.unstable_NormalPriority:r=1073741822-25*(1+((1073741822-e+500)/25|0));break;case a.unstable_LowPriority:case a.unstable_IdlePriority:r=1;break;default:i("313")}null!==Ci&&r===Oi&&--r}return n===a.unstable_UserBlockingPriority&&(0===rl||r<rl)&&(rl=r),r}function qi(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),null!==Ci&&Oi===n?Ci=null:(t=e.earliestSuspendedTime,r=e.latestSuspendedTime,0!==t&&n<=t&&r<=n&&(e.didError=!1,(0===(t=e.latestPingedTime)||n<t)&&(e.latestPingedTime=n),eo(n,e),0!==(n=e.expirationTime)&&gl(e,n)))}function Ki(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return o}function Gi(e,t){null!==(e=Ki(e,t))&&(!Ei&&0!==Oi&&Oi<t&&Ai(),Qr(e,t),Ei&&!ji&&Ci===e||gl(e,e.expirationTime),fl<pl&&(pl=0,i("185")))}function Yi(e,t,n,r,o){return a.unstable_runWithPriority(a.unstable_ImmediatePriority,function(){return e(t,n,r,o)})}var Xi=null,Qi=null,Ji=0,Zi=void 0,el=!1,tl=null,nl=0,rl=0,ol=!1,al=null,il=!1,ll=!1,ul=null,sl=a.unstable_now(),cl=1073741822-(sl/10|0),dl=cl,fl=50,pl=0,hl=null;function ml(){cl=1073741822-((a.unstable_now()-sl)/10|0)}function vl(e,t){if(0!==Ji){if(t<Ji)return;null!==Zi&&a.unstable_cancelCallback(Zi)}Ji=t,e=a.unstable_now()-sl,Zi=a.unstable_scheduleCallback(_l,{timeout:10*(1073741822-t)-e})}function yl(e,t,n,r,o){e.expirationTime=r,0!==o||kl()?0<o&&(e.timeoutHandle=yr(function(e,t,n){e.pendingCommitExpirationTime=n,e.finishedWork=t,ml(),dl=cl,Sl(e,n)}.bind(null,e,t,n),o)):(e.pendingCommitExpirationTime=n,e.finishedWork=t)}function bl(){return el||(xl(),0!==nl&&1!==nl||(ml(),dl=cl)),dl}function gl(e,t){null===e.nextScheduledRoot?(e.expirationTime=t,null===Qi?(Xi=Qi=e,e.nextScheduledRoot=e):(Qi=Qi.nextScheduledRoot=e).nextScheduledRoot=Xi):t>e.expirationTime&&(e.expirationTime=t),el||(il?ll&&Cl(tl=e,nl=1073741823,!1):1073741823===t?El(1073741823,!1):vl(e,t))}function xl(){var e=0,t=null;if(null!==Qi)for(var n=Qi,r=Xi;null!==r;){var o=r.expirationTime;if(0===o){if((null===n||null===Qi)&&i("244"),r===r.nextScheduledRoot){Xi=Qi=r.nextScheduledRoot=null;break}if(r===Xi)Xi=o=r.nextScheduledRoot,Qi.nextScheduledRoot=o,r.nextScheduledRoot=null;else{if(r===Qi){(Qi=n).nextScheduledRoot=Xi,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if(e<o&&(e=o,t=r),r===Qi)break;if(1073741823===e)break;r=(n=r).nextScheduledRoot}}tl=t,nl=e}var wl=!1;function kl(){return!!wl||!!a.unstable_shouldYield()&&(wl=!0)}function _l(){try{if(!kl()&&null!==Xi){ml();var e=Xi;do{var t=e.expirationTime;0!==t&&cl<=t&&(e.nextExpirationTimeToWorkOn=cl),e=e.nextScheduledRoot}while(e!==Xi)}El(0,!0)}finally{wl=!1}}function El(e,t){if(xl(),t)for(ml(),dl=cl;null!==tl&&0!==nl&&e<=nl&&!(wl&&nl<cl);)Cl(tl,nl,nl<cl),xl(),ml(),dl=cl;else for(;null!==tl&&0!==nl&&e<=nl;)Cl(tl,nl,!1),xl();if(t&&(Ji=0,Zi=null),0!==nl&&vl(tl,nl),pl=0,(hl=null)!==ul)for(e=ul,ul=null,t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){ol||(ol=!0,al=e)}}if(ol)throw e=al,al=null,ol=!1,e}function Sl(e,t){el&&i("253"),Cl(tl=e,nl=t,!1),El(1073741823,!1)}function Cl(e,t,n){if(el&&i("245"),el=!0,n){var r=e.finishedWork;null!==r?Ol(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,br(r)),Vi(e,n),null!==(r=e.finishedWork)&&(kl()?e.finishedWork=r:Ol(e,r,t)))}else null!==(r=e.finishedWork)?Ol(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,br(r)),Vi(e,n),null!==(r=e.finishedWork)&&Ol(e,r,t));el=!1}function Ol(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime>=n&&(null===ul?ul=[r]:ul.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===hl?pl++:(hl=e,pl=0),a.unstable_runWithPriority(a.unstable_ImmediatePriority,function(){!function(e,t){ji=Ei=!0,e.current===t&&i("177");var n=e.pendingCommitExpirationTime;0===n&&i("261"),e.pendingCommitExpirationTime=0;var r,o,l=t.expirationTime,u=t.childExpirationTime;for(function(e,t){if(e.didError=!1,0===t)e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0;else{t<e.latestPingedTime&&(e.latestPingedTime=0);var n=e.latestPendingTime;0!==n&&(t<n?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(n=e.earliestSuspendedTime)?Qr(e,t):t<e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,Qr(e,t)):n<t&&Qr(e,t)}eo(0,e)}(e,l<u?u:l),ki.current=null,l=void 0,l=1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t).firstEffect:t:t.firstEffect,pr=_n,hr=function(){var e=In();if(An(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{t.nodeType,o.nodeType}catch(e){t=null;break e}var a=0,i=-1,l=-1,u=0,s=0,c=e,d=null;t:for(;;){for(var f;c!==t||0!==r&&3!==c.nodeType||(i=a+r),c!==o||0!==n&&3!==c.nodeType||(l=a+n),3===c.nodeType&&(a+=c.nodeValue.length),null!==(f=c.firstChild);)d=c,c=f;for(;;){if(c===e)break t;if(d===t&&++u===r&&(i=a),d===o&&++s===n&&(l=a),null!==(f=c.nextSibling))break;d=(c=d).parentNode}c=f}t=-1===i||-1===l?null:{start:i,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;return{focusedElem:e,selectionRange:t}}(),_n=!1,Mi=l;null!==Mi;){u=!1;var s=void 0;try{zi()}catch(e){u=!0,s=e}u&&(null===Mi&&i("178"),Hi(Mi,s),null!==Mi&&(Mi=Mi.nextEffect))}for(Mi=l;null!==Mi;){u=!1,s=void 0;try{Fi()}catch(e){u=!0,s=e}u&&(null===Mi&&i("178"),Hi(Mi,s),null!==Mi&&(Mi=Mi.nextEffect))}for(function(e){var t=In(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&An(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&r<a&&(o=r,r=a,a=o),o=Dn(n,a);var i=Dn(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),r<a?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}(hr),_n=!!pr,pr=hr=null,e.current=t,Mi=l;null!==Mi;){u=!1,s=void 0;try{Li(e,n)}catch(e){u=!0,s=e}u&&(null===Mi&&i("178"),Hi(Mi,s),null!==Mi&&(Mi=Mi.nextEffect))}if(null!==l&&null!==Ri){var c=function(e,t){Di=Ni=Ri=null;var n=el;el=!0;do{if(512&t.effectTag){var r=!1,o=void 0;try{var a=t;di(Ro,So,a),di(So,jo,a)}catch(e){r=!0,o=e}r&&Hi(t,o)}t=t.nextEffect}while(null!==t);el=n,0!==(n=e.expirationTime)&&gl(e,n),il||el||El(1073741823,!1)}.bind(null,e,l);Ni=a.unstable_runWithPriority(a.unstable_NormalPriority,function(){return gr(c)}),Di=c}Ei=ji=!1,"function"==typeof Lr&&Lr(t.stateNode),n=t.expirationTime,0===(t=(t=t.childExpirationTime)>n?t:n)&&(Ii=null),o=t,(r=e).expirationTime=o,r.finishedWork=null}(e,t)})}function Pl(e){null===tl&&i("246"),tl.expirationTime=0,ol||(ol=!0,al=e)}function Tl(e,t){if(il&&!ll){ll=!0;try{return e(t)}finally{ll=!1}}return e(t)}function Ml(e,t,n,r,o){var a=t.current;e:if(n){t:{2===en(n=n._reactInternalFiber)&&1===n.tag||i("170");var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(Rr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);i("171"),l=void 0}if(1===n.tag){var u=n.type;if(Rr(u)){n=Ar(n,u,l);break e}}n=l}else n=Or;return null===t.context?t.context=n:t.pendingContext=n,t=o,(o=Ka(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),Ui(),Ya(a,o),Gi(a,r),r}function jl(e,t,n,r){var o=t.current;return Ml(e,t,n,o=$i(bl(),o),r)}function Rl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Nl(e){var t=1073741822-25*(1+((1073741822-bl()+500)/25|0));_i<=t&&(t=_i-1),this._expirationTime=_i=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function Dl(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function Il(e,t,n){e={current:t=Vr(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function Al(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Fl(e,t,n,r,o){var a=n._reactRootContainer;if(a){if("function"==typeof o){var i=o;o=function(){var e=Rl(a._internalRoot);i.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Il(e,!1,t)}(n,r),"function"==typeof o){var l=o;o=function(){var e=Rl(a._internalRoot);l.call(e)}}Tl(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return Rl(a._internalRoot)}function zl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return Al(t)||i("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ke,key:null==r?null:""+r,children:e,containerInfo:t,implementation:null}}(e,t,null,n)}Se=function(e,t,n){switch(t){case"input":if(wt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=F(r);o||i("90"),Be(r),wt(r,o)}}}break;case"textarea":Yn(e,n);break;case"select":null!=(t=n.value)&&qn(e,!!n.multiple,t,!1)}},Nl.prototype.render=function(e){this._defer||i("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new Dl;return Ml(e,t,null,n,r._onCommit),r},Nl.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Nl.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||i("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,o=t;o!==this;)o=(r=o)._next;null===r&&i("251"),r._next=o._next,this._next=t,e.firstBatch=this}this._defer=!1,Sl(e,n),t=this._next,(this._next=null)!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},Nl.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},Dl.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Dl.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&i("191",n),n()}}},Il.prototype.render=function(e,t){var n=this._internalRoot,r=new Dl;return null!==(t=void 0===t?null:t)&&r.then(t),jl(e,n,null,r._onCommit),r},Il.prototype.unmount=function(e){var t=this._internalRoot,n=new Dl;return null!==(e=void 0===e?null:e)&&n.then(e),jl(null,t,null,n._onCommit),n},Il.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,o=new Dl;return null!==(n=void 0===n?null:n)&&o.then(n),jl(t,r,e,o._onCommit),o},Il.prototype.createBatch=function(){var e=new Nl(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)(n.firstBatch=e)._next=null;else{for(n=null;null!==r&&r._expirationTime>=t;)r=(n=r)._next;e._next=r,null!==n&&(n._next=e)}return e},Ne=function(){el||0===rl||(El(rl,!1),rl=0)};var Ll,Ul,Wl={createPortal:zl,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?i("188"):i("268",Object.keys(e))),null===(e=nn(t))?null:e.stateNode},hydrate:function(e,t,n){return Al(t)||i("200"),Fl(null,e,t,!0,n)},render:function(e,t,n){return Al(t)||i("200"),Fl(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return Al(n)||i("200"),(null==e||void 0===e._reactInternalFiber)&&i("38"),Fl(e,t,n,!1,r)},unmountComponentAtNode:function(e){return Al(e)||i("40"),!!e._reactRootContainer&&(Tl(function(){Fl(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return zl.apply(void 0,arguments)},unstable_batchedUpdates:je=function(e,t){var n=il;il=!0;try{return e(t)}finally{(il=n)||el||El(1073741823,!1)}},unstable_interactiveUpdates:Re=function(e,t,n){il||el||0===rl||(El(rl,!1),rl=0);var r=il;il=!0;try{return a.unstable_runWithPriority(a.unstable_UserBlockingPriority,function(){return e(t,n)})}finally{(il=r)||el||El(1073741823,!1)}},flushSync:function(e,t){el&&i("187");var n=il;il=!0;try{return Yi(e,t)}finally{il=n,El(1073741823,!1)}},unstable_createRoot:function(e,t){return Al(e)||i("299","unstable_createRoot"),new Il(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=il;il=!0;try{Yi(e)}finally{(il=t)||el||El(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[I,A,F,P.injectEventPluginsByName,y,V,function(e){S(e,B)},Te,Me,On,M]}};Ul=(Ll={findFiberByHostInstance:D,bundleType:0,version:"16.8.6",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{var n=t.inject(e);Lr=Wr(function(e){return t.onCommitFiberRoot(n,e)}),Ur=Wr(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}}}(o({},Ll,{overrideProps:null,currentDispatcherRef:Ve.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Ul?Ul(e):null}}));var Bl=Wl;e.exports=Bl.default||Bl},function(e,t,n){"use strict";e.exports=n(124)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=null,r=!1,o=3,a=-1,i=-1,l=!1,u=!1;function s(){if(!l){var e=n.expirationTime;u?_():u=!0,k(f,e)}}function c(){var e=n,t=n.next;if(n===t)n=null;else{var r=n.previous;n=r.next=t,t.previous=r}e.next=e.previous=null,r=e.callback,t=e.expirationTime,e=e.priorityLevel;var a=o,l=i;o=e,i=t;try{var u=r()}finally{o=a,i=l}if("function"==typeof u)if(u={callback:u,priorityLevel:e,expirationTime:t,next:null,previous:null},null===n)n=u.next=u.previous=u;else{r=null,e=n;do{if(e.expirationTime>=t){r=e;break}e=e.next}while(e!==n);null===r?r=n:r===n&&(n=u,s()),(t=r.previous).next=r.previous=u,u.next=r,u.previous=t}}function d(){if(-1===a&&null!==n&&1===n.priorityLevel){l=!0;try{for(;c(),null!==n&&1===n.priorityLevel;);}finally{l=!1,null!==n?s():u=!1}}}function f(e){l=!0;var o=r;r=e;try{if(e)for(;null!==n;){var a=t.unstable_now();if(!(n.expirationTime<=a))break;for(;c(),null!==n&&n.expirationTime<=a;);}else if(null!==n)for(;c(),null!==n&&!E(););}finally{l=!1,r=o,null!==n?s():u=!1,d()}}var p,h,m=Date,v="function"==typeof setTimeout?setTimeout:void 0,y="function"==typeof clearTimeout?clearTimeout:void 0,b="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,g="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function x(e){p=b(function(t){y(h),e(t)}),h=v(function(){g(p),e(t.unstable_now())},100)}if("object"==typeof performance&&"function"==typeof performance.now){var w=performance;t.unstable_now=function(){return w.now()}}else t.unstable_now=function(){return m.now()};var k,_,E,S=null;if("undefined"!=typeof window?S=window:void 0!==e&&(S=e),S&&S._schedMock){var C=S._schedMock;k=C[0],_=C[1],E=C[2],t.unstable_now=C[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var O=null,P=function(e){if(null!==O)try{O(e)}finally{O=null}};k=function(e){null!==O?setTimeout(k,0,e):(O=e,setTimeout(P,0,!1))},_=function(){O=null},E=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof b&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var T=null,M=!1,j=-1,R=!1,N=!1,D=0,I=33,A=33;E=function(){return D<=t.unstable_now()};var F=new MessageChannel,z=F.port2;F.port1.onmessage=function(){M=!1;var e=T,n=j;T=null,j=-1;var r=t.unstable_now(),o=!1;if(D-r<=0){if(!(-1!==n&&n<=r))return R||(R=!0,x(L)),T=e,void(j=n);o=!0}if(null!==e){N=!0;try{e(o)}finally{N=!1}}};var L=function e(t){if(null!==T){x(e);var n=t-D+A;n<A&&I<A?(n<8&&(n=8),A=n<I?I:n):I=n,D=t+A,M||(M=!0,z.postMessage(void 0))}else R=!1};k=function(e,t){T=e,j=t,N||t<0?z.postMessage(void 0):R||(R=!0,x(L))},_=function(){T=null,M=!1,j=-1}}t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=o,i=a;o=e,a=t.unstable_now();try{return n()}finally{o=r,a=i,d()}},t.unstable_next=function(e){switch(o){case 1:case 2:case 3:var n=3;break;default:n=o}var r=o,i=a;o=n,a=t.unstable_now();try{return e()}finally{o=r,a=i,d()}},t.unstable_scheduleCallback=function(e,r){var i=-1!==a?a:t.unstable_now();if("object"==typeof r&&null!==r&&"number"==typeof r.timeout)r=i+r.timeout;else switch(o){case 1:r=i+-1;break;case 2:r=i+250;break;case 5:r=i+1073741823;break;case 4:r=i+1e4;break;default:r=i+5e3}if(e={callback:e,priorityLevel:o,expirationTime:r,next:null,previous:null},null===n)n=e.next=e.previous=e,s();else{i=null;var l=n;do{if(l.expirationTime>r){i=l;break}l=l.next}while(l!==n);null===i?i=n:i===n&&(n=e,s()),(r=i.previous).next=i.previous=e,e.next=i,e.previous=r}return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)n=null;else{e===n&&(n=t);var r=e.previous;(r.next=t).previous=r}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var n=o;return function(){var r=o,i=a;o=n,a=t.unstable_now();try{return e.apply(this,arguments)}finally{o=r,a=i,d()}}},t.unstable_getCurrentPriorityLevel=function(){return o},t.unstable_shouldYield=function(){return!r&&(null!==n&&n.expirationTime<i||E())},t.unstable_continueExecution=function(){null!==n&&s()},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return n}}).call(this,n(26))},,function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{position:"relative",overflow:"hidden",height:4},colorPrimary:{backgroundColor:(0,d.lighten)(e.palette.primary.light,.6)},colorSecondary:{backgroundColor:(0,d.lighten)(e.palette.secondary.light,.4)},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"buffer 3s infinite linear",animationName:"$buffer"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat((0,d.lighten)(e.palette.primary.light,.6)," 0%, ").concat((0,d.lighten)(e.palette.primary.light,.6)," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0px -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat((0,d.lighten)(e.palette.secondary.light,.4)," 0%, ").concat((0,d.lighten)(e.palette.secondary.light,.6)," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0px -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"mui-indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite",animationName:"$mui-indeterminate1"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"mui-indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite",animationName:"$mui-indeterminate2",animationDelay:"1.15s"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes mui-indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes mui-indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0px -23px"},"50%":{opacity:0,backgroundPosition:"0px -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(r(n(15)),r(n(6))),d=n(35);function f(e){var t,n,r,o,c=e.classes,d=e.className,f=e.color,p=e.value,h=e.valueBuffer,m=e.variant,v=(0,l.default)(e,["classes","className","color","value","valueBuffer","variant"]),y=(0,s.default)(c.root,(t={},(0,i.default)(t,c.colorPrimary,"primary"===f),(0,i.default)(t,c.colorSecondary,"secondary"===f),(0,i.default)(t,c.determinate,"determinate"===m),(0,i.default)(t,c.indeterminate,"indeterminate"===m),(0,i.default)(t,c.buffer,"buffer"===m),(0,i.default)(t,c.query,"query"===m),t),d),b=(0,s.default)(c.dashed,(n={},(0,i.default)(n,c.dashedColorPrimary,"primary"===f),(0,i.default)(n,c.dashedColorSecondary,"secondary"===f),n)),g=(0,s.default)(c.bar,(r={},(0,i.default)(r,c.barColorPrimary,"primary"===f),(0,i.default)(r,c.barColorSecondary,"secondary"===f),(0,i.default)(r,c.bar1Indeterminate,"indeterminate"===m||"query"===m),(0,i.default)(r,c.bar1Determinate,"determinate"===m),(0,i.default)(r,c.bar1Buffer,"buffer"===m),r)),x=(0,s.default)(c.bar,(o={},(0,i.default)(o,c.barColorPrimary,"primary"===f&&"buffer"!==m),(0,i.default)(o,c.colorPrimary,"primary"===f&&"buffer"===m),(0,i.default)(o,c.barColorSecondary,"secondary"===f&&"buffer"!==m),(0,i.default)(o,c.colorSecondary,"secondary"===f&&"buffer"===m),(0,i.default)(o,c.bar2Indeterminate,"indeterminate"===m||"query"===m),(0,i.default)(o,c.bar2Buffer,"buffer"===m),o)),w={},k={bar1:{},bar2:{}};return"determinate"!==m&&"buffer"!==m||void 0!==p&&(w["aria-valuenow"]=Math.round(p),k.bar1.transform="scaleX(".concat(p/100,")")),"buffer"===m&&void 0!==h&&(k.bar2.transform="scaleX(".concat((h||0)/100,")")),u.default.createElement("div",(0,a.default)({className:y,role:"progressbar"},w,v),"buffer"===m?u.default.createElement("div",{className:b}):null,u.default.createElement("div",{className:g,style:k.bar1}),"determinate"===m?null:u.default.createElement("div",{className:x,style:k.bar2}))}t.styles=o,f.defaultProps={color:"primary",variant:"indeterminate"};var p=(0,c.default)(o,{name:"MuiLinearProgress"})(f);t.default=p},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(129);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case f:case i:case u:case l:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case s:return e;default:return t}}case v:case m:case a:return t}}}function b(e){return y(e)===f}t.typeOf=y,t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=a,t.Profiler=u,t.StrictMode=l,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===u||e===l||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p)},t.isAsyncMode=function(e){return b(e)||y(e)===d},t.isConcurrentMode=b,t.isContextConsumer=function(e){return y(e)===c},t.isContextProvider=function(e){return y(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return y(e)===p},t.isFragment=function(e){return y(e)===i},t.isLazy=function(e){return y(e)===v},t.isMemo=function(e){return y(e)===m},t.isPortal=function(e){return y(e)===a},t.isProfiler=function(e){return y(e)===u},t.isStrictMode=function(e){return y(e)===l},t.isSuspense=function(e){return y(e)===h}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.default=function e(t){var n=null;for(var o in t){var a=t[o],i=void 0===a?"undefined":r(a);if("function"===i)n||(n={}),n[o]=a;else if("object"===i&&null!==a&&!Array.isArray(a)){var l=e(a);l&&(n||(n={}),n[o]=l)}}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(28))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=(function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(l,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:"add",value:function(e,t){var n=this.sheets,r=this.refs,o=this.keys,a=n.indexOf(t);return-1!==a?a:(n.push(t),r.push(0),o.push(e),n.length-1)}},{key:"manage",value:function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:"unmanage",value:function(e){var t=this.keys.indexOf(e);-1!==t?0<this.refs[t]&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):(0,o.default)(!1,"SheetsManager: can't find sheet to unmanage")}},{key:"size",get:function(){return this.keys.length}}]),l);function l(){!function(e,t){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}(this),this.sheets=[],this.refs=[],this.keys=[]}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.default=function e(t){if(null==t)return t;var n=void 0===t?"undefined":r(t);if("string"===n||"number"===n||"function"===n)return t;if(i(t))return t.map(e);if((0,a.default)(t))return t;var o={};for(var l in t){var u=t[l];"object"!==(void 0===u?"undefined":r(u))?o[l]=u:o[l]=e(u)}return o};var o,a=(o=n(75))&&o.__esModule?o:{default:o},i=Array.isArray},function(e,t,n){"use strict";n.r(t),function(e,r){var o,a=n(101);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var i=Object(a.a)(o);t.default=i}.call(this,n(26),n(136)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),e.CSS,t.default=function(e){return e}}).call(this,n(26))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n="2f1acc6c3a606b082e5eef5e54414ffb";null==e[n]&&(e[n]=0),t.default=e[n]++}).call(this,n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=b(n(41)),i=b(n(78)),l=b(n(140)),u=b(n(141)),s=b(n(147)),c=b(n(148)),d=b(n(50)),f=b(n(29)),p=b(n(77)),h=b(n(40)),m=b(n(149)),v=b(n(150));function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e){return e&&e.__esModule?e:{default:e}}var g=u.default.concat([s.default,c.default]),x=0,w=(function(e,t,n){t&&y(e.prototype,t),n&&y(e,n)}(k,[{key:"setup",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?v.default:m.default)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:"createStyleSheet",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.index;"number"!=typeof n&&(n=0===d.default.index?0:d.default.index+1);var r=new i.default(e,o({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:"removeStyleSheet",value:function(e){return e.detach(),d.default.remove(e),this}},{key:"createRule",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===e?"undefined":r(e))&&(n=t,t=e,e=void 0);var o=n;o.jss=this,o.Renderer=this.options.Renderer,o.generateClassName||(o.generateClassName=this.generateClassName),o.classes||(o.classes={});var a=(0,h.default)(e,t,o);return!o.selector&&a instanceof f.default&&(a.selector="."+o.generateClassName(a)),this.plugins.onProcessRule(a),a}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))}),this}}]),k);function k(e){!function(e,t){if(!(e instanceof k))throw new TypeError("Cannot call a class as a function")}(this),this.id=x++,this.version="9.8.7",this.plugins=new l.default,this.options={createGenerateClassName:p.default,Renderer:a.default?m.default:v.default,plugins:[]},this.generateClassName=(0,p.default)(),this.use.apply(this,g),this.setup(e)}t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(28))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=(function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(l,[{key:"onCreateRule",value:function(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var o=this.hooks.onCreateRule[r](e,t,n);if(o)return o}return null}},{key:"onProcessRule",value:function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:"onProcessStyle",value:function(e,t,n){for(var r=e,o=0;o<this.hooks.onProcessStyle.length;o++)r=this.hooks.onProcessStyle[o](r,t,n),t.style=r}},{key:"onProcessSheet",value:function(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:"onUpdate",value:function(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:"onChangeValue",value:function(e,t,n){for(var r=e,o=0;o<this.hooks.onChangeValue.length;o++)r=this.hooks.onChangeValue[o](r,t,n);return r}},{key:"use",value:function(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):(0,o.default)(!1,'[JSS] Unknown hook "%s".',t)}}]),l);function l(){!function(e,t){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}(this),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(142)),o=u(n(143)),a=u(n(144)),i=u(n(145)),l=u(n(146));function u(e){return e&&e.__esModule?e:{default:e}}var s={"@charset":r.default,"@import":r.default,"@namespace":r.default,"@keyframes":o.default,"@media":a.default,"@supports":a.default,"@font-face":i.default,"@viewport":l.default,"@-ms-viewport":l.default},c=Object.keys(s).map(function(e){var t=new RegExp("^"+e),n=s[e];return{onCreateRule:function(e,r,o){return t.test(e)?new n(e,r,o):null}}});t.default=c},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=(function(e,t,n){t&&r(e.prototype,t)}(a,[{key:"toString",value:function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"}}]),a);function a(e,t,n){!function(e,t){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this),this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=(r=n(34))&&r.__esModule?r:{default:r};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=(function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(u,[{key:"toString",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+="\n"),this.key+" {\n"+t+"}"}}]),u);function u(e,t,n){for(var r in function(e,t){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}(this),this.type="keyframes",this.isProcessed=!1,this.key=e,this.options=n,this.rules=new a.default(o({},n,{parent:this})),t)this.rules.add(r,t[r],o({},this.options,{parent:this,selector:r}));this.rules.process()}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=(r=n(34))&&r.__esModule?r:{default:r};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=(function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(u,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"toString",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""}}]),u);function u(e,t,n){for(var r in function(e,t){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}(this),this.type="conditional",this.isProcessed=!1,this.key=e,this.options=n,this.rules=new a.default(o({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(49))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=(function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(l,[{key:"toString",value:function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=(0,o.default)(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return(0,o.default)(this.key,this.style,e)}}]),l);function l(e,t,n){!function(e,t){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}(this),this.type="font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(49))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=(function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(l,[{key:"toString",value:function(e){return(0,o.default)(this.key,this.style,e)}}]),l);function l(e,t,n){!function(e,t){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}(this),this.type="viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(29)),o=i(n(40)),a=i(n(75));function i(e){return e&&e.__esModule?e:{default:e}}t.default={onCreateRule:function(e,t,n){if(!(0,a.default)(t))return null;var r=t,i=(0,o.default)(e,{},n);return r.subscribe(function(e){for(var t in e)i.prop(t,e[t])}),i},onProcessRule:function(e){if(e instanceof r.default){var t=e,n=t.style,o=function(e){var r=n[e];if(!(0,a.default)(r))return"continue";delete n[e],r.subscribe({next:function(n){t.prop(e,n)}})};for(var i in n)o(i)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(34)),o=i(n(29)),a=i(n(40));function i(e){return e&&e.__esModule?e:{default:e}}var l=Date.now(),u="fnValues"+l,s="fnStyle"+ ++l;t.default={onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=(0,a.default)(e,{},n);return r[s]=t,r},onProcessStyle:function(e,t){var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return(t=t)[u]=n,e},onUpdate:function(e,t){if(t.rules instanceof r.default)t.rules.update(e);else if(t instanceof o.default){if((t=t)[u])for(var n in t[u])t.prop(n,t[u][n](e));var a=(t=t)[s];if(a){var i=a(e);for(var l in i)t.prop(l,i[l])}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(28)),o=u(n(50)),a=u(n(29)),i=u(n(39));function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=void 0;return function(){return t||(t=e()),t}}function c(e,t){try{return e.style.getPropertyValue(t)}catch(e){return""}}function d(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=(0,i.default)(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}function f(e,t){try{e.style.removeProperty(t)}catch(e){(0,r.default)(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}function p(e){if(1===e.type)return e.selectorText;if(7!==e.type)return h(e.cssText);var t=e.name;if(t)return"@keyframes "+t;var n=e.cssText;return"@"+h(n,n.indexOf("keyframes"))}function h(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf("{")-1)}function m(e,t){return e.selectorText=t,e.selectorText===t}var v,y,b=s(function(){return document.head||document.getElementsByTagName("head")[0]}),g=(v=void 0,y=!1,function(e){var t={};v||(v=document.createElement("style"));for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof a.default){var o=r.selector;if(o&&-1!==o.indexOf("\\")){y||(b().appendChild(v),y=!0),v.textContent=o+" {}";var i=v.sheet;if(i){var l=i.cssRules;l&&(t[l[0].selectorText]=r.key)}}}}return y&&(b().removeChild(v),y=!1),t}),x=s(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),w=(function(e,t,n){t&&l(e.prototype,t),n&&l(e,n)}(k,[{key:"attach",value:function(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function(e,t){var n=t.insertionPoint,a=function(e){var t=o.default.registry;if(0<t.length){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function(e,t){for(var n=e.length-1;0<=n;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var a=e.insertionPoint;if(a&&"string"==typeof a){var i=function(e){for(var t=b(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(a);if(i)return i.nextSibling;(0,r.default)("jss"===a,'[JSS] Insertion point "%s" not found.',a)}return null}(t);if(a){var i=a.parentNode;i&&i.insertBefore(e,a)}else if(n&&"number"==typeof n.nodeType){var l=n,u=l.parentNode;u?u.insertBefore(e,l.nextSibling):(0,r.default)(!1,"[JSS] Insertion point is not in the DOM.")}else b().insertBefore(e,a)}(this.element,this.sheet.options))}},{key:"detach",value:function(){this.element.parentNode.removeChild(this.element)}},{key:"deploy",value:function(){this.sheet&&(this.element.textContent="\n"+this.sheet.toString()+"\n")}},{key:"insertRule",value:function(e,t){var n=this.element.sheet,o=n.cssRules,a=e.toString();if(t||(t=o.length),!a)return!1;try{n.insertRule(a,t)}catch(t){return(0,r.default)(!1,"[JSS] Can not insert an unsupported rule \n\r%s",e),!1}return this.hasInsertedRules=!0,o[t]}},{key:"deleteRule",value:function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:"indexOf",value:function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:"replaceRule",value:function(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:"getRules",value:function(){return this.element.sheet.cssRules}}]),k);function k(e){!function(e,t){if(!(e instanceof k))throw new TypeError("Cannot call a class as a function")}(this),this.getPropertyValue=c,this.setProperty=d,this.removeProperty=f,this.setSelector=m,this.getKey=p,this.getUnescapedKeysMap=g,this.hasInsertedRules=!1,e&&o.default.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,a=t.element;this.element=a||document.createElement("style"),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=x();i&&this.element.setAttribute("nonce",i)}t.default=w},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var o=(function(e,t,n){t&&r(e.prototype,t)}(a,[{key:"setProperty",value:function(){return!0}},{key:"getPropertyValue",value:function(){return""}},{key:"removeProperty",value:function(){}},{key:"setSelector",value:function(){return!0}},{key:"getKey",value:function(){return""}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"deploy",value:function(){}},{key:"insertRule",value:function(){return!1}},{key:"deleteRule",value:function(){return!0}},{key:"replaceRule",value:function(){return!1}},{key:"getRules",value:function(){}},{key:"indexOf",value:function(){return-1}}]),a);function a(){!function(e,t){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this)}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={jss:"64a55d578f856d258dc345b094a2a2b3",sheetsRegistry:"d4bd0baacbc52bbd48bbb9eb24344ecd",sheetOptions:"6fc570d6bd61383819d0f9e7407c452d"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.default=function(){return{onCreateRule:function(e,t,n){if(e===u)return new c(e,t,n);if("@"===e[0]&&e.substr(0,s.length)===s)return new d(e,t,n);var r=n.parent;return r&&("global"!==r.type&&"global"!==r.options.parent.type||(n.global=!0)),n.global&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,o=n[u];if(o){for(var a in o)t.sheet.addRule(a,o[a],r({},t,{selector:m(a,e.selector)}));delete n[u]}}(e),function(e){var t=e.options,n=e.style;for(var o in n)if(o.substr(0,u.length)===u){var a=m(o.substr(u.length),e.selector);t.sheet.addRule(a,n[o],r({},t,{selector:a})),delete n[o]}}(e))}}};var i=n(73);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u="@global",s="@global ",c=(o(h,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"toString",value:function(){return this.rules.toString()}}]),h),d=(o(p,[{key:"toString",value:function(e){return this.rule.toString(e)}}]),p),f=/\s*,\s*/g;function p(e,t,n){l(this,p),this.name=e,this.options=n;var o=e.substr(s.length);this.rule=n.jss.createRule(o,t,r({},n,{parent:this,selector:o}))}function h(e,t,n){for(var o in l(this,h),this.type="global",this.key=e,this.options=n,this.rules=new i.RuleList(r({},n,{parent:this})),t)this.rules.add(o,t[o],{selector:o});this.rules.process()}function m(e,t){for(var n=e.split(f),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(){function e(e){return function(t,n){var r=e.getRule(n);return r?r.selector:((0,a.default)(!1,"[JSS] Could not find the referenced rule %s in %s.",n,e.options.meta||e),n)}}var t=function(e){return-1!==e.indexOf("&")};function n(e,n){for(var r=n.split(i),o=e.split(i),a="",u=0;u<r.length;u++)for(var s=r[u],c=0;c<o.length;c++){var d=o[c];a&&(a+=", "),a+=t(d)?d.replace(l,s):s+" "+d}return a}function o(e,t,n){if(n)return r({},n,{index:n.index+1});var o=e.options.nestingLevel;return o=void 0===o?1:o+1,r({},e.options,{nestingLevel:o,index:t.indexOf(e)+1})}return{onProcessStyle:function(a,i){if("style"!==i.type)return a;var l=i.options.parent,s=void 0,c=void 0;for(var d in a){var f=t(d),p="@"===d[0];if(f||p){if(s=o(i,l,s),f){var h=n(d,i.selector);c||(c=e(l)),h=h.replace(u,c),l.addRule(h,a[d],r({},s,{selector:h}))}else p&&l.addRule(d,null,s).addRule(i.key,a[d],{selector:i.selector});delete a[d]}}return a}}};var o,a=(o=n(154))&&o.__esModule?o:{default:o},i=/\s*,\s*/g,l=/&/g,u=/\$([\w-]+)/g},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=a(e[t]);return e}return a(e)},onChangeValue:function(e,t,n){var r=(0,o.default)(t);return t===r?e:(n.prop(r,e),null)}}};var r,o=(r=n(156))&&r.__esModule?r:{default:r};function a(e){var t={};for(var n in e)t[(0,o.default)(n)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(a):t.fallbacks=a(e.fallbacks)),t}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,o=/^ms-/,a={};function i(e){return"-"+e.toLowerCase()}t.default=function(e){if(a.hasOwnProperty(e))return a[e];var t=e.replace(r,i);return a[e]=o.test(t)?"-"+t:t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o="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};function a(e){function t(e){return e[1].toUpperCase()}var n=/(-[a-z])/g,r={};for(var o in e)r[o]=e[o],r[o.replace(n,t)]=e[o];return r}t.default=function(){var e=a(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r in t)t[r]=l(r,t[r],e);return t},onChangeValue:function(t,n){return l(n,t,e)}}};var i=a(((r=n(158))&&r.__esModule?r:{default:r}).default);function l(e,t,n){if(!t)return t;var r=t,a=void 0===t?"undefined":o(t);switch("object"===a&&Array.isArray(t)&&(a="array"),a){case"object":if("fallbacks"===e){for(var u in t)t[u]=l(u,t[u],n);break}for(var s in t)t[s]=l(e+"-"+s,t[s],n);break;case"array":for(var c=0;c<t.length;c++)t[c]=l(e,t[c],n);break;case"number":0!==t&&(r=t+(n[e]||i[e]||""))}return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"animation-delay":"ms","animation-duration":"ms","background-position":"px","background-position-x":"px","background-position-y":"px","background-size":"px",border:"px","border-bottom":"px","border-bottom-left-radius":"px","border-bottom-right-radius":"px","border-bottom-width":"px","border-left":"px","border-left-width":"px","border-radius":"px","border-right":"px","border-right-width":"px","border-spacing":"px","border-top":"px","border-top-left-radius":"px","border-top-right-radius":"px","border-top-width":"px","border-width":"px","border-after-width":"px","border-before-width":"px","border-end-width":"px","border-horizontal-spacing":"px","border-start-width":"px","border-vertical-spacing":"px",bottom:"px","box-shadow":"px","column-gap":"px","column-rule":"px","column-rule-width":"px","column-width":"px","flex-basis":"px","font-size":"px","font-size-delta":"px",height:"px",left:"px","letter-spacing":"px","logical-height":"px","logical-width":"px",margin:"px","margin-after":"px","margin-before":"px","margin-bottom":"px","margin-left":"px","margin-right":"px","margin-top":"px","max-height":"px","max-width":"px","margin-end":"px","margin-start":"px","mask-position-x":"px","mask-position-y":"px","mask-size":"px","max-logical-height":"px","max-logical-width":"px","min-height":"px","min-width":"px","min-logical-height":"px","min-logical-width":"px",motion:"px","motion-offset":"px",outline:"px","outline-offset":"px","outline-width":"px",padding:"px","padding-bottom":"px","padding-left":"px","padding-right":"px","padding-top":"px","padding-after":"px","padding-before":"px","padding-end":"px","padding-start":"px","perspective-origin-x":"%","perspective-origin-y":"%",perspective:"px",right:"px","shape-margin":"px",size:"px","text-indent":"px","text-stroke":"px","text-stroke-width":"px",top:"px","transform-origin":"%","transform-origin-x":"%","transform-origin-y":"%","transform-origin-z":"%","transition-delay":"ms","transition-duration":"ms","vertical-align":"px",width:"px","word-spacing":"px","box-shadow-x":"px","box-shadow-y":"px","box-shadow-blur":"px","box-shadow-spread":"px","font-line-height":"px","text-shadow-x":"px","text-shadow-y":"px","text-shadow-blur":"px"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{onProcessRule:function(e){"keyframes"===e.type&&(e.key="@"+r.prefix.css+e.key.substr(1))},onProcessStyle:function(e,t){if("style"!==t.type)return e;for(var n in e){var o=e[n],a=!1,i=r.supportedProperty(n);i&&i!==n&&(a=!0);var l=!1,u=r.supportedValue(i,o);u&&u!==o&&(l=!0),(a||l)&&(a&&delete e[n],e[i||n]=u||o)}return e},onChangeValue:function(e,t){return r.supportedValue(t,e)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(160))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportedValue=t.supportedProperty=t.prefix=void 0;var r=i(n(51)),o=i(n(161)),a=i(n(163));function i(e){return e&&e.__esModule?e:{default:e}}t.default={prefix:r.default,supportedProperty:o.default,supportedValue:a.default},t.prefix=r.default,t.supportedProperty=o.default,t.supportedValue=a.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return l?(null!=u[e]||((0,a.default)(e)in l.style?u[e]=e:o.default.js+(0,a.default)("-"+e)in l.style?u[e]=o.default.css+e:u[e]=!1),u[e]):e};var r=i(n(41)),o=i(n(51)),a=i(n(162));function i(e){return e&&e.__esModule?e:{default:e}}var l=void 0,u={};if(r.default){l=document.createElement("p");var s=window.getComputedStyle(document.documentElement,"");for(var c in s)isNaN(c)||(u[s[c]]=s[c])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(r,o)};var r=/[-\s]+(.)?/g;function o(e,t){return t?t.toUpperCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!l)return t;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=e+t;if(null!=i[n])return i[n];try{l.style[e]=t}catch(e){return i[n]=!1}return""!==l.style[e]?i[n]=t:("-ms-flex"===(t=o.default.css+t)&&(t="-ms-flexbox"),l.style[e]=t,""!==l.style[e]&&(i[n]=t)),i[n]||(i[n]=!1),l.style[e]="",i[n]};var r=a(n(41)),o=a(n(51));function a(e){return e&&e.__esModule?e:{default:e}}var i={},l=void 0;r.default&&(l=document.createElement("p"))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){function e(e,t){return e.length-t.length}return{onProcessStyle:function(t,n){if("style"!==n.type)return t;var r={},o=Object.keys(t).sort(e);for(var a in o)r[o[a]]=t[o[a]];return r}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}};t.default=r},function(e,t,n){"use strict";var r=n(167);function o(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")}},function(e,t,n){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,l=void 0===r?"px":r,u=e.step,s=void 0===u?5:u,c=(0,a.default)(e,["values","unit","step"]);function d(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(l,")")}function f(e,t){var r=i.indexOf(t)+1;return r===i.length?d(e):"@media (min-width:".concat(n[e]).concat(l,") and ")+"(max-width:".concat(n[i[r]]-s/100).concat(l,")")}return(0,o.default)({keys:i,values:n,up:d,down:function(e){var t=i.indexOf(e)+1,r=n[i[t]];return t===i.length?d("xs"):"@media (max-width:".concat(("number"==typeof r&&0<t?r:e)-s/100).concat(l,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},c)},t.keys=void 0;var o=r(n(4)),a=r(n(5)),i=["xs","sm","md","lg","xl"];t.keys=i},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r;return(0,a.default)({gutters:function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return(0,a.default)({paddingLeft:2*t.unit,paddingRight:2*t.unit},n,(0,o.default)({},e.up("sm"),(0,a.default)({paddingLeft:3*t.unit,paddingRight:3*t.unit},n[e.up("sm")])))},toolbar:(r={minHeight:56},(0,o.default)(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,o.default)(r,e.up("sm"),{minHeight:64}),r)},n)};var o=r(n(9)),a=r(n(4))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.primary,n=void 0===t?{light:l.default[300],main:l.default[500],dark:l.default[700]}:t,r=e.secondary,v=void 0===r?{light:u.default.A200,main:u.default.A400,dark:u.default.A700}:r,y=e.error,b=void 0===y?{light:c.default[300],main:c.default[500],dark:c.default[700]}:y,g=e.type,x=void 0===g?"light":g,w=e.contrastThreshold,k=void 0===w?3:w,_=e.tonalOffset,E=void 0===_?.2:_,S=(0,a.default)(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function C(e){return(0,f.getContrastRatio)(e,h.text.primary)>=k?h.text.primary:p.text.primary}function O(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:500,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:300,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:700;return!e.main&&e[t]&&(e.main=e[t]),m(e,"light",n,E),m(e,"dark",r,E),e.contrastText||(e.contrastText=C(e.main)),e}O(n),O(v,"A400","A200","A700"),O(b);var P={dark:h,light:p};return(0,i.default)((0,o.default)({common:d.default,type:x,primary:n,secondary:v,error:b,grey:s.default,contrastThreshold:k,getContrastText:C,augmentColor:O,tonalOffset:E},P[x]),S,{clone:!1})},t.dark=t.light=void 0;var o=r(n(4)),a=r(n(5)),i=(r(n(15)),r(n(42))),l=r(n(171)),u=r(n(172)),s=r(n(173)),c=r(n(174)),d=r(n(175)),f=n(35),p={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.default.white,default:s.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}};t.light=p;var h={text:{primary:d.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:s.default[800],default:"#303030"},action:{active:d.default.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function m(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,f.lighten)(e.main,r):"dark"===t&&(e.dark=(0,f.darken)(e.main,1.5*r)))}t.dark=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={black:"#000",white:"#fff"}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){function n(e){return"".concat(e/_*P,"rem")}function r(t,r,a,i,l){return(0,o.default)({color:e.text.primary,fontFamily:p,fontWeight:t,fontSize:n(r),lineHeight:a},p===c?{letterSpacing:"".concat(u(i/r),"em")}:{},l,C)}var d="function"==typeof t?t(e):t,f=d.fontFamily,p=void 0===f?c:f,h=d.fontSize,m=void 0===h?14:h,v=d.fontWeightLight,y=void 0===v?300:v,b=d.fontWeightRegular,g=void 0===b?400:b,x=d.fontWeightMedium,w=void 0===x?500:x,k=d.htmlFontSize,_=void 0===k?16:k,E=d.useNextVariants,S=void 0===E?Boolean(l.ponyfillGlobal.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__):E,C=(d.suppressWarning,d.allVariants),O=(0,a.default)(d,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","htmlFontSize","useNextVariants","suppressWarning","allVariants"]),P=m/14,T={h1:r(y,96,1,-1.5),h2:r(y,60,1,-.5),h3:r(g,48,1.04,0),h4:r(g,34,1.17,.25),h5:r(g,24,1.33,0),h6:r(w,20,1.6,.15),subtitle1:r(g,16,1.75,.15),subtitle2:r(w,14,1.57,.1),body1Next:r(g,16,1.5,.15),body2Next:r(g,14,1.5,.15),buttonNext:r(w,14,1.75,.4,s),captionNext:r(g,12,1.66,.4),overline:r(g,12,2.66,1,s)},M={display4:(0,o.default)({fontSize:n(112),fontWeight:y,fontFamily:p,letterSpacing:"-.04em",lineHeight:"".concat(u(128/112),"em"),marginLeft:"-.04em",color:e.text.secondary},C),display3:(0,o.default)({fontSize:n(56),fontWeight:g,fontFamily:p,letterSpacing:"-.02em",lineHeight:"".concat(u(73/56),"em"),marginLeft:"-.02em",color:e.text.secondary},C),display2:(0,o.default)({fontSize:n(45),fontWeight:g,fontFamily:p,lineHeight:"".concat(u(51/45),"em"),marginLeft:"-.02em",color:e.text.secondary},C),display1:(0,o.default)({fontSize:n(34),fontWeight:g,fontFamily:p,lineHeight:"".concat(u(41/34),"em"),color:e.text.secondary},C),headline:(0,o.default)({fontSize:n(24),fontWeight:g,fontFamily:p,lineHeight:"".concat(u(32.5/24),"em"),color:e.text.primary},C),title:(0,o.default)({fontSize:n(21),fontWeight:w,fontFamily:p,lineHeight:"".concat(u(24.5/21),"em"),color:e.text.primary},C),subheading:(0,o.default)({fontSize:n(16),fontWeight:g,fontFamily:p,lineHeight:"".concat(u(1.5),"em"),color:e.text.primary},C),body2:(0,o.default)({fontSize:n(14),fontWeight:w,fontFamily:p,lineHeight:"".concat(u(24/14),"em"),color:e.text.primary},C),body1:(0,o.default)({fontSize:n(14),fontWeight:g,fontFamily:p,lineHeight:"".concat(u(20.5/14),"em"),color:e.text.primary},C),caption:(0,o.default)({fontSize:n(12),fontWeight:g,fontFamily:p,lineHeight:"".concat(u(1.375),"em"),color:e.text.secondary},C),button:(0,o.default)({fontSize:n(14),textTransform:"uppercase",fontWeight:w,fontFamily:p,color:e.text.primary},C)};return(0,i.default)((0,o.default)({pxToRem:n,round:u,fontFamily:p,fontSize:m,fontWeightLight:y,fontWeightRegular:g,fontWeightMedium:w},M,T,S?{body1:T.body1Next,body2:T.body2Next,button:T.buttonNext,caption:T.captionNext}:{},{useNextVariants:S}),O,{clone:!1})};var o=r(n(4)),a=r(n(5)),i=r(n(42)),l=(r(n(15)),n(8));function u(e){return Math.round(1e5*e)/1e5}var s={textTransform:"uppercase"},c='"Roboto", "Helvetica", "Arial", sans-serif'},function(e,t,n){"use strict";function r(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=["none",r(0,1,3,0,0,1,1,0,0,2,1,-1),r(0,1,5,0,0,2,2,0,0,3,1,-2),r(0,1,8,0,0,3,4,0,0,3,3,-2),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)];t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={borderRadius:4}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={unit:8}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={mobileStepper:1e3,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),a=(r(n(27)),r(n(15)),r(n(42)));function i(e,t){return t}t.default=function(e){var t="function"==typeof e;return{create:function(n,r){var l=t?e(n):e;if(!r||!n.overrides||!n.overrides[r])return l;var u=n.overrides[r],s=(0,o.default)({},l);return Object.keys(u).forEach(function(e){s[e]=(0,a.default)(s[e],u[e],{arrayMerge:i})}),s},options:{},themingEnabled:t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e){var t=e.theme,n=e.name,r=e.props;if(!t.props||!n||!t.props[n])return r;var o,a=t.props[n];for(o in a)void 0===r[o]&&(r[o]=a[o]);return r}},function(e,t,n){"use strict";var r=n(184),o=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MuiThemeProviderOld=void 0;var a,i=o(n(4)),l=o(n(9)),u=o(n(10)),s=o(n(11)),c=o(n(12)),d=o(n(13)),f=o(n(14)),p=o(n(1)),h=o(n(3)),m=(o(n(15)),o(n(185))),v=n(8),y=r(n(53)),b=(a=p.default.Component,(0,f.default)(g,a),(0,s.default)(g,[{key:"getChildContext",value:function(){var e,t=this.props,n=t.disableStylesGeneration,r=t.sheetsCache,o=t.sheetsManager,a=this.context.muiThemeProviderOptions||{};return void 0!==n&&(a.disableStylesGeneration=n),void 0!==r&&(a.sheetsCache=r),void 0!==o&&(a.sheetsManager=o),e={},(0,l.default)(e,y.CHANNEL,this.broadcast),(0,l.default)(e,"muiThemeProviderOptions",a),e}},{key:"componentDidMount",value:function(){var e=this;this.unsubscribeId=y.default.subscribe(this.context,function(t){e.outerTheme=t,e.broadcast.setState(e.mergeOuterLocalTheme(e.props.theme))})}},{key:"componentDidUpdate",value:function(e){this.props.theme!==e.theme&&this.broadcast.setState(this.mergeOuterLocalTheme(this.props.theme))}},{key:"componentWillUnmount",value:function(){null!==this.unsubscribeId&&y.default.unsubscribe(this.context,this.unsubscribeId)}},{key:"mergeOuterLocalTheme",value:function(e){return"function"==typeof e?e(this.outerTheme):this.outerTheme?(0,i.default)({},this.outerTheme,e):e}},{key:"render",value:function(){return this.props.children}}]),g);function g(e,t){var n;return(0,u.default)(this,g),(n=(0,c.default)(this,(0,d.default)(g).call(this))).broadcast=(0,m.default)(),n.outerTheme=y.default.initial(t),n.broadcast.setState(n.mergeOuterLocalTheme(e.theme)),n}(t.MuiThemeProviderOld=b).childContextTypes=(0,i.default)({},y.default.contextTypes,{muiThemeProviderOptions:h.default.object}),b.contextTypes=(0,i.default)({},y.default.contextTypes,{muiThemeProviderOptions:h.default.object}),v.ponyfillGlobal.__MUI_STYLES__||(v.ponyfillGlobal.__MUI_STYLES__={}),v.ponyfillGlobal.__MUI_STYLES__.MuiThemeProvider||(v.ponyfillGlobal.__MUI_STYLES__.MuiThemeProvider=b);var x=v.ponyfillGlobal.__MUI_STYLES__.MuiThemeProvider;t.default=x},function(e,t){e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}},function(e,t,n){"use strict";n.r(t),t.default=function(e){var t={},n=1,r=e;return{getState:function(){return r},setState:function(e){r=e;for(var n=Object.keys(t),o=0,a=n.length;o<a;o++)t[n[o]]&&t[n[o]](e)},subscribe:function(e){if("function"!=typeof e)throw new Error("listener must be a function.");var r=n;return t[r]=e,n+=1,r},unsubscribe:function(e){t[e]=void 0}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e}},function(e,t,n){"use strict";n.r(t),function(e){function n(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t;function t(){this.__entries__=[]}}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),i="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},l=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,s=(f.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},f.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},f.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},f.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),0<e.length},f.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},f.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},f.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;l.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},f.getInstance=function(){return this.instance_||(this.instance_=new f),this.instance_},f.instance_=null,f),c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},d=v(0,0,0,0);function f(){function e(){a&&(a=!1,r()),l&&n()}function t(){i(e)}function n(){var e=Date.now();if(a){if(e-u<2)return;l=!0}else l=!(a=!0),setTimeout(t,o);u=e}var r,o,a,l,u;this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(r=this.refresh.bind(this),l=a=!(o=20),u=0,n)}function p(e){return parseFloat(e)||0}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+p(e["border-"+n+"-width"])},0)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var y=(_.prototype.isActive=function(){var e=function(e){return o?m(e)?v(0,0,(t=e.getBBox()).width,t.height):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return d;var r=c(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],a=e["padding-"+o];t[o]=p(a)}return t}(r),a=o.left+o.right,i=o.top+o.bottom,l=p(r.width),u=p(r.height);if("border-box"===r.boxSizing&&(Math.round(l+a)!==t&&(l-=h(r,"left","right")+a),Math.round(u+i)!==n&&(u-=h(r,"top","bottom")+i)),e!==c(e).document.documentElement){var s=Math.round(l+a)-t,f=Math.round(u+i)-n;1!==Math.abs(s)&&(l-=s),1!==Math.abs(f)&&(u-=f)}return v(o.left,o.top,l,u)}(e):d;var t}(this.target);return(this.contentRect_=e).width!==this.broadcastWidth||e.height!==this.broadcastHeight},_.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},_),b=function(e,t){var r,o,a,i,l,u,s,c=(o=(r=t).x,a=r.y,i=r.width,l=r.height,u="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,n(s=Object.create(u.prototype),{x:o,y:a,width:i,height:l,top:a,right:o+i,bottom:l+a,left:o}),s);n(this,{target:e,contentRect:c})},g=(k.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},k.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},k.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},k.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},k.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new b(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},k.prototype.clearActive=function(){this.activeObservations_.splice(0)},k.prototype.hasActive=function(){return 0<this.activeObservations_.length},k),x="undefined"!=typeof WeakMap?new WeakMap:new r,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=s.getInstance(),r=new g(t,n,this);x.set(this,r)};function k(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}function _(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}["observe","unobserve","disconnect"].forEach(function(e){w.prototype[e]=function(){var t;return(t=x.get(this))[e].apply(t,arguments)}});var E=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.default=E}.call(this,n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return r.forEach(function(n){e[n]&&t.push(n)}),t};var r=["client","offset","scroll","bounds","margin"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};if(-1<t.indexOf("client")&&(n.client={top:e.clientTop,left:e.clientLeft,width:e.clientWidth,height:e.clientHeight}),-1<t.indexOf("offset")&&(n.offset={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}),-1<t.indexOf("scroll")&&(n.scroll={top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}),-1<t.indexOf("bounds")){var r=e.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(-1<t.indexOf("margin")){var o=getComputedStyle(e);n.margin={top:parseInt(o.marginTop),right:parseInt(o.marginRight),bottom:parseInt(o.marginBottom),left:parseInt(o.marginLeft)}}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e},i=(r=n(1))&&r.__esModule?r:{default:r};function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.take,n=void 0===t?function(){return{width:window.innerWidth,height:window.innerHeight}}:t,r=e.debounce,l=void 0===r?function(e){return e}:r;return function(e){var t,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,i.default.Component),a(s,[{key:"componentWillMount",value:function(){window.addEventListener("resize",this.onResize,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onResize,!1)}},{key:"render",value:function(){var t=this.props,r=n(t);return i.default.createElement(e,o({},t,r))}}]),r=t=s,t.displayName="WindowDimensions",r;function s(){var e,t,n;!function(e,t){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return t=n=u(this,(e=s.__proto__||Object.getPrototypeOf(s)).call.apply(e,[this].concat(o))),n.state={width:0,height:0},n.onResize=l(function(){n.setState({width:window.innerWidth,height:window.innerHeight})}),u(n,t)}}}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(4)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(1)),p=r(n(21)),h=(r(n(15)),r(n(3)),r(n(54))),m=r(n(195)),v=r(n(196)),y=r(n(199)),b=r(n(203)),g=r(n(205)),x=r(n(207)),w={standard:h.default,filled:m.default,outlined:v.default},k=(o=f.default.Component,(0,d.default)(_,o),(0,u.default)(_,[{key:"componentDidMount",value:function(){"outlined"===this.props.variant&&(this.labelNode=p.default.findDOMNode(this.labelRef.current),this.forceUpdate())}},{key:"render",value:function(){var e=this.props,t=e.autoComplete,n=e.autoFocus,r=e.children,o=e.className,l=e.defaultValue,u=e.error,s=e.FormHelperTextProps,c=e.fullWidth,d=e.helperText,p=e.id,h=e.InputLabelProps,m=e.inputProps,v=e.InputProps,k=e.inputRef,_=e.label,E=e.multiline,S=e.name,C=e.onBlur,O=e.onChange,P=e.onFocus,T=e.placeholder,M=e.required,j=e.rows,R=e.rowsMax,N=e.select,D=e.SelectProps,I=e.type,A=e.value,F=e.variant,z=(0,i.default)(e,["autoComplete","autoFocus","children","className","defaultValue","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),L={};"outlined"===F&&(h&&void 0!==h.shrink&&(L.notched=h.shrink),L.labelWidth=this.labelNode&&this.labelNode.offsetWidth||0);var U=d&&p?"".concat(p,"-helper-text"):void 0,W=w[F],B=f.default.createElement(W,(0,a.default)({"aria-describedby":U,autoComplete:t,autoFocus:n,defaultValue:l,fullWidth:c,multiline:E,name:S,rows:j,rowsMax:R,type:I,value:A,id:p,inputRef:k,onBlur:C,onChange:O,onFocus:P,placeholder:T,inputProps:m},L,v));return f.default.createElement(b.default,(0,a.default)({className:o,error:u,fullWidth:c,required:M,variant:F},z),_&&f.default.createElement(y.default,(0,a.default)({htmlFor:p,ref:this.labelRef},h),_),N?f.default.createElement(x.default,(0,a.default)({"aria-describedby":U,value:A,input:B},D),r):B,d&&f.default.createElement(g.default,(0,a.default)({id:U},s),d))}}]),_);function _(e){var t;return(0,l.default)(this,_),(t=(0,s.default)(this,(0,c.default)(_).call(this,e))).labelRef=f.default.createRef(),t}k.defaultProps={required:!1,select:!1,variant:"standard"};var E=k;t.default=E},function(e,t,n){"use strict";var r=n(2);function o(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary[t?"dark":"light"]),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(n)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputType:{},inputTypeSearch:{}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(9)),i=r(n(4)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(55))),d=r(n(6));function f(e){var t=e.disableUnderline,n=e.classes,r=(0,l.default)(e,["disableUnderline","classes"]);return u.default.createElement(c.default,(0,i.default)({classes:(0,i.default)({},n,{root:(0,s.default)(n.root,(0,a.default)({},n.underline,!t)),underline:null})},r))}t.styles=o,c.default.defaultProps={fullWidth:!1,inputComponent:"input",multiline:!1,type:"text"},f.muiName="Input";var p=(0,d.default)(o,{name:"MuiInput"})(f);t.default=p},function(e,t,n){"use strict";var r=n(2);function o(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:0},o={opacity:t?.42:.5};return{root:{fontFamily:e.typography.fontFamily,color:e.palette.text.primary,fontSize:e.typography.pxToRem(16),lineHeight:"1.1875em",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}},formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px")},fullWidth:{width:"100%"},input:{font:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1}},inputMarginDense:{paddingTop:3},inputMultiline:{resize:"none",padding:0},inputType:{height:"1.1875em"},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(10)),s=r(n(12)),c=r(n(13)),d=r(n(11)),f=r(n(14)),p=r(n(1)),h=(r(n(3)),r(n(15)),r(n(7))),m=(n(8),r(n(30))),v=r(n(56)),y=r(n(31)),b=r(n(6)),g=n(32),x=r(n(194)),w=n(58);t.styles=o;var k,_=(k=p.default.Component,(0,f.default)(E,k),(0,d.default)(E,null,[{key:"getDerivedStateFromProps",value:function(e,t){return e.disabled&&t.focused?{focused:!1}:null}}]),(0,d.default)(E,[{key:"componentDidMount",value:function(){this.isControlled||this.checkDirty(this.inputRef)}},{key:"componentDidUpdate",value:function(e){if(!e.disabled&&this.props.disabled){var t=this.props.muiFormControl;t&&t.onBlur&&t.onBlur()}this.isControlled&&this.checkDirty(this.props)}},{key:"checkDirty",value:function(e){var t=this.props.muiFormControl;if((0,w.isFilled)(e))return t&&t.onFilled&&t.onFilled(),void(this.props.onFilled&&this.props.onFilled());t&&t.onEmpty&&t.onEmpty(),this.props.onEmpty&&this.props.onEmpty()}},{key:"render",value:function(){var e,t,n=this.props,r=n.autoComplete,o=n.autoFocus,u=n.classes,s=n.className,c=n.defaultValue,d=(n.disabled,n.endAdornment),f=(n.error,n.fullWidth),y=n.id,b=n.inputComponent,g=n.inputProps,w=(g=void 0===g?{}:g).className,k=(0,l.default)(g,["className"]),_=(n.inputRef,n.margin,n.muiFormControl),E=n.multiline,S=n.name,C=(n.onBlur,n.onChange,n.onClick,n.onEmpty,n.onFilled,n.onFocus,n.onKeyDown),O=n.onKeyUp,P=n.placeholder,T=n.readOnly,M=n.renderPrefix,j=n.rows,R=n.rowsMax,N=n.startAdornment,D=n.type,I=n.value,A=(0,l.default)(n,["autoComplete","autoFocus","classes","className","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","muiFormControl","multiline","name","onBlur","onChange","onClick","onEmpty","onFilled","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderPrefix","rows","rowsMax","startAdornment","type","value"]),F=A["aria-describedby"];delete A["aria-describedby"];var z=(0,m.default)({props:this.props,muiFormControl:_,states:["disabled","error","margin","required","filled"]}),L=_?_.focused:this.state.focused,U=(0,h.default)(u.root,(e={},(0,i.default)(e,u.disabled,z.disabled),(0,i.default)(e,u.error,z.error),(0,i.default)(e,u.fullWidth,f),(0,i.default)(e,u.focused,L),(0,i.default)(e,u.formControl,_),(0,i.default)(e,u.marginDense,"dense"===z.margin),(0,i.default)(e,u.multiline,E),(0,i.default)(e,u.adornedStart,N),(0,i.default)(e,u.adornedEnd,d),e),s),W=(0,h.default)(u.input,(t={},(0,i.default)(t,u.disabled,z.disabled),(0,i.default)(t,u.inputType,"text"!==D),(0,i.default)(t,u.inputTypeSearch,"search"===D),(0,i.default)(t,u.inputMultiline,E),(0,i.default)(t,u.inputMarginDense,"dense"===z.margin),(0,i.default)(t,u.inputAdornedStart,N),(0,i.default)(t,u.inputAdornedEnd,d),t),w),B=b,V=(0,a.default)({},k,{ref:this.handleRefInput});return"string"!=typeof B?V=(0,a.default)({inputRef:this.handleRefInput,type:D},V,{ref:null}):E?B=j&&!R?"textarea":(V=(0,a.default)({rowsMax:R,textareaRef:this.handleRefInput},V,{ref:null}),x.default):V=(0,a.default)({type:D},V),p.default.createElement("div",(0,a.default)({className:U,onClick:this.handleClick},A),M?M((0,a.default)({},z,{startAdornment:N,focused:L})):null,N,p.default.createElement(v.default.Provider,{value:null},p.default.createElement(B,(0,a.default)({"aria-invalid":z.error,"aria-describedby":F,autoComplete:r,autoFocus:o,className:W,defaultValue:c,disabled:z.disabled,id:y,name:S,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus,onKeyDown:C,onKeyUp:O,placeholder:P,readOnly:T,required:z.required,rows:j,value:I},V))),d)}}]),E);function E(e){var t;return(0,u.default)(this,E),(t=(0,s.default)(this,(0,c.default)(E).call(this,e))).state={focused:!1},t.handleFocus=function(e){var n=t.props.muiFormControl;(0,m.default)({props:t.props,muiFormControl:n,states:["disabled"]}).disabled?e.stopPropagation():(t.setState({focused:!0}),t.props.onFocus&&t.props.onFocus(e),n&&n.onFocus&&n.onFocus(e))},t.handleBlur=function(e){t.setState({focused:!1}),t.props.onBlur&&t.props.onBlur(e);var n=t.props.muiFormControl;n&&n.onBlur&&n.onBlur(e)},t.handleChange=function(){var e;t.isControlled||t.checkDirty(t.inputRef),t.props.onChange&&(e=t.props).onChange.apply(e,arguments)},t.handleRefInput=function(e){var n;t.inputRef=e,t.props.inputRef?n=t.props.inputRef:t.props.inputProps&&t.props.inputProps.ref&&(n=t.props.inputProps.ref),(0,g.setRef)(n,e)},t.handleClick=function(e){t.inputRef&&e.currentTarget===e.target&&t.inputRef.focus(),t.props.onClick&&t.props.onClick(e)},t.isControlled=null!=e.value,t.isControlled&&t.checkDirty(e),t}_.defaultProps={fullWidth:!1,inputComponent:"input",multiline:!1,type:"text"};var S=(0,b.default)(o,{name:"MuiInputBase"})((0,y.default)(_));t.default=S},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(1)),f=(r(n(3)),r(n(7))),p=r(n(57)),h=r(n(22)),m=r(n(6)),v=n(32),y={root:{position:"relative",width:"100%"},textarea:{width:"100%",height:"100%",resize:"none",font:"inherit",padding:0,cursor:"inherit",boxSizing:"border-box",lineHeight:"inherit",border:"none",outline:"none",background:"transparent"},shadow:{overflow:"hidden",visibility:"hidden",position:"absolute",height:"auto",whiteSpace:"pre-wrap"}};t.styles=y;var b,g=(b=d.default.Component,(0,c.default)(x,b),(0,l.default)(x,[{key:"componentDidMount",value:function(){this.syncHeightWithShadow()}},{key:"componentDidUpdate",value:function(){this.syncHeightWithShadow()}},{key:"componentWillUnmount",value:function(){this.handleResize.clear()}},{key:"syncHeightWithShadow",value:function(){var e=this.props;if(this.shadowRef){this.isControlled&&(this.shadowRef.value=null==e.value?"":String(e.value));var t=this.singlelineShadowRef.scrollHeight;t=0===t?19:t;var n=this.shadowRef.scrollHeight;void 0!==n&&(Number(e.rowsMax)>=Number(e.rows)&&(n=Math.min(Number(e.rowsMax)*t,n)),n=Math.max(n,t),1<Math.abs(this.state.height-n)&&this.setState({height:n}))}}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.className,r=e.defaultValue,i=(e.onChange,e.rows),l=(e.rowsMax,e.style),u=(e.textareaRef,e.value),s=(0,a.default)(e,["classes","className","defaultValue","onChange","rows","rowsMax","style","textareaRef","value"]);return d.default.createElement("div",{className:t.root},d.default.createElement(h.default,{target:"window",onResize:this.handleResize}),d.default.createElement("textarea",{"aria-hidden":"true",className:(0,f.default)(t.textarea,t.shadow),readOnly:!0,ref:this.handleRefSinglelineShadow,rows:"1",tabIndex:-1,value:""}),d.default.createElement("textarea",{"aria-hidden":"true",className:(0,f.default)(t.textarea,t.shadow),defaultValue:r,readOnly:!0,ref:this.handleRefShadow,rows:i,tabIndex:-1,value:u}),d.default.createElement("textarea",(0,o.default)({rows:i,className:(0,f.default)(t.textarea,n),defaultValue:r,value:u,onChange:this.handleChange,ref:this.handleRefInput,style:(0,o.default)({height:this.state.height},l)},s)))}}]),x);function x(e){var t;return(0,i.default)(this,x),(t=(0,u.default)(this,(0,s.default)(x).call(this))).handleRefInput=function(e){t.inputRef=e,(0,v.setRef)(t.props.textareaRef,e)},t.handleRefSinglelineShadow=function(e){t.singlelineShadowRef=e},t.handleRefShadow=function(e){t.shadowRef=e},t.handleChange=function(e){t.value=e.target.value,t.isControlled||(t.shadowRef.value=t.value,t.syncHeightWithShadow()),t.props.onChange&&t.props.onChange(e)},t.isControlled=null!=e.value,t.value=e.value||e.defaultValue||"",t.state={height:19*Number(e.rows)},"undefined"!=typeof window&&(t.handleResize=(0,p.default)(function(){t.syncHeightWithShadow()},166)),t}g.defaultProps={rows:1};var w=(0,m.default)(y,{name:"MuiPrivateTextarea"})(g);t.default=w},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(64))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(197))},function(e,t,n){"use strict";var r=n(2);function o(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative","& $notchedOutline":{borderColor:t},"&:hover:not($disabled):not($focused):not($error) $notchedOutline":{borderColor:e.palette.text.primary,"@media (hover: none)":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},multiline:{padding:"18.5px 14px",boxSizing:"border-box"},notchedOutline:{},input:{padding:"18.5px 14px"},inputMarginDense:{paddingTop:15,paddingBottom:15},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(5)),l=r(n(1)),u=(r(n(3)),r(n(7))),s=(n(8),r(n(55))),c=r(n(198)),d=r(n(6));function f(e){var t=e.classes,n=e.labelWidth,r=e.notched,o=(0,i.default)(e,["classes","labelWidth","notched"]);return l.default.createElement(s.default,(0,a.default)({renderPrefix:function(e){return l.default.createElement(c.default,{className:t.notchedOutline,labelWidth:n,notched:void 0!==r?r:Boolean(e.startAdornment||e.filled||e.focused)})},classes:(0,a.default)({},t,{root:(0,u.default)(t.root,t.underline),notchedOutline:null})},o))}t.styles=o,s.default.defaultProps={fullWidth:!1,inputComponent:"input",multiline:!1,type:"text"},f.muiName="Input";var p=(0,d.default)(o,{name:"MuiOutlinedInput"})(f);t.default=p},function(e,t,n){"use strict";var r=n(2);function o(e){var t="rtl"===e.direction?"right":"left";return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:0,pointerEvents:"none",borderRadius:e.shape.borderRadius,borderStyle:"solid",borderWidth:1,transition:e.transitions.create(["padding-".concat(t),"border-color","border-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(9)),i=r(n(4)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=n(63),d=n(23);t.styles=o;var f=(0,c.withStyles)(o,{name:"MuiPrivateNotchedOutline",withTheme:!0})(function(e){e.children;var t=e.classes,n=e.className,r=e.labelWidth,o=e.notched,c=e.style,f=e.theme,p=(0,l.default)(e,["children","classes","className","labelWidth","notched","style","theme"]),h="rtl"===f.direction?"right":"left",m=0<r?.75*r+8:0;return u.default.createElement("fieldset",(0,i.default)({"aria-hidden":!0,style:(0,i.default)((0,a.default)({},"padding".concat((0,d.capitalize)(h)),8+(o?0:m/2)),c),className:(0,s.default)(t.root,n)},p),u.default.createElement("legend",{className:t.legend,style:{width:o?m:.01}},u.default.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))});t.default=f},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(200))},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 17px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=r(n(30)),d=r(n(31)),f=r(n(6)),p=r(n(201));function h(e){var t,n=e.children,r=e.classes,o=e.className,d=e.disableAnimation,f=e.FormLabelClasses,h=(e.margin,e.muiFormControl),m=e.shrink,v=(e.variant,(0,l.default)(e,["children","classes","className","disableAnimation","FormLabelClasses","margin","muiFormControl","shrink","variant"])),y=m;void 0===y&&h&&(y=h.filled||h.focused||h.adornedStart);var b=(0,c.default)({props:e,muiFormControl:h,states:["margin","variant"]}),g=(0,s.default)(r.root,(t={},(0,i.default)(t,r.formControl,h),(0,i.default)(t,r.animated,!d),(0,i.default)(t,r.shrink,y),(0,i.default)(t,r.marginDense,"dense"===b.margin),(0,i.default)(t,r.filled,"filled"===b.variant),(0,i.default)(t,r.outlined,"outlined"===b.variant),t),o);return u.default.createElement(p.default,(0,a.default)({"data-shrink":y,className:g,classes:(0,a.default)({focused:r.focused,disabled:r.disabled,error:r.error,required:r.required},f)},v),n)}t.styles=o,h.defaultProps={disableAnimation:!1};var m=(0,f.default)(o,{name:"MuiInputLabel"})((0,d.default)(h));t.default=m},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(202))},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{fontFamily:e.typography.fontFamily,color:e.palette.text.secondary,fontSize:e.typography.pxToRem(16),lineHeight:1,padding:0,"&$focused":{color:e.palette.primary["light"===e.palette.type?"dark":"light"]},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(30))),d=r(n(31)),f=r(n(6));function p(e){var t,n=e.children,r=e.classes,o=e.className,d=e.component,f=(e.disabled,e.error,e.filled,e.focused,e.muiFormControl),p=(e.required,(0,l.default)(e,["children","classes","className","component","disabled","error","filled","focused","muiFormControl","required"])),h=(0,c.default)({props:e,muiFormControl:f,states:["required","focused","disabled","error","filled"]});return u.default.createElement(d,(0,a.default)({className:(0,s.default)(r.root,(t={},(0,i.default)(t,r.disabled,h.disabled),(0,i.default)(t,r.error,h.error),(0,i.default)(t,r.filled,h.filled),(0,i.default)(t,r.focused,h.focused),(0,i.default)(t,r.required,h.required),t),o)},p),n,h.required&&u.default.createElement("span",{className:(0,s.default)(r.asterisk,(0,i.default)({},r.error,h.error))}," *"))}t.styles=o,p.defaultProps={component:"label"};var h=(0,f.default)(o,{name:"MuiFormLabel"})((0,d.default)(p));t.default=h},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(204))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(10)),u=r(n(12)),s=r(n(13)),c=r(n(11)),d=r(n(14)),f=r(n(1)),p=(r(n(3)),r(n(7))),h=(n(8),n(58)),m=r(n(6)),v=n(23),y=n(32),b=r(n(56)),g={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}};t.styles=g;var x,w=(x=f.default.Component,(0,d.default)(k,x),(0,c.default)(k,null,[{key:"getDerivedStateFromProps",value:function(e,t){return e.disabled&&t.focused?{focused:!1}:null}}]),(0,c.default)(k,[{key:"render",value:function(){var e,t=this.props,n=t.classes,r=t.className,l=t.component,u=t.disabled,s=t.error,c=t.fullWidth,d=t.margin,h=t.required,m=t.variant,y=(0,i.default)(t,["classes","className","component","disabled","error","fullWidth","margin","required","variant"]),g=this.state,x={adornedStart:g.adornedStart,disabled:u,error:s,filled:g.filled,focused:g.focused,margin:d,onBlur:this.handleBlur,onEmpty:this.handleClean,onFilled:this.handleDirty,onFocus:this.handleFocus,required:h,variant:m};return f.default.createElement(b.default.Provider,{value:x},f.default.createElement(l,(0,o.default)({className:(0,p.default)(n.root,(e={},(0,a.default)(e,n["margin".concat((0,v.capitalize)(d))],"none"!==d),(0,a.default)(e,n.fullWidth,c),e),r)},y)))}}]),k);function k(e){var t;(0,l.default)(this,k),(t=(0,u.default)(this,(0,s.default)(k).call(this))).handleFocus=function(){t.setState(function(e){return e.focused?null:{focused:!0}})},t.handleBlur=function(){t.setState(function(e){return e.focused?{focused:!1}:null})},t.handleDirty=function(){t.state.filled||t.setState({filled:!0})},t.handleClean=function(){t.state.filled&&t.setState({filled:!1})},t.state={adornedStart:!1,filled:!1,focused:!1};var n=e.children;return n&&f.default.Children.forEach(n,function(e){if((0,y.isMuiElement)(e,["Input","Select"])){(0,h.isFilled)(e.props,!0)&&(t.state.filled=!0);var n=(0,y.isMuiElement)(e,["Select"])?e.props.input:e;n&&(0,h.isAdornedStart)(n.props)&&(t.state.adornedStart=!0)}}),t}w.defaultProps={component:"div",disabled:!1,error:!1,fullWidth:!1,margin:"none",required:!1,variant:"standard"};var _=(0,m.default)(g,{name:"MuiFormControl"})(w);t.default=_},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(206))},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),textAlign:"left",marginTop:8,lineHeight:"1em",minHeight:"1em",margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}},error:{},disabled:{},marginDense:{marginTop:4},contained:{margin:"8px 12px 0"},focused:{},filled:{},required:{}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(30))),d=r(n(31)),f=r(n(6));function p(e){var t,n=e.classes,r=e.className,o=e.component,d=(e.disabled,e.error,e.filled,e.focused,e.margin,e.muiFormControl),f=(e.required,e.variant,(0,l.default)(e,["classes","className","component","disabled","error","filled","focused","margin","muiFormControl","required","variant"])),p=(0,c.default)({props:e,muiFormControl:d,states:["variant","margin","disabled","error","filled","focused","required"]});return u.default.createElement(o,(0,a.default)({className:(0,s.default)(n.root,(t={},(0,i.default)(t,n.contained,"filled"===p.variant||"outlined"===p.variant),(0,i.default)(t,n.marginDense,"dense"===p.margin),(0,i.default)(t,n.disabled,p.disabled),(0,i.default)(t,n.error,p.error),(0,i.default)(t,n.filled,p.filled),(0,i.default)(t,n.focused,p.focused),(0,i.default)(t,n.required,p.required),t),r)},f))}t.styles=o,p.defaultProps={component:"p"};var h=(0,f.default)(o,{name:"MuiFormHelperText"})((0,d.default)(p));t.default=h},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(208))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(1)),l=(r(n(3)),n(8),r(n(209))),u=r(n(30)),s=r(n(31)),c=r(n(6)),d=r(n(80)),f=r(n(90)),p=r(n(54)),h=n(250),m=r(n(95)),v=h.styles;function y(e){var t=e.autoWidth,n=e.children,r=e.classes,s=e.displayEmpty,c=e.IconComponent,f=e.input,p=e.inputProps,h=e.MenuProps,v=e.muiFormControl,b=e.multiple,g=e.native,x=e.onClose,w=e.onOpen,k=e.open,_=e.renderValue,E=e.SelectDisplayProps,S=(e.variant,(0,a.default)(e,["autoWidth","children","classes","displayEmpty","IconComponent","input","inputProps","MenuProps","muiFormControl","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"])),C=g?m.default:l.default,O=(0,u.default)({props:e,muiFormControl:v,states:["variant"]});return i.default.cloneElement(f,(0,o.default)({inputComponent:C,inputProps:(0,o.default)({children:n,IconComponent:c,variant:O.variant,type:void 0,multiple:b},g?{}:{autoWidth:t,displayEmpty:s,MenuProps:h,onClose:x,onOpen:w,open:k,renderValue:_,SelectDisplayProps:E},p,{classes:p?(0,d.default)({baseClasses:r,newClasses:p.classes,Component:y}):r},f?f.props.inputProps:{})},S))}t.styles=v,y.defaultProps={autoWidth:!1,displayEmpty:!1,IconComponent:f.default,input:i.default.createElement(p.default,null),multiple:!1,native:!1},y.muiName="Select";var b=(0,c.default)(v,{name:"MuiSelect"})((0,s.default)(y));t.default=b},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(59)),u=r(n(10)),s=r(n(11)),c=r(n(12)),d=r(n(13)),f=r(n(14)),p=r(n(27)),h=r(n(1)),m=(r(n(3)),r(n(7))),v=(r(n(15)),n(8),r(n(213))),y=n(58),b=n(32);function g(e,t){return"object"===(0,p.default)(t)&&null!==t?e===t:String(e)===String(t)}var x,w=(x=h.default.Component,(0,f.default)(k,x),(0,s.default)(k,[{key:"componentDidMount",value:function(){this.isOpenControlled&&this.props.open&&(this.displayRef.focus(),this.forceUpdate()),this.props.autoFocus&&this.displayRef.focus()}},{key:"render",value:function(){var e,t,n=this,r=this.props,l=r.autoWidth,u=r.children,s=r.classes,c=r.className,d=r.disabled,f=r.displayEmpty,p=r.IconComponent,b=(r.inputRef,r.MenuProps),x=void 0===b?{}:b,w=r.multiple,k=r.name,_=(r.onBlur,r.onChange,r.onClose,r.onFocus),E=(r.onOpen,r.open),S=r.readOnly,C=r.renderValue,O=(r.required,r.SelectDisplayProps),P=r.tabIndex,T=r.type,M=void 0===T?"hidden":T,j=r.value,R=r.variant,N=(0,i.default)(r,["autoWidth","children","classes","className","disabled","displayEmpty","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),D=this.isOpenControlled&&this.displayRef?E:this.state.open;delete N["aria-invalid"];var I="",A=[],F=!1;((0,y.isFilled)(this.props)||f)&&(C?t=C(j):F=!0);var z=h.default.Children.map(u,function(e){if(!h.default.isValidElement(e))return null;var t;if(w){if(!Array.isArray(j))throw new Error("Material-UI: the `value` property must be an array when using the `Select` component with `multiple`.");(t=j.some(function(t){return g(t,e.props.value)}))&&F&&A.push(e.props.children)}else(t=g(j,e.props.value))&&F&&(I=e.props.children);return h.default.cloneElement(e,{onClick:n.handleItemClick(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})});F&&(t=w?A.join(", "):I);var L,U=this.state.menuMinWidth;return!l&&this.isOpenControlled&&this.displayRef&&(U=this.displayRef.clientWidth),L=void 0!==P?P:d?null:0,h.default.createElement("div",{className:s.root},h.default.createElement("div",(0,o.default)({className:(0,m.default)(s.select,s.selectMenu,(e={},(0,a.default)(e,s.disabled,d),(0,a.default)(e,s.filled,"filled"===R),(0,a.default)(e,s.outlined,"outlined"===R),e),c),ref:this.handleDisplayRef,"aria-pressed":D?"true":"false",tabIndex:L,role:"button","aria-owns":D?"menu-".concat(k||""):void 0,"aria-haspopup":"true",onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,onClick:d||S?null:this.handleClick,onFocus:_,id:k?"select-".concat(k):void 0},O),t||h.default.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})),h.default.createElement("input",(0,o.default)({value:Array.isArray(j)?j.join(","):j,name:k,ref:this.handleInputRef,type:M},N)),h.default.createElement(p,{className:s.icon}),h.default.createElement(v.default,(0,o.default)({id:"menu-".concat(k||""),anchorEl:this.displayRef,open:D,onClose:this.handleClose},x,{MenuListProps:(0,o.default)({role:"listbox",disableListWrap:!0},x.MenuListProps),PaperProps:(0,o.default)({},x.PaperProps,{style:(0,o.default)({minWidth:U},null!=x.PaperProps?x.PaperProps.style:null)})}),z))}}]),k);function k(e){var t;return(0,u.default)(this,k),(t=(0,c.default)(this,(0,d.default)(k).call(this))).ignoreNextBlur=!1,t.update=function(e){var n=e.event,r=e.open;t.isOpenControlled?r?t.props.onOpen(n):t.props.onClose(n):t.setState({menuMinWidth:t.props.autoWidth?null:t.displayRef.clientWidth,open:r})},t.handleClick=function(e){t.ignoreNextBlur=!0,t.update({open:!0,event:e})},t.handleClose=function(e){t.update({open:!1,event:e})},t.handleItemClick=function(e){return function(n){t.props.multiple||t.update({open:!1,event:n});var r=t.props,o=r.onChange,a=r.name;if(o){var i;if(t.props.multiple){var u=(i=Array.isArray(t.props.value)?(0,l.default)(t.props.value):[]).indexOf(e.props.value);-1===u?i.push(e.props.value):i.splice(u,1)}else i=e.props.value;n.persist(),n.target={value:i,name:a},o(n,e)}}},t.handleBlur=function(e){if(!0===t.ignoreNextBlur)return e.stopPropagation(),void(t.ignoreNextBlur=!1);if(t.props.onBlur){var n=t.props,r=n.value,o=n.name;e.persist(),e.target={value:r,name:o},t.props.onBlur(e)}},t.handleKeyDown=function(e){t.props.readOnly||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),t.ignoreNextBlur=!0,t.update({open:!0,event:e}))},t.handleDisplayRef=function(e){t.displayRef=e},t.handleInputRef=function(e){var n=t.props.inputRef;if(n){var r={node:e,value:t.props.value,focus:function(){t.displayRef.focus()}};(0,b.setRef)(n,r)}},t.isOpenControlled=void 0!==e.open,t.state={menuMinWidth:null,open:!1},t}t.default=w},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(1)),f=(r(n(3)),r(n(21))),p=r(n(82)),h=r(n(6)),m=r(n(214)),v=r(n(238)),y={vertical:"top",horizontal:"right"},b={vertical:"top",horizontal:"left"},g={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}};t.styles=g;var x,w=(x=d.default.Component,(0,c.default)(k,x),(0,l.default)(k,[{key:"componentDidMount",value:function(){this.props.open&&!0!==this.props.disableAutoFocusItem&&this.focus()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.classes,r=(e.disableAutoFocusItem,e.MenuListProps),i=(e.onEntering,e.PaperProps),l=void 0===i?{}:i,u=e.PopoverClasses,s=e.theme,c=(0,a.default)(e,["children","classes","disableAutoFocusItem","MenuListProps","onEntering","PaperProps","PopoverClasses","theme"]);return d.default.createElement(m.default,(0,o.default)({getContentAnchorEl:this.getContentAnchorEl,classes:u,onEntering:this.handleEntering,anchorOrigin:"rtl"===s.direction?y:b,transformOrigin:"rtl"===s.direction?y:b,PaperProps:(0,o.default)({},l,{classes:(0,o.default)({},l.classes,{root:n.paper})})},c),d.default.createElement(v.default,(0,o.default)({onKeyDown:this.handleListKeyDown},r,{ref:this.handleMenuListRef}),t))}}]),k);function k(){var e,t;(0,i.default)(this,k);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,u.default)(this,(e=(0,s.default)(k)).call.apply(e,[this].concat(r)))).getContentAnchorEl=function(){return t.menuListRef.selectedItemRef?f.default.findDOMNode(t.menuListRef.selectedItemRef):f.default.findDOMNode(t.menuListRef).firstChild},t.focus=function(){if(t.menuListRef&&t.menuListRef.selectedItemRef)f.default.findDOMNode(t.menuListRef.selectedItemRef).focus();else{var e=f.default.findDOMNode(t.menuListRef);e&&e.firstChild&&e.firstChild.focus()}},t.handleMenuListRef=function(e){t.menuListRef=e},t.handleEntering=function(e){var n=t.props,r=n.disableAutoFocusItem,o=n.theme,a=f.default.findDOMNode(t.menuListRef);if(!0!==r&&t.focus(),a&&e.clientHeight<a.clientHeight&&!a.style.width){var i="".concat((0,p.default)(),"px");a.style["rtl"===o.direction?"paddingLeft":"paddingRight"]=i,a.style.width="calc(100% + ".concat(i,")")}t.props.onEntering&&t.props.onEntering(e)},t.handleListKeyDown=function(e){"Tab"===e.key&&(e.preventDefault(),t.props.onClose&&t.props.onClose(e,"tabKeyDown"))},t}w.defaultProps={disableAutoFocusItem:!1,transitionDuration:"auto"};var _=(0,h.default)(g,{name:"MuiMenu",withTheme:!0})(w);t.default=_},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(215))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(1)),f=(r(n(3)),r(n(21))),p=(r(n(15)),r(n(57))),h=r(n(22)),m=(n(8),r(n(24))),v=r(n(44)),y=n(23),b=r(n(6)),g=r(n(84)),x=r(n(235)),w=r(n(61));function k(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function _(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function E(e){return[e.horizontal,e.vertical].map(function(e){return"number"==typeof e?"".concat(e,"px"):e}).join(" ")}function S(e){return"function"==typeof e?e():e}var C={paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:"none"}};t.styles=C;var O,P=(O=d.default.Component,(0,c.default)(T,O),(0,l.default)(T,[{key:"componentDidMount",value:function(){this.props.action&&this.props.action({updatePosition:this.handleResize})}},{key:"getAnchorOffset",value:function(e){var t=this.props,n=t.anchorEl,r=t.anchorOrigin,o=t.anchorReference,a=t.anchorPosition;if("anchorPosition"===o)return a;var i=(S(n)||(0,m.default)(this.paperRef).body).getBoundingClientRect(),l=0===e?r.vertical:"center";return{top:i.top+this.handleGetOffsetTop(i,l),left:i.left+this.handleGetOffsetLeft(i,r.horizontal)}}},{key:"getContentAnchorOffset",value:function(e){var t=this.props,n=t.getContentAnchorEl,r=t.anchorReference,o=0;if(n&&"anchorEl"===r){var a=n(e);if(a&&e.contains(a)){var i=function(e,t){for(var n=a,r=0;n&&n!==e;)r+=(n=n.parentNode).scrollTop;return r}(e);o=a.offsetTop+a.clientHeight/2-i||0}}return o}},{key:"getTransformOrigin",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.props.transformOrigin;return{vertical:this.handleGetOffsetTop(e,n.vertical)+t,horizontal:this.handleGetOffsetLeft(e,n.horizontal)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.action,t.anchorEl),r=(t.anchorOrigin,t.anchorPosition,t.anchorReference,t.children),i=t.classes,l=t.container,u=t.elevation,s=(t.getContentAnchorEl,t.marginThreshold,t.ModalClasses),c=t.onEnter,p=t.onEntered,v=(t.onEntering,t.onExit),b=t.onExited,x=t.onExiting,k=t.open,_=t.PaperProps,E=t.role,C=(t.transformOrigin,t.TransitionComponent),O=t.transitionDuration,P=t.TransitionProps,T=void 0===P?{}:P,M=(0,a.default)(t,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","container","elevation","getContentAnchorEl","marginThreshold","ModalClasses","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","role","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=O;"auto"!==O||C.muiSupportAuto||(j=void 0);var R=l||(n?(0,m.default)(S(n)).body:void 0);return d.default.createElement(g.default,(0,o.default)({classes:s,container:R,open:k,BackdropProps:{invisible:!0}},M),d.default.createElement(C,(0,o.default)({appear:!0,in:k,onEnter:c,onEntered:p,onExit:v,onExited:b,onExiting:x,role:E,timeout:j},T,{onEntering:(0,y.createChainedFunction)(this.handleEntering,T.onEntering)}),d.default.createElement(w.default,(0,o.default)({className:i.paper,elevation:u,ref:function(t){e.paperRef=f.default.findDOMNode(t)}},_),d.default.createElement(h.default,{target:"window",onResize:this.handleResize}),r)))}}]),T);function T(){var e;return(0,i.default)(this,T),(e=(0,u.default)(this,(0,s.default)(T).call(this))).handleGetOffsetTop=k,e.handleGetOffsetLeft=_,e.componentWillUnmount=function(){e.handleResize.clear()},e.setPositioningStyles=function(t){var n=e.getPositioningStyle(t);null!==n.top&&(t.style.top=n.top),null!==n.left&&(t.style.left=n.left),t.style.transformOrigin=n.transformOrigin},e.getPositioningStyle=function(t){var n=e.props,r=n.anchorEl,o=n.anchorReference,a=n.marginThreshold,i=e.getContentAnchorOffset(t),l={width:t.offsetWidth,height:t.offsetHeight},u=e.getTransformOrigin(l,i);if("none"===o)return{top:null,left:null,transformOrigin:E(u)};var s=e.getAnchorOffset(i),c=s.top-u.vertical,d=s.left-u.horizontal,f=c+l.height,p=d+l.width,h=(0,v.default)(S(r)),m=h.innerHeight-a,y=h.innerWidth-a;if(c<a){var b=c-a;c-=b,u.vertical+=b}else if(m<f){var g=f-m;c-=g,u.vertical+=g}if(d<a){var x=d-a;d-=x,u.horizontal+=x}else if(y<p){var w=p-y;d-=w,u.horizontal+=w}return{top:"".concat(c,"px"),left:"".concat(d,"px"),transformOrigin:E(u)}},e.handleEntering=function(t){e.props.onEntering&&e.props.onEntering(t),e.setPositioningStyles(t)},"undefined"!=typeof window&&(e.handleResize=(0,p.default)(function(){e.props.open&&e.setPositioningStyles(e.paperRef)},166)),e}P.defaultProps={anchorReference:"anchorEl",anchorOrigin:{vertical:"top",horizontal:"left"},elevation:8,marginThreshold:16,transformOrigin:{vertical:"top",horizontal:"left"},TransitionComponent:x.default,transitionDuration:"auto"};var M=(0,b.default)(C,{name:"MuiPopover"})(P);t.default=M},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(38)),p=r(n(1)),h=r(n(21)),m=(r(n(3)),r(n(7))),v=(r(n(15)),n(8),r(n(24))),y=r(n(217)),b=r(n(219)),g=n(23),x=r(n(6)),w=r(n(85)),k=r(n(231)),_=n(87);function E(e){return!!e.children&&e.children.props.hasOwnProperty("in")}function S(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}t.styles=S;var C,O=(C=p.default.Component,(0,d.default)(P,C),(0,u.default)(P,[{key:"componentDidMount",value:function(){this.mounted=!0,this.props.open&&this.handleOpen()}},{key:"componentDidUpdate",value:function(e){e.open&&!this.props.open?this.handleClose():!e.open&&this.props.open&&(this.lastFocus=(0,v.default)(this.mountNode).activeElement,this.handleOpen())}},{key:"componentWillUnmount",value:function(){this.mounted=!1,(this.props.open||E(this.props)&&!this.state.exited)&&this.handleClose("unmount")}},{key:"autoFocus",value:function(){if(!this.props.disableAutoFocus&&this.dialogRef){var e=(0,v.default)(this.mountNode).activeElement;this.dialogRef.contains(e)||(this.dialogRef.hasAttribute("tabIndex")||this.dialogRef.setAttribute("tabIndex",-1),this.lastFocus=e,this.dialogRef.focus())}}},{key:"restoreLastFocus",value:function(){!this.props.disableRestoreFocus&&this.lastFocus&&(this.lastFocus.focus&&this.lastFocus.focus(),this.lastFocus=null)}},{key:"isTopModal",value:function(){return this.props.manager.isTopModal(this)}},{key:"render",value:function(){var e=this.props,t=e.BackdropComponent,n=e.BackdropProps,r=e.children,l=e.classes,u=e.className,s=(e.closeAfterTransition,e.container),c=(e.disableAutoFocus,e.disableBackdropClick,e.disableEnforceFocus,e.disableEscapeKeyDown,e.disablePortal),d=(e.disableRestoreFocus,e.hideBackdrop),f=e.keepMounted,h=(e.manager,e.onBackdropClick,e.onClose,e.onEscapeKeyDown,e.onRendered,e.open),v=(0,i.default)(e,["BackdropComponent","BackdropProps","children","classes","className","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),x=this.state.exited,w=E(this.props);if(!f&&!h&&(!w||x))return null;var k={};return w&&(k.onExited=(0,g.createChainedFunction)(this.handleExited,r.props.onExited)),void 0===r.props.role&&(k.role=r.props.role||"document"),void 0===r.props.tabIndex&&(k.tabIndex=r.props.tabIndex||"-1"),p.default.createElement(b.default,{ref:this.handlePortalRef,container:s,disablePortal:c,onRendered:this.handleRendered},p.default.createElement("div",(0,o.default)({ref:this.handleModalRef,onKeyDown:this.handleKeyDown,role:"presentation",className:(0,m.default)(l.root,u,(0,a.default)({},l.hidden,x))},v),d?null:p.default.createElement(t,(0,o.default)({open:h,onClick:this.handleBackdropClick},n)),p.default.createElement(y.default,{rootRef:this.onRootRef},p.default.cloneElement(r,k))))}}],[{key:"getDerivedStateFromProps",value:function(e){return e.open?{exited:!1}:E(e)?null:{exited:!0}}}]),P);function P(e){var t;return(0,l.default)(this,P),(t=(0,s.default)(this,(0,c.default)(P).call(this))).mounted=!1,t.handleOpen=function(){var e,n,r=(0,v.default)(t.mountNode),o=(e=t.props.container,n=r.body,e="function"==typeof e?e():e,h.default.findDOMNode(e)||n);t.props.manager.add((0,f.default)((0,f.default)(t)),o),r.addEventListener("focus",t.enforceFocus,!0),t.dialogRef&&t.handleOpened()},t.handleRendered=function(){t.props.onRendered&&t.props.onRendered(),t.props.open?t.handleOpened():(0,_.ariaHidden)(t.modalRef,!0)},t.handleOpened=function(){t.autoFocus(),t.props.manager.mount((0,f.default)((0,f.default)(t))),t.modalRef.scrollTop=0},t.handleClose=function(e){E(t.props)&&t.props.closeAfterTransition&&"unmount"!==e||t.props.manager.remove((0,f.default)((0,f.default)(t))),(0,v.default)(t.mountNode).removeEventListener("focus",t.enforceFocus,!0),t.restoreLastFocus()},t.handleExited=function(){t.props.closeAfterTransition&&t.props.manager.remove((0,f.default)((0,f.default)(t))),t.setState({exited:!0})},t.handleBackdropClick=function(e){e.target===e.currentTarget&&(t.props.onBackdropClick&&t.props.onBackdropClick(e),!t.props.disableBackdropClick&&t.props.onClose&&t.props.onClose(e,"backdropClick"))},t.handleKeyDown=function(e){"Escape"===e.key&&t.isTopModal()&&!e.defaultPrevented&&(e.stopPropagation(),t.props.onEscapeKeyDown&&t.props.onEscapeKeyDown(e),!t.props.disableEscapeKeyDown&&t.props.onClose&&t.props.onClose(e,"escapeKeyDown"))},t.enforceFocus=function(){if(t.isTopModal()&&!t.props.disableEnforceFocus&&t.mounted&&t.dialogRef){var e=(0,v.default)(t.mountNode).activeElement;t.dialogRef.contains(e)||t.dialogRef.focus()}},t.handlePortalRef=function(e){t.mountNode=e?e.getMountNode():e},t.handleModalRef=function(e){t.modalRef=e},t.onRootRef=function(e){t.dialogRef=e},t.state={exited:!e.open},t}O.defaultProps={BackdropComponent:k.default,closeAfterTransition:!1,disableAutoFocus:!1,disableBackdropClick:!1,disableEnforceFocus:!1,disableEscapeKeyDown:!1,disablePortal:!1,disableRestoreFocus:!1,hideBackdrop:!1,keepMounted:!1,manager:new w.default};var T=(0,x.default)(S,{flip:!1,name:"MuiModal"})(O);t.default=T},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(218))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(10)),i=r(n(11)),l=r(n(12)),u=r(n(13)),s=r(n(14)),c=r(n(1)),d=r(n(21)),f=(r(n(3)),n(8),n(32)),p=(o=c.default.Component,(0,s.default)(h,o),(0,i.default)(h,[{key:"componentDidMount",value:function(){this.ref=d.default.findDOMNode(this),(0,f.setRef)(this.props.rootRef,this.ref)}},{key:"componentDidUpdate",value:function(e){var t=d.default.findDOMNode(this);e.rootRef===this.props.rootRef&&this.ref===t||(e.rootRef!==this.props.rootRef&&(0,f.setRef)(e.rootRef,null),this.ref=t,(0,f.setRef)(this.props.rootRef,this.ref))}},{key:"componentWillUnmount",value:function(){this.ref=null,(0,f.setRef)(this.props.rootRef,null)}},{key:"render",value:function(){return this.props.children}}]),h);function h(){return(0,a.default)(this,h),(0,l.default)(this,(0,u.default)(h).apply(this,arguments))}t.default=p},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(220))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(10)),a=r(n(11)),i=r(n(12)),l=r(n(13)),u=r(n(14)),s=r(n(1)),c=r(n(21)),d=(r(n(3)),r(n(24)));n(8);var f,p=(f=s.default.Component,(0,u.default)(h,f),(0,a.default)(h,[{key:"componentDidMount",value:function(){this.setMountNode(this.props.container),this.props.disablePortal||this.forceUpdate(this.props.onRendered)}},{key:"componentDidUpdate",value:function(e){var t=this;e.container===this.props.container&&e.disablePortal===this.props.disablePortal||(this.setMountNode(this.props.container),this.props.disablePortal||this.forceUpdate(function(){t.props.onRendered&&(clearTimeout(t.renderedTimer),t.renderedTimer=setTimeout(t.props.onRendered))}))}},{key:"componentWillUnmount",value:function(){this.mountNode=null,clearTimeout(this.renderedTimer)}},{key:"setMountNode",value:function(e){var t,n;this.props.disablePortal?this.mountNode=c.default.findDOMNode(this).parentElement:this.mountNode=(t=e,n=(0,d.default)(c.default.findDOMNode(this)).body,t="function"==typeof t?t():t,c.default.findDOMNode(t)||n)}},{key:"render",value:function(){var e=this.props,t=e.children;return e.disablePortal?t:this.mountNode?c.default.createPortal(t,this.mountNode):null}}]),h);function h(){var e,t;(0,o.default)(this,h);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=(0,i.default)(this,(e=(0,l.default)(h)).call.apply(e,[this].concat(r)))).getMountNode=function(){return t.mountNode},t}p.defaultProps={disablePortal:!1};var m=p;t.default=m},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=function(e,t,n){var r="",c="",d=t;if("string"==typeof t){if(void 0===n)return e.style[(0,o.default)(t)]||(0,i.default)(e).getPropertyValue((0,a.default)(t));(d={})[t]=n}Object.keys(d).forEach(function(t){var n=d[t];n||0===n?(0,s.default)(t)?c+=t+"("+n+") ":r+=(0,a.default)(t)+": "+n+";":(0,l.default)(e,(0,a.default)(t))}),c&&(r+=u.transform+": "+c+";"),e.style.cssText+=";"+r};var o=r(n(86)),a=r(n(223)),i=r(n(225)),l=r(n(226)),u=n(227),s=r(n(228));e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})};var r=/-(.)/g;e.exports=t.default},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=function(e){return(0,o.default)(e).replace(a,"-ms-")};var o=r(n(224)),a=/^ms-/;e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return e.replace(r,"-$1").toLowerCase()};var r=/([A-Z])/g;e.exports=t.default},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):{getPropertyValue:function(t){var n=e.style;"float"==(t=(0,o.default)(t))&&(t="styleFloat");var r=e.currentStyle[t]||null;if(null==r&&n&&n[t]&&(r=n[t]),i.test(r)&&!a.test(t)){var l=n.left,u=e.runtimeStyle,s=u&&u.left;s&&(u.left=e.currentStyle.left),n.left="fontSize"===t?"1em":r,r=n.pixelLeft+"px",n.left=l,s&&(u.left=s)}return r}}};var o=r(n(86)),a=/^(top|right|bottom|left)$/,i=/^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return"removeProperty"in e.style?e.style.removeProperty(t):e.style.removeAttribute(t)},e.exports=t.default},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var o,a,i,l,u,s,c,d,f,p,h,m=r(n(83)),v="transform";if(t.transform=v,t.animationEnd=i,t.transitionEnd=a,t.transitionDelay=c,t.transitionTiming=s,t.transitionDuration=u,t.transitionProperty=l,t.animationDelay=h,t.animationTiming=p,t.animationDuration=f,t.animationName=d,m.default){var y=function(){for(var e,t,n=document.createElement("div").style,r={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},o=Object.keys(r),a="",i=0;i<o.length;i++){var l=o[i];if(l+"TransitionProperty"in n){a="-"+l.toLowerCase(),e=r[l]("TransitionEnd"),t=r[l]("AnimationEnd");break}}return!e&&"transitionProperty"in n&&(e="transitionend"),!t&&"animationName"in n&&(t="animationend"),n=null,{animationEnd:t,transitionEnd:e,prefix:a}}();o=y.prefix,t.transitionEnd=a=y.transitionEnd,t.animationEnd=i=y.animationEnd,t.transform=v=o+"-"+v,t.transitionProperty=l=o+"-transition-property",t.transitionDuration=u=o+"-transition-duration",t.transitionDelay=c=o+"-transition-delay",t.transitionTiming=s=o+"-transition-timing-function",t.animationName=d=o+"-animation-name",t.animationDuration=f=o+"-animation-duration",t.animationTiming=p=o+"-animation-delay",t.animationDelay=h=o+"-animation-timing-function"}var b={transform:v,end:a,property:l,timing:s,delay:c,duration:u};t.default=b},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return!(!e||!r.test(e))};var r=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;e.exports=t.default},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.isBody=l,t.default=function(e){var t=(0,a.default)(e),n=(0,i.default)(t);if(!(0,o.default)(t)&&!l(e))return e.scrollHeight>e.clientHeight;var r=n.getComputedStyle(t.body),u=parseInt(r.getPropertyValue("margin-left"),10),s=parseInt(r.getPropertyValue("margin-right"),10);return u+t.body.clientWidth+s<n.innerWidth};var o=r(n(230)),a=r(n(24)),i=r(n(44));function l(e){return e&&"body"===e.tagName.toLowerCase()}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return e===e.window?e:9===e.nodeType&&(e.defaultView||e.parentWindow)},e.exports=t.default},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(232))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(1)),u=(r(n(3)),r(n(7))),s=r(n(6)),c=r(n(88)),d={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}};function f(e){var t=e.classes,n=e.className,r=e.invisible,s=e.open,d=e.transitionDuration,f=(0,i.default)(e,["classes","className","invisible","open","transitionDuration"]);return l.default.createElement(c.default,(0,o.default)({in:s,timeout:d},f),l.default.createElement("div",{className:(0,u.default)(t.root,(0,a.default)({},t.invisible,r),n),"aria-hidden":"true"}))}t.styles=d,f.defaultProps={invisible:!1};var p=(0,s.default)(d,{name:"MuiBackdrop"})(f);t.default=p},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(4)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(1)),p=(r(n(3)),r(n(45))),h=n(36),m=r(n(43)),v=n(60),y={entering:{opacity:1},entered:{opacity:1}},b=(o=f.default.Component,(0,d.default)(g,o),(0,u.default)(g,[{key:"render",value:function(){var e=this.props,t=e.children,n=(e.onEnter,e.onExit,e.style),r=(e.theme,(0,i.default)(e,["children","onEnter","onExit","style","theme"])),o=(0,a.default)({},n,f.default.isValidElement(t)?t.props.style:{});return f.default.createElement(p.default,(0,a.default)({appear:!0,onEnter:this.handleEnter,onExit:this.handleExit},r),function(e,n){return f.default.cloneElement(t,(0,a.default)({style:(0,a.default)({opacity:0},y[e],o)},n))})}}]),g);function g(){var e,t;(0,l.default)(this,g);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,s.default)(this,(e=(0,c.default)(g)).call.apply(e,[this].concat(r)))).handleEnter=function(e){var n=t.props.theme;(0,v.reflow)(e);var r=(0,v.getTransitionProps)(t.props,{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),t.props.onEnter&&t.props.onEnter(e)},t.handleExit=function(e){var n=t.props.theme,r=(0,v.getTransitionProps)(t.props,{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),t.props.onExit&&t.props.onExit(e)},t}b.defaultProps={timeout:{enter:h.duration.enteringScreen,exit:h.duration.leavingScreen}};var x=(0,m.default)()(b);t.default=x},function(e,t,n){"use strict";var r;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(r=n(3))&&r.__esModule,t.timeoutsShape=null,t.classNamesShape=null},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(236))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(1)),f=(r(n(3)),r(n(45))),p=r(n(43)),h=n(60);function m(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var v,y={entering:{opacity:1,transform:m(1)},entered:{opacity:1,transform:"".concat(m(1)," translateZ(0)")}},b=(v=d.default.Component,(0,c.default)(g,v),(0,l.default)(g,[{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.onEnter,e.onExit,e.style),r=(e.theme,e.timeout),i=(0,a.default)(e,["children","onEnter","onExit","style","theme","timeout"]),l=(0,o.default)({},n,d.default.isValidElement(t)?t.props.style:{});return d.default.createElement(f.default,(0,o.default)({appear:!0,onEnter:this.handleEnter,onExit:this.handleExit,addEndListener:this.addEndListener,timeout:"auto"===r?null:r},i),function(e,n){return d.default.cloneElement(t,(0,o.default)({style:(0,o.default)({opacity:0,transform:m(.75)},y[e],l)},n))})}}]),g);function g(){var e,t;(0,i.default)(this,g);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,u.default)(this,(e=(0,s.default)(g)).call.apply(e,[this].concat(r)))).handleEnter=function(e){var n=t.props,r=n.theme,o=n.timeout;(0,h.reflow)(e);var a=(0,h.getTransitionProps)(t.props,{mode:"enter"}),i=a.duration,l=a.delay,u=0;"auto"===o?(u=r.transitions.getAutoHeightDuration(e.clientHeight),t.autoTimeout=u):u=i,e.style.transition=[r.transitions.create("opacity",{duration:u,delay:l}),r.transitions.create("transform",{duration:.666*u,delay:l})].join(","),t.props.onEnter&&t.props.onEnter(e)},t.handleExit=function(e){var n=t.props,r=n.theme,o=n.timeout,a=0,i=(0,h.getTransitionProps)(t.props,{mode:"exit"}),l=i.duration,u=i.delay;"auto"===o?(a=r.transitions.getAutoHeightDuration(e.clientHeight),t.autoTimeout=a):a=l,e.style.transition=[r.transitions.create("opacity",{duration:a,delay:u}),r.transitions.create("transform",{duration:.666*a,delay:u||.333*a})].join(","),e.style.opacity="0",e.style.transform=m(.75),t.props.onExit&&t.props.onExit(e)},t.addEndListener=function(e,n){"auto"===t.props.timeout&&(t.timer=setTimeout(n,t.autoTimeout||0))},t}b.defaultProps={timeout:"auto"},b.muiSupportAuto=!0;var x=(0,p.default)()(b);t.default=x},function(e,t,n){"use strict";var r=n(2);function o(e){var t={};return e.shadows.forEach(function(e,n){t["elevation".concat(n)]={boxShadow:e}}),(0,l.default)({root:{backgroundColor:e.palette.background.paper},rounded:{borderRadius:e.shape.borderRadius}},t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(9)),i=r(n(5)),l=r(n(4)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(r(n(15)),n(8),r(n(6)));function d(e){var t=e.classes,n=e.className,r=e.component,o=e.square,c=e.elevation,d=(0,i.default)(e,["classes","className","component","square","elevation"]),f=(0,s.default)(t.root,t["elevation".concat(c)],(0,a.default)({},t.rounded,!o),n);return u.default.createElement(r,(0,l.default)({className:f},d))}t.styles=o,d.defaultProps={component:"div",elevation:2,square:!1};var f=(0,c.default)(o,{name:"MuiPaper"})(d);t.default=f},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(239))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(4)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(1)),p=(r(n(3)),r(n(21))),h=(r(n(15)),r(n(24))),m=r(n(240)),v=(o=f.default.Component,(0,d.default)(y,o),(0,u.default)(y,[{key:"componentDidMount",value:function(){this.resetTabIndex()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.blurTimer)}},{key:"setTabIndex",value:function(e){this.setState({currentTabIndex:e})}},{key:"focus",value:function(){var e=this.state.currentTabIndex,t=this.listRef;t&&t.children&&t.firstChild&&(e&&0<=e?t.children[e].focus():t.firstChild.focus())}},{key:"resetTabIndex",value:function(){for(var e=this.listRef,t=(0,h.default)(e).activeElement,n=[],r=0;r<e.children.length;r+=1)n.push(e.children[r]);var o=n.indexOf(t);return-1!==o?this.setTabIndex(o):this.selectedItemRef?this.setTabIndex(n.indexOf(this.selectedItemRef)):this.setTabIndex(0)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=(t.onBlur,t.onKeyDown,t.disableListWrap,(0,i.default)(t,["children","className","onBlur","onKeyDown","disableListWrap"]));return f.default.createElement(m.default,(0,a.default)({role:"menu",ref:function(t){e.listRef=p.default.findDOMNode(t)},className:r,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur},o),f.default.Children.map(n,function(t,n){return f.default.isValidElement(t)?f.default.cloneElement(t,{tabIndex:n===e.state.currentTabIndex?0:-1,ref:t.props.selected?function(t){e.selectedItemRef=p.default.findDOMNode(t)}:void 0,onFocus:e.handleItemFocus}):null}))}}]),y);function y(){var e,t;(0,l.default)(this,y);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,s.default)(this,(e=(0,c.default)(y)).call.apply(e,[this].concat(r)))).state={currentTabIndex:null},t.handleBlur=function(e){t.blurTimer=setTimeout(function(){if(t.listRef){var e=t.listRef,n=(0,h.default)(e).activeElement;e.contains(n)||t.resetTabIndex()}},30),t.props.onBlur&&t.props.onBlur(e)},t.handleKeyDown=function(e){var n=t.listRef,r=e.key,o=(0,h.default)(n).activeElement;"ArrowUp"!==r&&"ArrowDown"!==r||o&&(!o||n.contains(o))?"ArrowDown"===r?(e.preventDefault(),o.nextElementSibling?o.nextElementSibling.focus():t.props.disableListWrap||n.firstChild.focus()):"ArrowUp"===r?(e.preventDefault(),o.previousElementSibling?o.previousElementSibling.focus():t.props.disableListWrap||n.lastChild.focus()):"Home"===r?(e.preventDefault(),n.firstChild.focus()):"End"===r&&(e.preventDefault(),n.lastChild.focus()):t.selectedItemRef?t.selectedItemRef.focus():n.firstChild.focus(),t.props.onKeyDown&&t.props.onKeyDown(e)},t.handleItemFocus=function(e){var n=t.listRef;if(n)for(var r=0;r<n.children.length;r+=1)if(n.children[r]===e.currentTarget){t.setTabIndex(r);break}},t}v.defaultProps={disableListWrap:!1};var b=v;t.default=b},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(241))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(1)),u=(r(n(3)),r(n(7))),s=(n(8),r(n(6))),c=r(n(242)),d={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{paddingTop:4,paddingBottom:4},subheader:{paddingTop:0}};function f(e){var t,n=e.children,r=e.classes,s=e.className,d=e.component,f=e.dense,p=e.disablePadding,h=e.subheader,m=(0,i.default)(e,["children","classes","className","component","dense","disablePadding","subheader"]);return l.default.createElement(d,(0,o.default)({className:(0,u.default)(r.root,(t={},(0,a.default)(t,r.dense,f&&!p),(0,a.default)(t,r.padding,!p),(0,a.default)(t,r.subheader,h),t),s)},m),l.default.createElement(c.default.Provider,{value:{dense:f}},h,n))}t.styles=d,f.defaultProps={component:"ul",dense:!1,disablePadding:!1};var p=(0,s.default)(d,{name:"MuiList"})(f);t.default=p},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1)).default.createContext({});t.default=o},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=void 0;var o=r(n(244)),a=n(1),i=(r(n(92)),r(n(93)),function(e){return function(t){var n=(0,a.createFactory)(t);return function(t){function r(){return t.apply(this,arguments)||this}(0,o.default)(r,t);var a=r.prototype;return a.shouldComponentUpdate=function(t){return e(this.props,t)},a.render=function(){return n(this.props)},r}(a.Component)}});t.default=i},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,t.default=function(e,t){return function(n){return n[e]=t,n}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,t.default=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":void 0}},function(e,t,n){"use strict";var r=n(2);t.__esModule=!0,t.default=void 0;var o=r(n(248)).default;t.default=o},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var i=0;i<n.length;i++)if(!r.call(t,n[i])||!o(e[n[i]],t[n[i]]))return!1;return!0}},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:24,transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:20},fontSizeLarge:{fontSize:35}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(6))),d=n(23);function f(e){var t,n=e.children,r=e.classes,o=e.className,c=e.color,f=e.component,p=e.fontSize,h=e.nativeColor,m=e.titleAccess,v=e.viewBox,y=(0,l.default)(e,["children","classes","className","color","component","fontSize","nativeColor","titleAccess","viewBox"]);return u.default.createElement(f,(0,a.default)({className:(0,s.default)(r.root,(t={},(0,i.default)(t,r["color".concat((0,d.capitalize)(c))],"inherit"!==c),(0,i.default)(t,r["fontSize".concat((0,d.capitalize)(p))],"default"!==p),t),o),focusable:"false",viewBox:v,color:h,"aria-hidden":m?"false":"true",role:m?"img":"presentation"},y),n,m?u.default.createElement("title",null,m):null)}t.styles=o,f.defaultProps={color:"inherit",component:"svg",fontSize:"default",viewBox:"0 0 24 24"},f.muiName="SvgIcon";var p=(0,c.default)(o,{name:"MuiSvgIcon"})(f);t.default=p},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{position:"relative",width:"100%"},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",paddingRight:32,borderRadius:0,height:"1.1875em",width:"calc(100% - 32px)",minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper}},filled:{width:"calc(100% - 44px)"},outlined:{width:"calc(100% - 46px)",borderRadius:e.shape.borderRadius},selectMenu:{width:"auto",height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",minHeight:"1.1875em"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",color:e.palette.action.active,"pointer-events":"none"}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(5)),l=r(n(1)),u=(r(n(3)),n(8),r(n(95))),s=r(n(6)),c=r(n(30)),d=r(n(31)),f=r(n(90)),p=r(n(54));function h(e){var t=e.children,n=e.classes,r=e.IconComponent,o=e.input,s=e.inputProps,d=e.muiFormControl,f=(e.variant,(0,i.default)(e,["children","classes","IconComponent","input","inputProps","muiFormControl","variant"])),p=(0,c.default)({props:e,muiFormControl:d,states:["variant"]});return l.default.cloneElement(o,(0,a.default)({inputComponent:u.default,inputProps:(0,a.default)({children:t,classes:n,IconComponent:r,variant:p.variant,type:void 0},s,o?o.props.inputProps:{})},f))}t.styles=o,h.defaultProps={IconComponent:f.default,input:l.default.createElement(p.default,null)},h.muiName="Select";var m=(0,s.default)(o,{name:"MuiNativeSelect"})((0,d.default)(h));t.default=m},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(4)),a=r(n(9)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(38)),p=r(n(1)),h=(r(n(3)),r(n(21))),m=r(n(7)),v=(n(8),r(n(44))),y=r(n(6)),b=r(n(252)),g=n(254),x=r(n(255)),w=r(n(259)),k={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:"none",border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}};t.styles=k;var _,E=(_=p.default.Component,(0,d.default)(S,_),(0,u.default)(S,[{key:"componentDidMount",value:function(){var e=this;this.button=h.default.findDOMNode(this),(0,g.listenForFocusKeys)((0,v.default)(this.button)),this.props.action&&this.props.action({focusVisible:function(){e.setState({focusVisible:!0}),e.button.focus()}})}},{key:"componentDidUpdate",value:function(e,t){this.props.focusRipple&&!this.props.disableRipple&&!t.focusVisible&&this.state.focusVisible&&this.ripple.pulsate()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusVisibleTimeout)}},{key:"render",value:function(){var e,t=this.props,n=(t.action,t.buttonRef),r=t.centerRipple,l=t.children,u=t.classes,s=t.className,c=t.component,d=t.disabled,f=t.disableRipple,h=(t.disableTouchRipple,t.focusRipple,t.focusVisibleClassName),v=(t.onBlur,t.onFocus,t.onFocusVisible,t.onKeyDown,t.onKeyUp,t.onMouseDown,t.onMouseLeave,t.onMouseUp,t.onTouchEnd,t.onTouchMove,t.onTouchStart,t.tabIndex),y=t.TouchRippleProps,g=t.type,w=(0,i.default)(t,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","type"]),k=(0,m.default)(u.root,(e={},(0,a.default)(e,u.disabled,d),(0,a.default)(e,u.focusVisible,this.state.focusVisible),(0,a.default)(e,h,this.state.focusVisible),e),s),_=c;"button"===_&&w.href&&(_="a");var E={};return"button"===_?(E.type=g||"button",E.disabled=d):E.role="button",p.default.createElement(_,(0,o.default)({className:k,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onMouseDown:this.handleMouseDown,onMouseLeave:this.handleMouseLeave,onMouseUp:this.handleMouseUp,onTouchEnd:this.handleTouchEnd,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onContextMenu:this.handleContextMenu,ref:n,tabIndex:d?"-1":v},E,w),l,f||d?null:p.default.createElement(b.default,null,p.default.createElement(x.default,(0,o.default)({innerRef:this.onRippleRef,center:r},y))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0===t.focusVisible?{focusVisible:!1,lastDisabled:e.disabled}:!t.prevState&&e.disabled&&t.focusVisible?{focusVisible:!1,lastDisabled:e.disabled}:{lastDisabled:e.disabled}}}]),S);function S(){var e,t;(0,l.default)(this,S);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,s.default)(this,(e=(0,c.default)(S)).call.apply(e,[this].concat(r)))).state={},t.keyDown=!1,t.focusVisibleCheckTime=50,t.focusVisibleMaxCheckTimes=5,t.handleMouseDown=(0,w.default)((0,f.default)((0,f.default)(t)),"MouseDown","start",function(){clearTimeout(t.focusVisibleTimeout),t.state.focusVisible&&t.setState({focusVisible:!1})}),t.handleMouseUp=(0,w.default)((0,f.default)((0,f.default)(t)),"MouseUp","stop"),t.handleMouseLeave=(0,w.default)((0,f.default)((0,f.default)(t)),"MouseLeave","stop",function(e){t.state.focusVisible&&e.preventDefault()}),t.handleTouchStart=(0,w.default)((0,f.default)((0,f.default)(t)),"TouchStart","start"),t.handleTouchEnd=(0,w.default)((0,f.default)((0,f.default)(t)),"TouchEnd","stop"),t.handleTouchMove=(0,w.default)((0,f.default)((0,f.default)(t)),"TouchMove","stop"),t.handleContextMenu=(0,w.default)((0,f.default)((0,f.default)(t)),"ContextMenu","stop"),t.handleBlur=(0,w.default)((0,f.default)((0,f.default)(t)),"Blur","stop",function(){clearTimeout(t.focusVisibleTimeout),t.state.focusVisible&&t.setState({focusVisible:!1})}),t.onRippleRef=function(e){t.ripple=e},t.onFocusVisibleHandler=function(e){t.keyDown=!1,t.setState({focusVisible:!0}),t.props.onFocusVisible&&t.props.onFocusVisible(e)},t.handleKeyDown=function(e){var n=t.props,r=n.component,o=n.focusRipple,a=n.onKeyDown,i=n.onClick;o&&!t.keyDown&&t.state.focusVisible&&t.ripple&&" "===e.key&&(t.keyDown=!0,e.persist(),t.ripple.stop(e,function(){t.ripple.start(e)})),a&&a(e),e.target!==e.currentTarget||!r||"button"===r||" "!==e.key&&"Enter"!==e.key||"A"===t.button.tagName&&t.button.href||(e.preventDefault(),i&&i(e))},t.handleKeyUp=function(e){t.props.focusRipple&&" "===e.key&&t.ripple&&t.state.focusVisible&&(t.keyDown=!1,e.persist(),t.ripple.stop(e,function(){t.ripple.pulsate(e)})),t.props.onKeyUp&&t.props.onKeyUp(e)},t.handleFocus=function(e){t.props.disabled||(t.button||(t.button=e.currentTarget),e.persist(),(0,g.detectFocusVisible)((0,f.default)((0,f.default)(t)),t.button,function(){t.onFocusVisibleHandler(e)}),t.props.onFocus&&t.props.onFocus(e))},t}E.defaultProps={centerRipple:!1,component:"button",disableRipple:!1,disableTouchRipple:!1,focusRipple:!1,tabIndex:"0",type:"button"};var C=(0,y.default)(k,{name:"MuiButtonBase"})(E);t.default=C},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(253))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(10)),i=r(n(11)),l=r(n(12)),u=r(n(13)),s=r(n(14)),c=r(n(1)),d=(r(n(3)),n(8),o=c.default.Component,(0,s.default)(f,o),(0,i.default)(f,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0,this.props.defer?requestAnimationFrame(function(){requestAnimationFrame(function(){e.mounted&&e.setState({mounted:!0})})}):this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.fallback;return this.state.mounted?t:n}}]),f);function f(){var e,t;(0,a.default)(this,f);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,l.default)(this,(e=(0,u.default)(f)).call.apply(e,[this].concat(r)))).mounted=!1,t.state={mounted:!1},t}d.defaultProps={defer:!1,fallback:null};var p=d;t.default=p},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.detectFocusVisible=function e(t,n,r){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;t.focusVisibleTimeout=setTimeout(function(){var l=(0,o.default)(n),u=function(e){for(var t=l.activeElement;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}();a.focusKeyPressed&&(u===n||n.contains(u))?r():i<t.focusVisibleMaxCheckTimes&&e(t,n,r,i+1)},t.focusVisibleCheckTime)},t.listenForFocusKeys=function(e){e.addEventListener("keyup",l)},r(n(15));var o=r(n(24)),a={focusKeyPressed:!1,keyUpEventTimeout:-1},i=[9,13,27,32,37,38,39,40],l=function(e){var t;t=e,-1<i.indexOf(t.keyCode)&&(a.focusKeyPressed=!0,clearTimeout(a.keyUpEventTimeout),a.keyUpEventTimeout=setTimeout(function(){a.focusKeyPressed=!1},500))}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=t.DELAY_RIPPLE=void 0;var o=r(n(4)),a=r(n(5)),i=r(n(59)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(38)),p=r(n(1)),h=(r(n(3)),r(n(21))),m=r(n(256)),v=r(n(7)),y=r(n(6)),b=r(n(258));function g(e){return{root:{display:"block",position:"absolute",overflow:"hidden",borderRadius:"inherit",width:"100%",height:"100%",left:0,top:0,pointerEvents:"none",zIndex:0},ripple:{width:50,height:50,left:0,top:0,opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"mui-ripple-enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut),animationName:"$mui-ripple-enter"},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"mui-ripple-exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut),animationName:"$mui-ripple-exit"},childPulsate:{position:"absolute",left:0,top:0,animation:"mui-ripple-pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite"),animationName:"$mui-ripple-pulsate"},"@keyframes mui-ripple-enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes mui-ripple-exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes mui-ripple-pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}t.DELAY_RIPPLE=80,t.styles=g;var x,w=(x=p.default.PureComponent,(0,d.default)(k,x),(0,u.default)(k,[{key:"componentWillUnmount",value:function(){clearTimeout(this.startTimer)}},{key:"render",value:function(){var e=this.props,t=(e.center,e.classes),n=e.className,r=(0,a.default)(e,["center","classes","className"]);return p.default.createElement(m.default,(0,o.default)({component:"span",enter:!0,exit:!0,className:(0,v.default)(t.root,n)},r),this.state.ripples)}}]),k);function k(){var e,t;(0,l.default)(this,k);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,s.default)(this,(e=(0,c.default)(k)).call.apply(e,[this].concat(r)))).state={nextKey:0,ripples:[]},t.pulsate=function(){t.start({},{pulsate:!0})},t.start=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length?arguments[2]:void 0,o=n.pulsate,a=void 0!==o&&o,i=n.center,l=void 0===i?t.props.center||n.pulsate:i,u=n.fakeElement,s=void 0!==u&&u;if("mousedown"===e.type&&t.ignoringMouseDown)t.ignoringMouseDown=!1;else{"touchstart"===e.type&&(t.ignoringMouseDown=!0);var c,d,p,m=s?null:h.default.findDOMNode((0,f.default)((0,f.default)(t))),v=m?m.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(v.width/2),d=Math.round(v.height/2);else{var y=e.clientX?e.clientX:e.touches[0].clientX,b=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(y-v.left),d=Math.round(b-v.top)}if(l)(p=Math.sqrt((2*Math.pow(v.width,2)+Math.pow(v.height,2))/3))%2==0&&(p+=1);else{var g=2*Math.max(Math.abs((m?m.clientWidth:0)-c),c)+2,x=2*Math.max(Math.abs((m?m.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(g,2)+Math.pow(x,2))}e.touches?(t.startTimerCommit=function(){t.startCommit({pulsate:a,rippleX:c,rippleY:d,rippleSize:p,cb:r})},t.startTimer=setTimeout(function(){t.startTimerCommit&&(t.startTimerCommit(),t.startTimerCommit=null)},80)):t.startCommit({pulsate:a,rippleX:c,rippleY:d,rippleSize:p,cb:r})}},t.startCommit=function(e){var n=e.pulsate,r=e.rippleX,o=e.rippleY,a=e.rippleSize,l=e.cb;t.setState(function(e){return{nextKey:e.nextKey+1,ripples:[].concat((0,i.default)(e.ripples),[p.default.createElement(b.default,{key:e.nextKey,classes:t.props.classes,timeout:{exit:550,enter:550},pulsate:n,rippleX:r,rippleY:o,rippleSize:a})])}},l)},t.stop=function(e,n){clearTimeout(t.startTimer);var r=t.state.ripples;if("touchend"===e.type&&t.startTimerCommit)return e.persist(),t.startTimerCommit(),t.startTimerCommit=null,void(t.startTimer=setTimeout(function(){t.stop(e,n)}));t.startTimerCommit=null,r&&r.length&&t.setState({ripples:r.slice(1)},n)},t}w.defaultProps={center:!1};var _=(0,y.default)(g,{flip:!1,name:"MuiTouchRipple"})(w);t.default=_},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(3)),o=l(n(1)),a=n(89),i=n(257);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},d=function(e){var t,n;function r(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n;var a=r.prototype;return a.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},a.componentDidMount=function(){this.appeared=!0,this.mounted=!0},a.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},a.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=u({},t.children);return delete n[e.key],{children:n}}))},a.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(d);t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var l=o(e.children),u=a(t,l);return Object.keys(u).forEach(function(o){var a=u[o];if((0,r.isValidElement)(a)){var s=o in t,c=o in l,d=t[o],f=(0,r.isValidElement)(d)&&!d.props.in;!c||s&&!f?c||!s||f?c&&s&&(0,r.isValidElement)(d)&&(u[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:d.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):u[o]=(0,r.cloneElement)(a,{in:!1}):u[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),u};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){var o;n[e.key]=(o=e,t&&(0,r.isValidElement)(o)?t(o):o)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var l={};for(var u in t){if(o[u])for(r=0;r<o[u].length;r++){var s=o[u][r];l[o[u][r]]=n(s)}l[u]=n(u)}for(r=0;r<a.length;r++)l[a[r]]=n(a[r]);return l}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(10)),s=r(n(11)),c=r(n(12)),d=r(n(13)),f=r(n(14)),p=r(n(1)),h=(r(n(3)),r(n(7))),m=r(n(45)),v=(o=p.default.Component,(0,f.default)(y,o),(0,s.default)(y,[{key:"render",value:function(){var e,t,n=this.props,r=n.classes,o=n.className,u=n.pulsate,s=n.rippleX,c=n.rippleY,d=n.rippleSize,f=(0,l.default)(n,["classes","className","pulsate","rippleX","rippleY","rippleSize"]),v=this.state,y=v.visible,b=v.leaving,g=(0,h.default)(r.ripple,(e={},(0,i.default)(e,r.rippleVisible,y),(0,i.default)(e,r.ripplePulsate,u),e),o),x={width:d,height:d,top:-d/2+c,left:-d/2+s},w=(0,h.default)(r.child,(t={},(0,i.default)(t,r.childLeaving,b),(0,i.default)(t,r.childPulsate,u),t));return p.default.createElement(m.default,(0,a.default)({onEnter:this.handleEnter,onExit:this.handleExit},f),p.default.createElement("span",{className:g,style:x},p.default.createElement("span",{className:w})))}}]),y);function y(){var e,t;(0,u.default)(this,y);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,c.default)(this,(e=(0,d.default)(y)).call.apply(e,[this].concat(r)))).state={visible:!1,leaving:!1},t.handleEnter=function(){t.setState({visible:!0})},t.handleExit=function(){t.setState({leaving:!0})},t}v.defaultProps={pulsate:!1};var b=v;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t,n,r){return function(o){r&&r.call(e,o);var a=!1;return o.defaultPrevented&&(a=!0),e.props.disableTouchRipple&&"Blur"!==t&&(a=!0),!a&&e.ripple&&e.ripple[n](o),"function"==typeof e.props["on".concat(t)]&&e.props["on".concat(t)](o),!0}};"undefined"==typeof window&&(r=function(){return function(){}});var o=r;t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getID=function(e){var t=e.getAttribute("id");return null!==t&&""!==t?t.match(/^\d/)?'[id="'+t+'"]':"#"+t:null}},function(e,t,n){"use strict";function r(e){if(!e.hasAttribute("class"))return[];try{return Array.prototype.slice.call(e.classList).filter(function(e){return/^[a-z_-][a-z\d_-]*$/i.test(e)?e:null})}catch(n){var t=e.getAttribute("class");return(t=t.trim().replace(/\s+/g," ")).split(" ")}}Object.defineProperty(t,"__esModule",{value:!0}),t.getClasses=r,t.getClassSelectors=function(e){return r(e).filter(Boolean).map(function(e){return"."+e})}},function(e,t,n){"use strict";function r(e,t,n,o,a,i,l){if(i!==l)for(var u=o;u<=a&&l-i<=a-u+1;++u)n[i]=t[u],r(e,t,n,u+1,a,i+1,l);else e.push(n.slice(0,i).join(""))}Object.defineProperty(t,"__esModule",{value:!0}),t.getCombinations=function(e,t){for(var n=[],o=e.length,a=[],i=1;i<=t;++i)r(n,e,a,0,o-1,0,i);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributes=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:["id","class","length"],n=e.attributes;return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n)).reduce(function(e,n){return-1<t.indexOf(n.nodeName)||e.push("["+n.nodeName+'="'+n.value+'"]'),e},[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNthChild=function(e){var t=0,n=void 0,o=void 0,a=e.parentNode;if(Boolean(a)){var i=a.childNodes,l=i.length;for(n=0;n<l;n++)if(o=i[n],(0,r.isElement)(o)&&(t++,o===e))return":nth-child("+t+")"}return null};var r=n(97)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTag=function(e){return e.tagName.toLowerCase().replace(/:/g,"\\:")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUnique=function(e,t){if(!Boolean(t))return!1;var n=e.ownerDocument.querySelectorAll(t);return 1===n.length&&n[0]===e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParents=function(e){for(var t=[],n=e;(0,r.isElement)(n);)t.push(n),n=n.parentNode;return t};var r=n(97)},function(e,t,n){var r=n(269),o=n(270),a=n(271);e.exports=function(e,t){return r(e)||o(e,t)||a()}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})}},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function i(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=a(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=i(n[0]);r!==n[0]&&(t[n[0]]=r)}n=o.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),l=0;l<a.length;l++){var u=a[l];e=e.replace(new RegExp(u,"g"),t[u])}return e}(e)}}},function(e,t,n){"use strict";e.exports=function(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];var n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{display:"block",margin:0},display4:e.typography.display4,display3:e.typography.display3,display2:e.typography.display2,display1:e.typography.display1,headline:e.typography.headline,title:e.typography.title,subheading:e.typography.subheading,body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},inline:{display:"inline"}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(6))),d=n(23);t.styles=o;var f={display4:"h1",display3:"h2",display2:"h3",display1:"h4",headline:"h5",title:"h6",subheading:"subtitle1"},p={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",display4:"h1",display3:"h1",display2:"h1",display1:"h1",headline:"h1",title:"h2",subheading:"h3"};function h(e){var t,n,r,o,c=e.align,h=e.classes,m=e.className,v=e.color,y=e.component,b=e.gutterBottom,g=e.headlineMapping,x=e.inline,w=(e.internalDeprecatedVariant,e.noWrap),k=e.paragraph,_=e.theme,E=e.variant,S=(0,l.default)(e,["align","classes","className","color","component","gutterBottom","headlineMapping","inline","internalDeprecatedVariant","noWrap","paragraph","theme","variant"]),C=(n=E,r=_.typography,(o=n)||(o=r.useNextVariants?"body2":"body1"),r.useNextVariants&&(o=f[o]||o),o),O=(0,s.default)(h.root,(t={},(0,i.default)(t,h[C],"inherit"!==C),(0,i.default)(t,h["color".concat((0,d.capitalize)(v))],"default"!==v),(0,i.default)(t,h.noWrap,w),(0,i.default)(t,h.gutterBottom,b),(0,i.default)(t,h.paragraph,k),(0,i.default)(t,h["align".concat((0,d.capitalize)(c))],"inherit"!==c),(0,i.default)(t,h.inline,x),t),m),P=y||(k?"p":g[C]||p[C])||"span";return u.default.createElement(P,(0,a.default)({className:O},S))}h.defaultProps={align:"inherit",color:"default",gutterBottom:!1,headlineMapping:p,inline:!1,noWrap:!1,paragraph:!1};var m=(0,c.default)(o,{name:"MuiTypography",withTheme:!0})(h);t.default=m},function(e,t,n){"use strict";var r=n(2);function o(e){var t={top:0},n={bottom:0},r={justifyContent:"flex-end"},o={justifyContent:"flex-start"},a={top:24},i={bottom:24},l={right:24},u={left:24},s={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:0,right:0,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:(0,f.default)({},t,(0,d.default)({},e.breakpoints.up("md"),(0,f.default)({},s))),anchorOriginBottomCenter:(0,f.default)({},n,(0,d.default)({},e.breakpoints.up("md"),(0,f.default)({},s))),anchorOriginTopRight:(0,f.default)({},t,r,(0,d.default)({},e.breakpoints.up("md"),(0,f.default)({left:"auto"},a,l))),anchorOriginBottomRight:(0,f.default)({},n,r,(0,d.default)({},e.breakpoints.up("md"),(0,f.default)({left:"auto"},i,l))),anchorOriginTopLeft:(0,f.default)({},t,o,(0,d.default)({},e.breakpoints.up("md"),(0,f.default)({right:"auto"},a,u))),anchorOriginBottomLeft:(0,f.default)({},n,o,(0,d.default)({},e.breakpoints.up("md"),(0,f.default)({right:"auto"},i,u)))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(5)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(9)),f=r(n(4)),p=r(n(1)),h=(r(n(3)),r(n(7))),m=r(n(22)),v=(n(8),r(n(6))),y=n(36),b=r(n(277)),g=n(23),x=r(n(279)),w=r(n(281));t.styles=o;var k,_=(k=p.default.Component,(0,c.default)(E,k),(0,l.default)(E,[{key:"componentDidMount",value:function(){this.props.open&&this.setAutoHideTimer()}},{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.props.open?this.setAutoHideTimer():clearTimeout(this.timerAutoHide))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timerAutoHide)}},{key:"setAutoHideTimer",value:function(e){var t=this,n=null!=e?e:this.props.autoHideDuration;this.props.onClose&&null!=n&&(clearTimeout(this.timerAutoHide),this.timerAutoHide=setTimeout(function(){var n=null!=e?e:t.props.autoHideDuration;t.props.onClose&&null!=n&&t.props.onClose(null,"timeout")},n))}},{key:"render",value:function(){var e=this.props,t=e.action,n=e.anchorOrigin,r=n.vertical,o=n.horizontal,i=(e.autoHideDuration,e.children),l=e.classes,u=e.className,s=e.ClickAwayListenerProps,c=e.ContentProps,d=e.disableWindowBlurListener,v=e.message,y=(e.onClose,e.onEnter),x=e.onEntered,k=e.onEntering,_=e.onExit,E=e.onExited,S=e.onExiting,C=(e.onMouseEnter,e.onMouseLeave,e.open),O=(e.resumeHideDuration,e.TransitionComponent),P=e.transitionDuration,T=e.TransitionProps,M=(0,a.default)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]);return!C&&this.state.exited?null:p.default.createElement(b.default,(0,f.default)({onClickAway:this.handleClickAway},s),p.default.createElement("div",(0,f.default)({className:(0,h.default)(l.root,l["anchorOrigin".concat((0,g.capitalize)(r)).concat((0,g.capitalize)(o))],u),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},M),p.default.createElement(m.default,{target:"window",onFocus:d?void 0:this.handleResume,onBlur:d?void 0:this.handlePause}),p.default.createElement(O,(0,f.default)({appear:!0,in:C,onEnter:y,onEntered:x,onEntering:k,onExit:_,onExited:(0,g.createChainedFunction)(this.handleExited,E),onExiting:S,timeout:P,direction:"top"===r?"down":"up"},T),i||p.default.createElement(w.default,(0,f.default)({message:v,action:t},c)))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0===t.exited?{exited:!e.open}:e.open?{exited:!1}:null}}]),E);function E(){var e,t;(0,i.default)(this,E);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,u.default)(this,(e=(0,s.default)(E)).call.apply(e,[this].concat(r)))).state={},t.handleMouseEnter=function(e){t.props.onMouseEnter&&t.props.onMouseEnter(e),t.handlePause()},t.handleMouseLeave=function(e){t.props.onMouseLeave&&t.props.onMouseLeave(e),t.handleResume()},t.handleClickAway=function(e){t.props.onClose&&t.props.onClose(e,"clickaway")},t.handlePause=function(){clearTimeout(t.timerAutoHide)},t.handleResume=function(){if(null!=t.props.autoHideDuration){if(null!=t.props.resumeHideDuration)return void t.setAutoHideTimer(t.props.resumeHideDuration);t.setAutoHideTimer(.5*t.props.autoHideDuration)}},t.handleExited=function(){t.setState({exited:!0})},t}_.defaultProps={anchorOrigin:{vertical:"bottom",horizontal:"center"},disableWindowBlurListener:!1,TransitionComponent:x.default,transitionDuration:{enter:y.duration.enteringScreen,exit:y.duration.leavingScreen}};var S=(0,v.default)(o,{flip:!1,name:"MuiSnackbar"})(_);t.default=S},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(278))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=r(n(4)),i=r(n(5)),l=r(n(10)),u=r(n(11)),s=r(n(12)),c=r(n(13)),d=r(n(14)),f=r(n(1)),p=r(n(21)),h=(r(n(3)),r(n(22))),m=r(n(24)),v=(o=f.default.Component,(0,d.default)(y,o),(0,u.default)(y,[{key:"componentDidMount",value:function(){this.node=p.default.findDOMNode(this),this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.mouseEvent,r=e.touchEvent,o=(e.onClickAway,(0,i.default)(e,["children","mouseEvent","touchEvent","onClickAway"])),l={};return!1!==n&&(l[n]=this.handleClickAway),!1!==r&&(l[r]=this.handleClickAway,l.onTouchMove=this.handleTouchMove),f.default.createElement(f.default.Fragment,null,t,f.default.createElement(h.default,(0,a.default)({target:"document"},l,o)))}}]),y);function y(){var e,t;(0,l.default)(this,y);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=(0,s.default)(this,(e=(0,c.default)(y)).call.apply(e,[this].concat(r)))).mounted=!1,t.moved=!1,t.handleClickAway=function(e){if(!e.defaultPrevented&&t.mounted)if(t.moved)t.moved=!1;else if(t.node){var n=(0,m.default)(t.node);n.documentElement&&n.documentElement.contains(e.target)&&!t.node.contains(e.target)&&t.props.onClickAway(e)}},t.handleTouchMove=function(){t.moved=!0},t}v.defaultProps={mouseEvent:"onMouseUp",touchEvent:"onTouchEnd"};var b=v;t.default=b},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(280))},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.setTranslateValue=w,t.default=void 0;var o=r(n(5)),a=r(n(4)),i=r(n(10)),l=r(n(11)),u=r(n(12)),s=r(n(13)),c=r(n(14)),d=r(n(1)),f=(r(n(3)),r(n(21))),p=r(n(22)),h=r(n(57)),m=r(n(45)),v=r(n(44)),y=r(n(43)),b=n(36),g=n(60),x=24;function w(e,t){var n=function(t,n){var r,o=e.direction,a=n.getBoundingClientRect();if(n.fakeTransform)r=n.fakeTransform;else{var i=(0,v.default)(n).getComputedStyle(n);r=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var l=0,u=0;if(r&&"none"!==r&&"string"==typeof r){var s=r.split("(")[1].split(")")[0].split(",");l=parseInt(s[4],10),u=parseInt(s[5],10)}return"left"===o?"translateX(100vw) translateX(-".concat(a.left-l,"px)"):"right"===o?"translateX(-".concat(a.left+a.width+x-l,"px)"):"up"===o?"translateY(100vh) translateY(-".concat(a.top-u,"px)"):"translateY(-".concat(a.top+a.height+x-u,"px)")}(0,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var k,_=(k=d.default.Component,(0,c.default)(E,k),(0,l.default)(E,[{key:"componentDidMount",value:function(){this.mounted=!0,this.props.in||this.updatePosition()}},{key:"componentDidUpdate",value:function(e){e.direction===this.props.direction||this.props.in||this.updatePosition()}},{key:"componentWillUnmount",value:function(){this.handleResize.clear()}},{key:"updatePosition",value:function(){this.transitionRef&&(this.transitionRef.style.visibility="inherit",w(this.props,this.transitionRef))}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=(t.direction,t.onEnter,t.onEntering,t.onExit,t.onExited,t.style),i=(t.theme,(0,o.default)(t,["children","direction","onEnter","onEntering","onExit","onExited","style","theme"])),l={};return this.props.in||this.mounted||(l.visibility="hidden"),l=(0,a.default)({},l,r,d.default.isValidElement(n)?n.props.style:{}),d.default.createElement(p.default,{target:"window",onResize:this.handleResize},d.default.createElement(m.default,(0,a.default)({onEnter:this.handleEnter,onEntering:this.handleEntering,onExit:this.handleExit,onExited:this.handleExited,appear:!0,style:l,ref:function(t){e.transitionRef=f.default.findDOMNode(t)}},i),n))}}]),E);function E(){var e;return(0,i.default)(this,E),(e=(0,u.default)(this,(0,s.default)(E).call(this))).mounted=!1,e.handleEnter=function(t){w(e.props,t),(0,g.reflow)(t),e.props.onEnter&&e.props.onEnter(t)},e.handleEntering=function(t){var n=e.props.theme,r=(0,g.getTransitionProps)(e.props,{mode:"enter"});t.style.webkitTransition=n.transitions.create("-webkit-transform",(0,a.default)({},r,{easing:n.transitions.easing.easeOut})),t.style.transition=n.transitions.create("transform",(0,a.default)({},r,{easing:n.transitions.easing.easeOut})),t.style.webkitTransform="translate(0, 0)",t.style.transform="translate(0, 0)",e.props.onEntering&&e.props.onEntering(t)},e.handleExit=function(t){var n=e.props.theme,r=(0,g.getTransitionProps)(e.props,{mode:"exit"});t.style.webkitTransition=n.transitions.create("-webkit-transform",(0,a.default)({},r,{easing:n.transitions.easing.sharp})),t.style.transition=n.transitions.create("transform",(0,a.default)({},r,{easing:n.transitions.easing.sharp})),w(e.props,t),e.props.onExit&&e.props.onExit(t)},e.handleExited=function(t){t.style.webkitTransition="",t.style.transition="",e.props.onExited&&e.props.onExited(t)},"undefined"!=typeof window&&(e.handleResize=(0,h.default)(function(){e.props.in||"down"===e.props.direction||"right"===e.props.direction||e.transitionRef&&w(e.props,e.transitionRef)},166)),e}_.defaultProps={direction:"down",timeout:{enter:b.duration.enteringScreen,exit:b.duration.leavingScreen}};var S=(0,y.default)()(_);t.default=S},function(e,t,n){"use strict";var r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(282))},function(e,t,n){"use strict";var r=n(2);function o(e){var t,n="light"===e.palette.type?.8:.98,r=(0,p.emphasize)(e.palette.background.default,n);return{root:(t={color:e.palette.getContrastText(r),backgroundColor:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 24px"},(0,l.default)(t,e.breakpoints.up("md"),{minWidth:288,maxWidth:568,borderRadius:e.shape.borderRadius}),(0,l.default)(t,e.breakpoints.down("sm"),{flexGrow:1}),t),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:24,marginRight:-8}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(5)),l=r(n(9)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=r(n(6)),d=r(n(61)),f=r(n(62)),p=n(35);t.styles=o;var h=(0,c.default)(o,{name:"MuiSnackbarContent"})(function(e){var t=e.action,n=e.classes,r=e.className,o=e.message,l=(0,i.default)(e,["action","classes","className","message"]);return u.default.createElement(d.default,(0,a.default)({component:f.default,headlineMapping:{body1:"div",body2:"div"},role:"alertdialog",square:!0,elevation:6,className:(0,s.default)(n.root,r)},l),u.default.createElement("div",{className:n.message},o),t?u.default.createElement("div",{className:n.action},t):null)});t.default=h},function(e,t,n){"use strict";var r=n(2);function o(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,d.fade)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var a=r(n(4)),i=r(n(9)),l=r(n(5)),u=r(n(1)),s=(r(n(3)),r(n(7))),c=(n(8),r(n(6))),d=n(35),f=r(n(96)),p=n(23);function h(e){var t,n=e.children,r=e.classes,o=e.className,c=e.color,d=e.disabled,h=(0,l.default)(e,["children","classes","className","color","disabled"]);return u.default.createElement(f.default,(0,a.default)({className:(0,s.default)(r.root,(t={},(0,i.default)(t,r["color".concat((0,p.capitalize)(c))],"default"!==c),(0,i.default)(t,r.disabled,d),t),o),centerRipple:!0,focusRipple:!0,disabled:d},h),u.default.createElement("span",{className:r.label},n))}t.styles=o,h.defaultProps={color:"default",disabled:!1};var m=(0,c.default)(o,{name:"MuiIconButton"})(h);t.default=m},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,s=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?s=u.concat(s):d=-1,s.length&&p())}function p(){if(!c){var e=l(f);c=!0;for(var t=s.length;t;){for(u=s,s=[];++d<t;)u&&u[d].run();d=-1,t=s.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new h(e,t)),1!==s.length||c||l(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function o(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}var a,i=(a=function(e,t){for(var n={},r={},o=0,a=e.length;o<a;)o+=r[e[o]]=1;for(var i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n},function e(t,n){switch(arguments.length){case 0:return e;case 1:return r(t)?e:o(function(e){return a(t,e)});default:return r(t)&&r(n)?e:r(t)?o(function(e){return a(e,n)}):r(n)?o(function(e){return a(t,e)}):a(t,n)}});t.a=i}]])},function(e,t){(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{120:function(e,t,n){e.exports=n(286)},125:function(e,t,n){},285:function(e,t,n){},286:function(e,t,n){"use strict";n.r(t);var r,o,a=n(1),i=n.n(a),l=n(21),u=n.n(l),s=n(47),c=n(16),d=n(17),f=n(19),p=n(18),h=n(20),m=(n(125),n(100)),v=n.n(m),y=(o=i.a.Component,Object(h.a)(E,o),Object(d.a)(E,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.handleScroll)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.handleScroll)}},{key:"render",value:function(){var e=this.state.progress,t=this.props.classes;return i.a.createElement("div",{className:t.container},i.a.createElement(v.a,{variant:"determinate",value:e,classes:{colorPrimary:t.barBackground,bar:t.barProgress}}))}}]),E),b=n(63),g=Object(b.withStyles)(function(){return{container:{position:"fixed",bottom:"20px",width:"100%"},barBackground:{backgroundColor:"#B5B5B5"},barProgress:{backgroundColor:"#E10F21"}}})(y),x=n(102),w=i.a.createContext({}),k=(r=i.a.Component,Object(h.a)(_,r),Object(d.a)(_,[{key:"render",value:function(){return i.a.createElement("span",null,i.a.createElement("a",{href:"https://www.qwant.com/?q=".concat(this.context.currentSelectedString,"&t=web"),target:"blank"},i.a.createElement(x.a,null)))}}]),_);function _(){return Object(c.a)(this,_),Object(f.a)(this,Object(p.a)(_).apply(this,arguments))}function E(e){var t;return Object(c.a)(this,E),(t=Object(f.a)(this,Object(p.a)(E).call(this,e))).handleScroll=function(){t.setState({progress:window.scrollY?(window.scrollY+window.innerHeight)/document.documentElement.scrollHeight*100:window.scrollY})},t.state={progress:0},t}k.contextType=w;var S,C=n(33),O=(S=i.a.Component,Object(h.a)(P,S),Object(d.a)(P,[{key:"render",value:function(){return i.a.createElement("span",{onClick:this.handleClick},i.a.createElement(C.a,null))}}]),P);function P(){var e,t;Object(c.a)(this,P);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=Object(f.a)(this,(e=Object(p.a)(P)).call.apply(e,[this].concat(r)))).handleClick=function(){t.context.setIsDialogOpen(!0)},t}O.contextType=w;var T,M=(T=i.a.Component,Object(h.a)(j,T),Object(d.a)(j,[{key:"render",value:function(){var e=this.props.onClick;return i.a.createElement("span",{onClick:e},i.a.createElement(C.c,null))}}]),j);function j(){return Object(c.a)(this,j),Object(f.a)(this,Object(p.a)(j).apply(this,arguments))}function R(){return i.a.createElement("span",{onClick:function(){window.open("slack://channel?team=TGKG907GE&id=CGJ28PMM2","_blank")}},i.a.createElement(C.b,null))}M.contextType=w;var N,D=n(103),I=n(108),A=n.n(I),F=n(25),z=n.n(F),L=(N=i.a.Component,Object(h.a)(U,N),Object(d.a)(U,[{key:"render",value:function(){var e=this.props.classes,t=this.state.commentValue,n=this.context,r=n.isCommentInputOpen,o=n.isPopoverOpen;return i.a.createElement(D.a,{className:e.popover,isOpen:o,onTextSelect:this.handleTextSelect,onTextUnselect:this.handleTextUnSelect},i.a.createElement("div",{className:e.popoverButton},i.a.createElement(k,null),i.a.createElement(O,null),i.a.createElement(M,{onClick:this.handleOpenCommentInput}),i.a.createElement(R,null),r&&i.a.createElement("span",{className:e.closeCross,onClick:this.handleCloseCommentInput},"x")),r&&i.a.createElement("div",{className:e.commentInputContainer},i.a.createElement(A.a,{placeholder:"Entrez un commentaire",className:e.commentInput,multiline:!0,variant:"outlined",rowsMax:"4",value:t,onChange:this.handleInputChange}),i.a.createElement(z.a,{color:"primary",variant:"contained",onClick:this.handleAddComment},"Ok")))}}]),U);function U(){var e,t;Object(c.a)(this,U);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=Object(f.a)(this,(e=Object(p.a)(U)).call.apply(e,[this].concat(r)))).state={commentValue:""},t.handleTextSelect=function(){t.context.setIsPopoverOpen(!0)},t.handleTextUnSelect=function(){t.context.isCommentInputOpen||t.context.closePopover()},t.handleInputChange=function(e){t.setState({commentValue:e.target.value})},t.handleOpenCommentInput=function(){t.context.setIsCommentInputOpen(!t.context.isCommentInputOpen)},t.handleCloseCommentInput=function(){t.setState({isOpen:!1}),t.context.closePopover()},t.handleAddComment=function(){var e=t.state.commentValue;t.context.setIsPopoverOpen(!1),t.context.setIsCommentInputOpen(!1);var n=JSON.parse(localStorage.getItem("comments"))||{};n[t.context.currentSelectedStringId]=e,localStorage.setItem("comments",JSON.stringify(n))},t}L.contextType=w;var W,B=Object(b.withStyles)(function(){return{popover:{maxWidth:"200px",backgroundColor:"#333",color:"white",borderRadius:"0.25em",userSelect:"none",pointerEvents:"auto !important",height:"auto"},popoverButton:{display:"flex","& *":{color:"white"},"& > span":{padding:"5px 10px",color:"white",borderRight:"1px solid white",cursor:"pointer"},"& > :last-child":{borderLeft:"none"}},commentInput:{backgroundColor:"white",border:"1px solid #333",width:"198px"},commentInputContainer:{display:"flex",flexDirection:"column"},closeCross:{marginLeft:"29px",marginRight:"5px",borderRight:"none !important",padding:"3px 5px !important"}}})(L),V=n(37),H=n.n(V),$=n(46),q=n(110),K=n.n(q),G=n(111),Y=n.n(G),X=n(112),Q=n.n(X),J=n(113),Z=n.n(J),ee=n(64),te=n.n(ee),ne=n(114),re=n.n(ne),oe=n(109),ae=n.n(oe),ie=(W=i.a.Component,Object(h.a)(le,W),Object(d.a)(le,[{key:"componentWillReceiveProps",value:function(e){e.isOpen!==this.props.isOpen&&this.setState({inputValue:"Bonjour à tous, j'ai une question concernant le passage suivant : ".concat(this.context.currentSelectedString,", merci")})}},{key:"render",value:function(){var e=this,t=this.state.inputValue,n=this.props.isOpen;return i.a.createElement(K.a,{open:n,onClose:this.handleClose,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},i.a.createElement(Y.a,{id:"alert-dialog-title"},"Demander de l'aide sur Slack"),i.a.createElement(Q.a,null,i.a.createElement(Z.a,{id:"alert-dialog-description"},"Le prof ou d'autres étudiants te répondront directement."),i.a.createElement(te.a,{id:"filled-full-width",label:"Label",style:{margin:8},placeholder:"Écris ton message ici.",onChange:function(t){return e.setState({inputValue:t.target.value})},value:t,fullWidth:!0,variant:"filled",inputRef:function(t){return e.textArea=t}})),i.a.createElement(re.a,null,i.a.createElement(z.a,{onClick:this.handlePost,color:"primary",autoFocus:!0},"Poster le message")))}}]),le);function le(){var e,t;Object(c.a)(this,le);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=Object(f.a)(this,(e=Object(p.a)(le)).call.apply(e,[this].concat(r)))).state={inputValue:""},t.handleClose=function(){t.context.setIsDialogOpen(!1)},t.handlePost=function(){var e=ae.a.parse(window.location.search);t.textArea.select(),document.execCommand("copy"),window.getSelection().empty(),t.context.fireSnackBar(!0),setTimeout(function(){window.open("slack://channel?team=TGKG907GE&id=CGJ28PMM2","_blank")}.bind(Object($.a)(t)),3e3);var n=e.token,r="https://slack.com/api/chat.postMessage?token=".concat(n,"&channel=CGJ28PMM2&as_user=true&text=").concat(t.textArea.value);n&&fetch(r)},t}ie.contextType=w;var ue,se=n(115),ce=n.n(se),de=n(116),fe=n.n(de),pe=n(117),he=n.n(pe),me=(ue=i.a.Component,Object(h.a)(ve,ue),Object(d.a)(ve,[{key:"render",value:function(){var e=this.props.classes;return i.a.createElement("div",null,i.a.createElement(ce.a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:this.context.isSnackOpen,autoHideDuration:6e3,onClose:this.handleClose,ContentProps:{"aria-describedby":"message-id"},message:i.a.createElement("span",{id:"message-id"},"Ton message a été copié, tu peux maintenant le coller dans Slack !"),action:[i.a.createElement(fe.a,{key:"close","aria-label":"Close",color:"inherit",className:e.close,onClick:this.handleClose},i.a.createElement(he.a,null))]}))}}]),ve);function ve(){var e,t;Object(c.a)(this,ve);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=Object(f.a)(this,(e=Object(p.a)(ve)).call.apply(e,[this].concat(r)))).handleClick=function(){t.context.fireSnackBar(!0)},t.handleClose=function(e,n){"clickaway"!==n&&t.context.fireSnackBar(!1)},t}me.contextType=w;var ye,be=Object(b.withStyles)(function(e){return{close:{padding:e.spacing.unit/2}}})(me),ge=n(118),xe=n.n(ge),we=n(119),ke=n.n(we),_e=n(288),Ee=(ye=a.Component,Object(h.a)(Se,ye),Object(d.a)(Se,[{key:"render",value:function(){var e=this.props,t=e.commentId,n=e.position,r=e.classes,o=JSON.parse(localStorage.getItem("comments"))||{};return i.a.createElement("div",{style:{left:n.left,top:n.top},className:r.comment},o[t],i.a.createElement(z.a,{onClick:this.handleDeleteComment},i.a.createElement(ke.a,{id:"glitch-js-comment-dialog-delete-button"})))}}]),Se);function Se(){var e,t;Object(c.a)(this,Se);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=Object(f.a)(this,(e=Object(p.a)(Se)).call.apply(e,[this].concat(r)))).handleDeleteComment=function(){var e=t.props.commentId,n=JSON.parse(localStorage.getItem("comments"))||{};t.context.setIsCommentOpen(!1),localStorage.setItem("comments",JSON.stringify(Object(_e.a)([e],n)));var r=document.querySelector(t.context.currentCommentSelector),o=document.querySelector(t.context.currentCommentSelector).innerHTML,a=document.createTextNode(o);document.querySelector(t.context.currentCommentSelector).parentNode.replaceChild(a,r)},t}Ee.contextType=w;var Ce,Oe=Object(b.withStyles)(function(){return{comment:{position:"absolute",backgroundColor:"white",border:"1px solid black",padding:"10px",borderRadius:"5px"}}})(Ee),Pe=(Ce=i.a.Component,Object(h.a)(Me,Ce),Object(d.a)(Me,[{key:"componentDidMount",value:function(){var e=this;document.addEventListener("click",function(t){t.target.matches(".glitch-js-selected-text")||-1!==H()(t.target).indexOf("glitch-js-comment-dialog-delete-button")?e.setState({isCommentOpen:!0,currentSelectedStringId:t.target.id,commentPosition:function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(t.target),currentCommentSelector:t.target.matches(".glitch-js-selected-text")?H()(t.target):e.state.currentCommentSelector}):e.setState({isCommentOpen:!1})},!1),document.addEventListener("mousedown",function(t){e.mouseDownSelector=H()(t.target)},!1),document.addEventListener("mouseup",function(t){var n=H()(t.target),r=window.getSelection().toString().replace(/\n/g,"").replace(/\s+/g," "),o=document.querySelector(n).innerHTML.replace(/\n/g,"").replace(/\s+/g," "),a=o.indexOf(r);if(r||e.state.isPopoverOpen||e.state.isDialogOpen){if(e.mouseDownSelector===n&&r&&-1!==a){e.selectedInnerHTML=document.querySelector(n).innerHTML;var i=o.substring(0,a),l=o.substring(a+r.length,o.length),u=xe()();document.querySelector(n).innerHTML=i+'<span class="glitch-js-selected-text" id="'.concat(u,'">').concat(r,"</span>")+l,e.setState({currentSelector:n,currentSelectedString:r,currentSelectedStringIndex:a,currentSelectedStringId:u})}}else e.setState(Object(s.a)({},e.initialCurrentSelected));e.mouseDownSelector=null},!1)}},{key:"render",value:function(){var e=this.state,t=e.isCommentOpen,n=e.currentSelectedStringId,r=e.commentPosition,o=e.isDialogOpen;return i.a.createElement("div",{className:"App"},i.a.createElement(w.Provider,{value:this.state},i.a.createElement(g,null),i.a.createElement(B,null),i.a.createElement(ie,{isOpen:o}),i.a.createElement(be,null),t&&i.a.createElement(Oe,{commentId:n,position:r})))}}]),Me),Te=(n(285),document.createElement("div"));function Me(){var e,t;Object(c.a)(this,Me);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=Object(f.a)(this,(e=Object(p.a)(Me)).call.apply(e,[this].concat(r)))).mouseDownSelector=null,t.selectedInnerHTML=null,t.initialCurrentSelected={currentSelector:null,currentSelectedString:null,currentSelectedStringId:null,currentSelectedStringIndex:0},t.state=Object(s.a)({},t.initialCurrentSelected,{fireSnackBar:function(e){t.setState({isSnackOpen:e})},currentCommentSelector:null,commentPosition:{},isCommentOpen:!1,isSnackOpen:!1,isDialogOpen:!1,isCommentInputOpen:!1,isPopoverOpen:!1,setIsPopoverOpen:function(e){t.setState(Object(s.a)({isPopoverOpen:e},t.initialCurrentSelected))},setIsCommentInputOpen:function(e){t.setState({isCommentInputOpen:e})},setIsDialogOpen:function(e){t.setState({isDialogOpen:e})},setIsCommentOpen:function(e){t.setState({isCommentOpen:e})},closePopover:function(){t.state.currentSelector&&(document.querySelector(t.state.currentSelector).innerHTML=t.selectedInnerHTML,t.setState({isPopoverOpen:!1}))}}),t}Te.id="root",document.getElementsByTagName("body")[0].appendChild(Te),u.a.render(i.a.createElement(Pe,null),document.getElementById("root"))}},[[120,1,2]]])},function(e,t){!function(e){function t(t){for(var r,i,l=t[0],u=t[1],s=t[2],d=0,f=[];d<l.length;d++)i=l[d],o[i]&&f.push(o[i][0]),o[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(c&&c(t);f.length;)f.shift()();return a.push.apply(a,s||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,l=1;l<n.length;l++){var u=n[l];0!==o[u]&&(r=!1)}r&&(a.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={1:0},a=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var l=window.webpackJsonp=window.webpackJsonp||[],u=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var c=u;n()}([])}]);
0dfef1c87eb94d2965ca002a765e8fc1e74a2dfd
28750d2d90cb45173a956cc8542ebda0d076e6dd
/Mincome/Codes/Regressions/eventhistory_final.R
e8b4c1adb7aeaa3b0eb48bab28b37033b55bd709
[]
no_license
DrSnowtree/MINCOME
994e1060e84aba0d5944b8ead720b4eae8512534
aa8f41cae82b995e3290e56a6487dc9c71ca04e9
refs/heads/master
2021-07-25T20:26:21.767288
2020-09-22T13:50:57
2020-09-22T13:50:57
220,972,475
0
0
null
2019-11-19T13:51:34
2019-11-11T12:04:15
null
UTF-8
R
false
false
2,751
r
eventhistory_final.R
setwd("W:/WU/Projekte/mincome/Mincome/Data") library("lme4") library("stargazer") library("ggstance") library("jtools") library("coefplot") library(dplyr) #remove the 5 women not included in the baseline analysis bpid <- basepay[, 1] bpid <- as.data.frame(bpid) bpid <- bpid %>% rename(FAMNUM=bpid) # only with women born after 1934 and never been divorced before datapp2 <- merge(datapp2, bpid, by = "FAMNUM", all = F) datapp2$treated <- 1 datapp2$treated[datapp2$plan == 9] <- 0 m1 <- glmer(formula = birth ~ treated*experiment + factor(age) + (1|OID) + factor(year) + factor(j) + married, data = datapp2) stargazer(m1) m2 <- lmer(formula = birth ~ plan_1*experiment + plan_2*experiment + plan_3*experiment + plan_4*experiment + plan_5*experiment + plan_7*experiment + plan_8*experiment + factor(age) + (1|OID) + factor(year) + factor(j) + married, data = datapp2) stargazer(m2) saveRDS(datapp2, "datapp2.rds") ##look only at married couples bp2 <- basepay[which(!is.na(basepay$MAGE)), ] bp2 <- bp2[which(!is.na(bp2$yrschm)), ] bpid2 <- bp2[, 1] bpid2 <- as.data.frame(bpid2) bpid2 <- bpid2 %>% rename(FAMNUM=bpid2) datapp4 <- merge(datapp2, bpid2, by = "FAMNUM", all = F) datapp4$treated <- 1 datapp4$treated[datapp4$plan == 9] <- 0 m3 <- glmer(formula = birth ~ treated*experiment + factor(age) + (1|OID) + factor(year) + factor(j) + factor(married), data = datapp4) stargazer(m3) m4 <- lmer(formula = birth ~ plan_1*experiment + plan_2*experiment + plan_3*experiment + plan_4*experiment + plan_5*experiment + plan_7*experiment + plan_8*experiment + factor(age) + (1|OID) + factor(year) + factor(j) + factor(married), data = datapp4) stargazer(m4) saveRDS(datapp4, "datapp4.rds") ##third set of people bp3 <- bp2[which(!is.na(bp2$fmotheduc)), ] bpid3 <- bp3[, 1] bpid3 <- as.data.frame(bpid3) bpid3 <- bpid3 %>% rename(FAMNUM=bpid3) datapp5 <- merge(datapp2, bpid3, by = "FAMNUM", all = F) saveRDS(datapp5, "datapp5.rds") m5 <- glmer(formula = birth ~ treated*experiment + factor(age) + (1|OID) + factor(year) + factor(j) + factor(married), data = datapp5) stargazer(m5) m6 <- lmer(formula = birth ~ plan_1*experiment + plan_2*experiment + plan_3*experiment + plan_4*experiment + plan_5*experiment + plan_7*experiment + plan_8*experiment + factor(age) + (1|OID) + factor(year) + factor(j) + factor(married), data = datapp5) stargazer(m6) stargazer(m1, m2, m3, m4, m5, m6)
aa5b5a6a69f34eaf37838c1cdb349b2910ef5120
178087fd666375abeb10fc4f9f23230d2438dc21
/R/peel.one.r
345254e60df24689601dfd46b98d95338c886859
[]
no_license
cran/sdtoolkit
736adf447b9c59c9a795f7f4735d34985dfac0a2
8e9767f73b1266de8edf37744c7325a7e36c6497
refs/heads/master
2020-05-29T13:14:47.569985
2014-02-16T00:00:00
2014-02-16T00:00:00
17,699,521
3
1
null
null
null
null
UTF-8
R
false
false
6,261
r
peel.one.r
#peel.one - #the main change I made was adding a new quantile function pquantile, that handles #things more appropriately for PRIMs purposes (see that function). `peel.one` <- function(x, y, box, peel.alpha, mass.min, threshold, d, n, peel_crit) { box.new <- box mass <- length(y)/n peel.alpha <- max(peel.alpha, 1/nrow(x)) #Added 2009-10-25 if (is.vector(x)) return(NULL) y.mean <- mean(y) #Matrix to store the means first row is for boxes restricted from below, #second row is for boxes restricted from above: y.mean.peel <- matrix(0, nrow=2, ncol=d) #Equivalent for boxes that get peeled off, only for use in alternate peeling #criteria: y.mean.peeled <- matrix(0, nrow=2, ncol=d) #Matrix to store volume of resulting boxes - same indexing as y.mean.peel box.vol.peel <- matrix(NA, nrow=2, ncol=d) #Matrix to store volume of the "little b" boxes that get peeled off, only for #use in alternate peeling criteria: box.vol.peeled <- matrix(0, nrow=2, ncol=d) # box.supp.peeled <- matrix(NA, nrow=2, ncol=d) box.supp.peeled <- matrix(0, nrow=2, ncol=d) ranges <- apply(x,2,range) spans <- ranges[2,]-ranges[1,] # if(length(which(spans!=0))==0){ # #browser() # stop("Out of variables with any variation.") #would be better to make it # } #gracefully exit and end the #peeling process... #for (j in which(spans!=0)){ #print("peeled") for (j in 1:d){ # print(j) if(TRUE){ # if(j%in%which(spans!=0)){ box.min.new <- pquantile(x[,j], peel.alpha, ptype="lowend") box.max.new <- pquantile(x[,j], 1-peel.alpha, ptype="highend") #Possibly switch to this as faster version in the future, though seems to #cause problems for some reason, even with type=2) # box.min.new <- quantile(x[,j], peel.alpha, type=2) # box.max.new <- quantile(x[,j], 1-peel.alpha, type=2) } else { box.min.new <- min(x[,j]) box.max.new <- max(x[,j]) if(box.min.new!=box.max.new) stop("what?") } y.mean.peel[1,j] <- mean(y[x[,j] >= box.min.new]) y.mean.peel[2,j] <- mean(y[x[,j] <= box.max.new]) y.mean.peeled[1,j] <- mean(y[x[,j] < box.min.new]) y.mean.peeled[2,j] <- mean(y[x[,j] > box.max.new]) box.supp.peeled[1,j] <- sum(x[,j] < box.min.new) box.supp.peeled[2,j] <- sum(x[,j] > box.min.new) #Initialize boxes that will be subset to equal the current full box: #These are the boxes will hold the actual new box of interest:; #(1 and 2) indicate restriction from below and above, respectively) box.temp1 <- box box.temp2 <- box #These are the boxes that hold the boxes that get peeled away: box.temp1.peeled <- box box.temp2.peeled <- box if (!is.na(box.min.new)){ box.temp1[1,j] <- box.min.new #new box box.temp1.peeled[2,j] <- box.min.new #box to get peeled away } if (!is.na(box.max.new)){ box.temp2[2,j] <- box.max.new #new box box.temp2.peeled[1,j] <- box.max.new #box to get peeled away } # box.vol.peel[1,j] <- vol.box(box.temp1) # box.vol.peel[2,j] <- vol.box(box.temp2) # box.vol.peeled[1,j] <- vol.box(box.temp1.peeled) # box.vol.peeled[2,j] <- vol.box(box.temp2.peeled) box.vol.peel[1,j] <- vol.box(box.temp1, x) box.vol.peel[2,j] <- vol.box(box.temp2, x) box.vol.peeled[1,j] <- vol.box(box.temp1.peeled, x) box.vol.peeled[2,j] <- vol.box(box.temp2.peeled, x) } #Some code for starting to implement alternative peeling criteria -- #specifically Eq 14.5 of F&F 1999 paper. toprint <- y.mean.peel #colnames(toprint) <- colnames(x) #print(toprint) if(peel_crit==1){ y.mean.peel.max.ind <- which(y.mean.peel==max(y.mean.peel, na.rm=TRUE), arr.ind=TRUE) #print(y.mean.peel.max.ind) } else if(peel_crit==2){ #Final FF form: evaled.peel.crit2 <- y.mean.peel - y.mean.peeled #How it is conceived, and original form: evaled.peel.crit2 <- (y.mean.peel - y.mean)/box.supp.peeled # if(all(is.na(evaled.peel.crit2))) evaled.peel.crit2[] <- 1 y.mean.peel.max.ind <- which(evaled.peel.crit2==max(evaled.peel.crit2, na.rm=TRUE), arr.ind=TRUE) } else if(peel_crit==3){ evaled.peel.crit3 <- (y.mean.peel - y.mean)* (nrow(x) - box.supp.peeled)/box.supp.peeled # if(all(is.na(evaled.peel.crit3))) evaled.peel.crit3[] <- 1 y.mean.peel.max.ind <- which(evaled.peel.crit3==max(evaled.peel.crit3, na.rm=TRUE), arr.ind=TRUE) } else { stop("There is no implemented peeling criteria associated with the value that was passed to the peel_crit argument") } ## break ties by choosing box with largest volume nrr <- nrow(y.mean.peel.max.ind) if (nrr > 1){ box.vol.peel2 <- rep(0, nrr) for (j in 1:nrr) box.vol.peel2[j] <- box.vol.peel[y.mean.peel.max.ind[j,1], y.mean.peel.max.ind[j,2]] # print(box.vol.peel2) row.ind <- which(max(box.vol.peel2)==box.vol.peel2)[1] #added 5/28/08 the [1] to deal with ties # print(row.ind) } else { row.ind <- 1 } # print("gotabove") y.mean.peel.max.ind <- y.mean.peel.max.ind[row.ind,] # print("gotbelow") ## peel along dimension j.max j.max <- y.mean.peel.max.ind[2] #why is this [2]? Asked 2011-10-13 if (y.mean.peel.max.ind[1]==1){ ## peel lower box.new[1,j.max] <- pquantile(x[,j.max], peel.alpha, ptype="lowend") x.index <- x[,j.max] >= box.new[1,j.max] } else if (y.mean.peel.max.ind[1]==2) { ## peel upper box.new[2,j.max] <- pquantile(x[,j.max], 1-peel.alpha, ptype="highend") x.index <- x[,j.max] <= box.new[2,j.max] } x.new <- x[x.index,] y.new <- y[x.index] mass.new <- length(y.new)/n y.mean.new <- mean(y.new) ## if min. y mean and min. mass conditions are still true, update ## o/w return NULL # cat("mm:",mass.min, mass.new,mass,y.mean,y.mean.new,"\n") #diagnostic if ((y.mean.new >= threshold) & (mass.new >= mass.min) & (mass.new < mass) & (y.mean < 1)) return(list(x=x.new, y=y.new, y.mean=y.mean.new, box=box.new, mass=mass.new)) }
c3592310caf66024a1754d1e55fc97883127b9b9
6a192ede793c1aa1c63c5dc388d87f704d4c8f02
/Unit3 Logistic Regression/Unit3_Framingham.R
8f3472d4c097bbc7de52991db727a4ca2f2ef322
[]
no_license
jpalbino/-AnalyticsEdgeMITx
454341f8e69cc615ab7b8286ba9bbee9df66026d
9d6b152f5ac2ca9728e5363face0ba0e50da879c
refs/heads/master
2021-01-18T08:12:17.814468
2019-11-05T21:33:18
2019-11-05T21:33:18
57,457,758
0
0
null
2016-04-30T19:14:06
2016-04-30T19:14:05
null
UTF-8
R
false
false
1,260
r
Unit3_Framingham.R
# Unit 3, The Framingham Heart Study # Video 3 # Read in the dataset framingham = read.csv("framingham.csv") # Look at structure str(framingham) # linear regression fit<-lm(TenYearCHD~., data=framingham) # Load the library caTools library(caTools) # Randomly split the data into training and testing sets set.seed(1000) split = sample.split(framingham$TenYearCHD, SplitRatio = 0.65) # Split up the data using subset train = subset(framingham, split==TRUE) test = subset(framingham, split==FALSE) # Logistic Regression Model framinghamLog = glm(TenYearCHD ~ ., data = train, family=binomial) summary(framinghamLog) # Predictions on the test set predictTest = predict(framinghamLog, type="response", newdata=test) # Confusion matrix with threshold of 0.5 table(test$TenYearCHD, predictTest > 0.5) # Accuracy (1069+11)/(1069+6+187+11) # Baseline accuracy (1069+6)/(1069+6+187+11) # Test set AUC library(ROCR) ROCRpred = prediction(predictTest, test$TenYearCHD) as.numeric(performance(ROCRpred, "auc")@y.values) ROCRperf = performance(ROCRpred, "tpr", "fpr") # Plot ROC curve plot(ROCRperf) # Add colors plot(ROCRperf, colorize=TRUE) # Add threshold labels plot(ROCRperf, colorize=TRUE, print.cutoffs.at=seq(0,1,by=0.1), text.adj=c(-0.2,1.7))
f5d5964fdc204b829076bdcc6dc414f7ea2e9e3b
c98d6f40abe3e3ad60569ae52e499de4ed6ab432
/man/shinySNPGene.Rd
abce4041492fe6bba0f8e950098cd3ca7bf654e2
[]
no_license
byandell/qtl2shiny
6ad7309b7f4b6bf89147560e23102b4ac5f93620
e342ce39f2a30ea4df4010aac61822e448d43e20
refs/heads/master
2023-05-11T06:04:00.877301
2023-04-30T20:22:25
2023-04-30T20:22:25
78,020,416
2
3
null
2018-01-17T14:31:31
2017-01-04T14:00:43
R
UTF-8
R
false
true
850
rd
shinySNPGene.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shinySNPGene.R \name{shinySNPGene} \alias{shinySNPGene} \title{Shiny SNP Association} \usage{ shinySNPGene( input, output, session, snp_par, chr_pos, pheno_names, snp_scan_obj, snpinfo, top_snps_tbl, gene_exon_tbl, project_info, snp_action = shiny::reactive({ "basic" }) ) } \arguments{ \item{input, output, session}{standard shiny arguments} \item{snp_par, chr_pos, pheno_names, snp_scan_obj, snpinfo, top_snps_tbl, gene_exon_tbl, project_info, snp_action}{reactive arguments} } \value{ tbl with top SNPs } \description{ Shiny module for SNP association mapping, with interfaces \code{shinySNPGeneInput}, \code{shinySNPGeneUI} and \code{shinySNPGeneOutput}. } \author{ Brian S Yandell, \email{brian.yandell@wisc.edu} } \keyword{utilities}
26630ec32403bed953b66db01c0ee5fc21b75116
b4dc1ccbba0146fefb2a62bb6b557c27e4ec793e
/man/get_playlist.Rd
f035eb848ecbf88361511c4f4b15eca75e177cf1
[]
no_license
Marcow12/antaresXpansion
863b7e5501412c8c85bb5f7353681e518d0a7bdf
1c53ebf646ef02f52c104a49d709972afcd0bdfd
refs/heads/master
2021-01-20T04:58:41.105372
2017-08-07T11:17:00
2017-08-07T11:17:00
101,404,694
0
0
null
2017-08-25T13:06:11
2017-08-25T13:06:11
null
UTF-8
R
false
true
640
rd
get_playlist.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simulation_settings.R \name{get_playlist} \alias{get_playlist} \title{Get playlist of simulated MC years} \usage{ get_playlist(opts = antaresRead::simOptions()) } \arguments{ \item{opts}{list of simulation parameters returned by the function \code{antaresRead::setSimulationPath}} } \value{ Returns a vector of the identifier of the simulated MC year } \description{ \code{get_playlist} gives the identifier of the MC years which will be simulated, taking into account the potential use of a playlist which can disactivate some MC years }
d9c5649cdcb49f157bb3d56e73a1a58d6b59ed97
2364af0d602947c317ec092c7c6d919624c303ae
/plot1.R
58d9998e1da485577ed3c8e3f0f9110ba2dfbf8b
[]
no_license
leej3/dss_exploratory_analysis
fb77d2fd07137394f46400c10893072239ab77ea
bf42895af65d45bb16276936a28806b8021fd0f0
refs/heads/master
2021-01-15T17:37:07.013494
2015-09-13T21:30:54
2015-09-13T21:30:54
null
0
0
null
null
null
null
UTF-8
R
false
false
1,380
r
plot1.R
plot1 <- function() { # Function plots a histogram of the global active power # Data of electricity consumption as reported in the UC Irvine power consumption dataset. 1st and 2nd of February 2007 were assessed #Data downloaded manually from : #https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip # on at Wed Sep 9th 17:23:38 2015 # Load data: library(data.table) house_power<- fread(input = "household_power_consumption.txt", na.strings = c("NA","?","","N/A")) # Convert date values house_power[,Date := as.Date(Date,format = "%d/%m/%Y")] # extract data for relevant dates house_power<- house_power[Date == "2007-02-02" | Date == "2007-02-01"] # Create a column for time in POSIXct format house_power[, POSIXct_time := as.POSIXct(paste(house_power[,Date],house_power[,Time]), format = "%Y-%m-%d %H:%M:%S") ] # Convert other columns to numeric house_power[ , names(house_power)[3:9] := lapply(.SD, function(x) as.numeric(x) ) , .SDcols=3:9] #Create histogram for Global active power over the two days. par(cex = 0.8) hist(house_power[!is.na(Global_active_power), Global_active_power], col = "red", xlab = "Global active power (kilowatts)", main = "Global active power") #Generate png file dev.copy(png, file = "plot1.png") dev.off() }
3faca4eb360dbf6a35d97d78a78c5a9ce9f7997d
ae45b1826a92420b6bf229e5b07e1f1a06ab622b
/ui.R
8ac3c1ef2878ecc053cfcb790718875fe726320f
[ "MIT" ]
permissive
dathanasakoglou/clust-app
6a230b718205b9458d7a675ec8d7d449abd245a2
c78a83a2a2b8aa74fa907137f3623f1e3a8e3698
refs/heads/master
2021-08-14T22:50:10.277927
2017-11-16T23:16:12
2017-11-16T23:16:12
null
0
0
null
null
null
null
UTF-8
R
false
false
6,513
r
ui.R
library(shiny) library(shinydashboard) library(highcharter) #---Header---# header <- dashboardHeader(title = "Clustering App") #---Sidebar---# sidebar <- dashboardSidebar(collapsed = FALSE, sidebarMenu( # sidebarSearchForm(textId = "searchText", buttonId = "searchButton", # label = "Search..."), # sidebarSearchForm(textId = "searchText", buttonId = "searchButton", # label = "Search..."), menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")), menuItem("About", tabName = "about", icon = icon("info")), menuItem("Charts", tabName = "charts", icon = icon("bar-chart")), menuItem("Dataset", tabName = "view", icon = icon("table")), menuItem("Clusters", tabName = "clusters", icon = icon("object-group")), menuItem("Reports", tabName = "reports", icon = icon("file")), h5("Dataset"), downloadButton("downloadData", "Download iris.csv", class = NULL), br(), radioButtons('format', 'Document format', c('PDF', 'HTML', 'Word'), inline = TRUE), downloadButton("downloadReport", "Generate report"), img(src = "iris.jpg", width = 200, alt = "logo.jpg") )) #---Body---# body <- dashboardBody( tags$head( tags$link(rel = "stylesheet", type = "text/css", href = "custom.css") ), tabItems( tabItem("dashboard", fluidRow( valueBoxOutput("rate"), valueBoxOutput("count"), valueBoxOutput("users"), box( title = "Overview", solidHeader = TRUE, width = 8, status = "primary", plotOutput("overview") ), box( title = "Inputs", status = "primary", width = 4, selectInput("dataset", "Choose a dataset (or a subset) :", choices = c("all iris data", "setosa", "versicolor", "virginica")), selectInput("Xvar", "X variable", choices = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")), selectInput("Yvar", "Y variable", choices = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"), selected = "Sepal.Width") ), box( title = "Boxplot", width = 8, solidHeader = TRUE, status = "primary", plotOutput("boxPlot") ), box( title = "Pie Chart", width = 4, solidHeader = FALSE, status = "primary", htmlOutput("pie") ), box( title = "Violin plot", width = 6, solidHeader = TRUE, status = "primary", plotOutput("violin") ), box( title = "Barplot", width = 6, solidHeader = TRUE, status = "primary", highchartOutput("bar") ), box( title = "Andrews Curves", width = 6, solidHeader = TRUE, status = "primary", plotOutput("line") ), box( title = "Density plot", width = 6, solidHeader = TRUE, status = "primary", plotOutput("dens") ) )), tabItem("about", fluidRow( box( title = "Iris Flower Dataset", width = 12, solidHeader = TRUE, textOutput("text"), img(src = "iris_types.jpg", width = 300, height = 100, alt = "iris types") ) )), tabItem("charts", fluidRow( box( title = "Sankey", solidHeader = TRUE, width = 4, status = "primary", htmlOutput("sankey") ), box( title = "Bubble", solidHeader = TRUE, width = 8, status = "primary", htmlOutput("bubble") ), box( title = "Scatter", solidHeader = TRUE, width = 12, status = "primary", htmlOutput("scatter") ) )), tabItem("view", fluidRow( box( title = "Dataset", solidHeader = TRUE, width = 5, status = "primary", dataTableOutput("view") ), box( title = "Summary Statistics", solidHeader = TRUE, width = 7, status = "primary", verbatimTextOutput("summary") ) )), tabItem("reports", fluidRow( box( title = "Saratoga Report", solidHeader = TRUE, width = 12, status = "primary", htmlOutput("inc") ) )), tabItem("clusters", fluidRow( box( title = "K-means", solidHeader = TRUE, width = 8, textOutput("NbClust"), status = "primary", plotOutput("kmeansPlot") ), box( title = "Inputs", status = "primary", width = 4, numericInput("clusters", "Cluster count", 3, min = 1, max = 9) ), box( title = "Dbscan", width = 8, solidHeader = TRUE, textOutput("dbscan_Param"), status = "primary", plotOutput("dbscanPlot") ), box( title = "Inputs", width = 4, status = "primary", sliderInput("eps", "Radius of neighborhood of each point", min = 0.0, max = 1.0, value = 0.2), sliderInput("minPoints", "Number of neighbors within the eps radius", min = 0, max = 10, value = 3) ), box( title = "Decision Tree", solidHeader = TRUE, width = 12, status = "primary", plotOutput("treePlot") ) )) ) ) #---Construct Page---# dashboardPage(header, sidebar, body)
ad5ca46f8a34f8661598faa4e25da4baf0a5768e
e8733b08964cdec4a24ca5a6f8c60fab04dc4dd7
/scripts/testing.R
da45e74563559698a731be40ef126a947cd0a7f0
[]
no_license
andreasolden/ssb-api-og-shiny
3befd81f3dc7a9df2f7016afbbe1aff5fa5d4f74
ce4bae88bf15a6e43c8b282f80898a243bff78df
refs/heads/master
2020-04-17T17:54:33.355885
2019-03-10T16:41:30
2019-03-10T16:41:30
166,803,955
1
1
null
2019-01-23T12:59:50
2019-01-21T11:36:59
R
UTF-8
R
false
false
2,138
r
testing.R
#Testing options(scipen=10000) library("checkpoint") #Checkpoint assures us that we use the same package versions checkpoint("2019-01-21") #As they were at the date set in this function. i.e "2019-01-21" library(stargazer) library(scales) library(skimr) library(tidyverse) library(stringr) library(readr) library(tidyverse) library(here) df_joined_wide <- readRDS(here("data/processed", "df_joined_wide.rds")) df_joined_long <- readRDS(here("data/processed", "df_joined_long.rds")) unique(df_joined_long$contents) levels(df_joined_long$age) #Notes: #Faceting: contents: ave_home_price, home_transfers, inhabitants, oil_price, reg_unemployed, trans_val_in_1000 vec <- c("ave_home_price", "home_transfers", "inhabitants", "oil_price", "reg_unemployed", "trans_val_in_1000") df_long_sub <- df_joined_long %>% filter(contents %in% vec) #Subsetting #Sex: Females, Males, Population # Population is in both inhabitants and reg_unemployed. vec_unemp <- c("Population") df_long_sub <- df_joined_long %>% filter(sex %in% vec_unemp | is.na(sex)) #Filter on date vec_date <- c( "2005-01-01", "2017-01-01" ) df_long_sub <- df_joined_long %>% filter(date>=vec_date[1] & date<=vec_date[2]) #Filter on age 0-105 and sum them up. Drops age and gives bach inhabitants w/o vec_age <- c(0,67) df_long_sub <- df_joined_long %>% mutate( age = parse_number(as.character(age))) %>% filter(between(age, vec_age[1], vec_age[2]) | is.na(age)) %>% group_by(region, sex, contents, date) %>% summarise(value = sum(value)) %>% ungroup() # Plot vec <- c("ave_home_price", "home_transfers") df_long_sub <- df_joined_long %>% filter(contents %in% vec) p <- ggplot(data = df_long_sub, aes(x = date, y = log(value), colour = region)) + geom_point() + facet_grid(contents~., scales = "free_y") + geom_smooth(method ="lm") + geom_line() + ggtitle("Hello world") p #Testing logic x1 <- c("a", "b", "c", "d") x2 <- c("a", "b", "e", "f") x1 %in% x2 any(x1 %in% x2) #Testing paste x3 <- c(1,2,3) paste(x3[1],"-",x3[3])
5cea03785f41876efa703992c2f767085a67b3f6
cce287cfff55807ac72c5f43c24cddf83adbe4f4
/man/write_prms_dimension.Rd
a0445ab0b10d4ebf7b2847e1014b90fbe9604ff5
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain-disclaimer", "CC0-1.0" ]
permissive
smwesten-usgs/prmsParameterizer
d55f362eff98482438d46786a81ba3c35613a8c1
ea00e68f24b615b87ccac0e6cb5a7f54c8a95521
refs/heads/master
2020-04-06T04:01:03.271356
2017-02-24T19:23:58
2017-02-24T19:23:58
83,072,983
0
0
null
null
null
null
UTF-8
R
false
true
612
rd
write_prms_dimension.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write_prms_dimension.R \name{write_prms_dimension} \alias{write_prms_dimension} \title{Write PRMS dimension information to a PRMS parameter file.} \usage{ write_prms_dimension(fname = "", dimname = "one", dimlength = 1, dHeader = FALSE) } \arguments{ \item{filename}{Name of the PRMS parameter file to write to.} } \value{ None. } \description{ This function is designed to be called once for each dimension written to the file. For example it will be called once for the 'nmonth' dimension, again for the 'ntemp' dimension, etc. }
7c884b63c9606251111774cd2f1d4d8bd189963b
68249e521dca2c4ef3b6b4491abea093bf5e15d1
/project4/Q2-5.R
fee49fbee653adf129f60e8caebc487c791a514d
[]
no_license
lx950627/Large-Scale-Network-Analysis-and-Mining
2194f9cef33a6b3dd6a3671e618dadd1e181c338
38d901ffae9f66087da503a601ae7f838d86c8b8
refs/heads/master
2020-03-15T14:40:21.087300
2018-06-13T01:29:59
2018-06-13T01:29:59
null
0
0
null
null
null
null
UTF-8
R
false
false
2,534
r
Q2-5.R
library(igraph) library(data.table) edge_list <- fread("C:\\Users\\IfyourRtheone\\Desktop\\UCLA\\2018Spring\\edge_list.txt", sep='\t', header=FALSE) names(edge_list) <- c('from','to','weights') edge_list <- edge_list[duplicated(edge_list[,1:2]) == F] edge_list <- edge_list[edge_list$from != edge_list$to] g = graph.data.frame(edge_list[,1:2],directed =TRUE) degIn <- degree(g, mode = 'in') hist(degIn, main = "In-degree Distribution of g") degOut <- degree(g,mode = 'out') hist(degOut, main = "Out-degree Distribution of g") plot(degree.distribution(g, mode = 'in'),main = "In-degree Distribution of g",xlab="Degree",ylab="Frequency") plot(degree.distribution(g, mode = 'out'),main ="Out-degree Distribution of g",xlab="Degree",ylab="Frequency") pgrank = page.rank(g, directed = TRUE, damping = 0.85) sorted = sort(pgrank$vector, decreasing = TRUE, index.return = TRUE) ordered_idx = order(pgrank$vector, decreasing = TRUE) cat(sorted$x[1:10]) V(g)[ordered_idx[1:10]] name_list = c("Cruise, Tom", "Watson, Emma (II)", "Clooney, George","Hanks, Tom" ,"Johnson, Dwayne (I)","Depp, Johnny","Smith, Will (I)","Streep, Meryl", "DiCaprio, Leonardo","Pitt, Brad","Roberts, Eric (I)","Tatasciore, Fred" ,"Jeremy, Ron","Trejo, Danny","Flowers, Bess","Hitler, Adolf","Riehle, Richard", "Harris, Sam (II)","Jackson, Samuel L.","De Niro, Robert") idx = c() for (name in name_list){ print(name) print(which(V(g)$name == name)) idx = c(idx, which(V(g)$name == name)) } pgrank$vector[idx] degree(g, v = V(g)[idx], mode = c("in")) score = c() for (i in 1:length(pgrank$vector)){ score = c(score, pgrank$vector[[i]]) } pg_data = data.frame(V(g)$name,score) write.csv (pg_data, file ="data2.csv") actor_movie <- fread("actor_num_movies.txt",header = FALSE) movie_num = c() for (name in name_list){ print(name) print(which(actor_movie$V1 == name)) movie_num = c(movie_num,actor_movie$V2[which(actor_movie$V1 == name)]) } movie_num name_list2 = c("Cruise, Tom", "Watson, Emma (II)", "Clooney, George","Hanks, Tom" ,"Johnson, Dwayne (I)","Depp, Johnny","Smith, Will (I)","Streep, Meryl", "DiCaprio, Leonardo","Pitt, Brad") for (name in name_list2){ idx = which(edge_list$from == name) sortidx = sort(edge_list$weights[idx], decreasing = TRUE,index.return = TRUE) print(name) print(edge_list$to[idx[sortidx$ix[1]]]) print(edge_list$weights[idx[sortidx$ix[1]]]) }
ff2e16013db62726ef105d9309799798d2ef40e6
9c2296c877a283325c3998f4b4574cf7574c0512
/Test_DRIMSeq_0.3.3_sQTL_permutations.R
92dad39f500f1738a977d04b8a5aa241e6d1573d
[]
no_license
gosianow/drimseq_package_devel_tests
e7bee32bc8111d295f4e3c8598aad98cf1a9a178
c555beaf708f38f984e015e6bf53114ce129481f
refs/heads/master
2021-01-18T15:08:32.488731
2017-07-18T13:04:03
2017-07-18T13:04:03
56,255,862
0
0
null
null
null
null
UTF-8
R
false
false
11,472
r
Test_DRIMSeq_0.3.3_sQTL_permutations.R
# R32dev # Created 7 Apr 2016 rwd <- "/home/gosia/multinomial_project/package_devel/Test_DRIMSeq_0.3.3_sQTL_permutations" dir.create(rwd, recursive = TRUE) setwd(rwd) library(DRIMSeq) library(GenomicRanges) library(rtracklayer) library(ggplot2) ### Load sQTL data data_dir <- system.file("extdata", package = "DRIMSeq") # gene_ranges with names! gene_ranges <- import(paste0(data_dir, "/genes_subset.bed")) names(gene_ranges) <- mcols(gene_ranges)$name counts <- read.table(paste0(data_dir, "/TrQuantCount_CEU_subset.tsv"), header = TRUE, sep = "\t", as.is = TRUE) genotypes <- read.table(paste0(data_dir, "/genotypes_CEU_subset.tsv"), header = TRUE, sep = "\t", as.is = TRUE) # snp_ranges with names! snp_ranges <- GRanges(Rle(genotypes$chr), IRanges(genotypes$start, genotypes$end)) names(snp_ranges) <- genotypes$snpId ## Check if samples in count and genotypes are in the same order all(colnames(counts[, -(1:2)]) == colnames(genotypes[, -(1:4)])) ## [1] TRUE sample_id <- colnames(counts[, -(1:2)]) d <- dmSQTLdataFromRanges(counts = counts[, -(1:2)], gene_id = counts$geneId, feature_id = counts$trId, gene_ranges = gene_ranges, genotypes = genotypes[, -(1:4)], snp_id = genotypes$snpId, snp_ranges = snp_ranges, sample_id = sample_id, window = 5e3, BPPARAM = BiocParallel::MulticoreParam(workers = 1)) d d <- dmFilter(d, min_samps_gene_expr = 70, min_samps_feature_expr = 5, min_samps_feature_prop = 5, minor_allele_freq = 5, BPPARAM = BiocParallel::MulticoreParam(workers = 1)) d1 <- dmDispersion(d, common_dispersion = FALSE, speed = TRUE, BPPARAM = BiocParallel::MulticoreParam(workers = 5)) plotDispersion(d1, out_dir = "speed_TRUE_") ggp1 <- plotDispersion(d1) ########################################################################### ### Comapre dispersion when speed = TRUE and speed = FALSE ########################################################################### d2 <- dmDispersion(d, common_dispersion = FALSE, speed = FALSE, BPPARAM = BiocParallel::MulticoreParam(workers = 5)) plotDispersion(d2, out_dir = "speed_FALSE_") ggp2 <- plotDispersion(d2) ### Plot both on one figure ggp3 <- ggp2 + geom_point(data = ggp1$data, aes(x = mean_expression, y = dispersion), color = "black", size = 0.5) pdf("speed_both_dispersion_vs_mean.pdf") print(ggp3) dev.off() ### Expectation that there are NAs for the cases where null theta is higher than full theta ### It is not the case. disp1 <- unlist(d1@genewise_dispersion) disp2 <- unlist(d2@genewise_dispersion) table(disp1 <= disp2) table(disp1 <= disp2, rowSums(is.na(d1@genotypes@unlistData)) == 0) ########################################################################### ### Implement permutations based on all genes ########################################################################### library(devtools) load_all("/home/gosia/R/package_devel/DRIMSeq") d <- d1 d <- dmFit(d, BPPARAM = BiocParallel::MulticoreParam(workers = 5)) d <- dmTest(d, permutations = "all_genes", verbose = TRUE, BPPARAM = BiocParallel::MulticoreParam(workers = 10)) d <- dmTest(d, permutations = "per_gene", verbose = TRUE, BPPARAM = BiocParallel::MulticoreParam(workers = 10)) plotTest(d) x <- d test = "lr" prop_mode = "constrOptimG" prop_tol = 1e-12 verbose = TRUE BPPARAM = BiocParallel::MulticoreParam(workers = 10) fit_null <- dmSQTL_fitOneModel(counts = x@counts, genotypes = x@genotypes, dispersion = slot(x, x@dispersion), model = "null", prop_mode = prop_mode, prop_tol = prop_tol, verbose = verbose, BPPARAM = BPPARAM) ### Number of samples used for the analysis n <- unlist(lapply(1:length(x@counts), function(g){ sum(!is.na(x@counts[[g]][1, ])) })) results <- dmSQTL_test(fit_full = x@fit_full, fit_null = fit_null, test = test, n = n, verbose = verbose, BPPARAM = BPPARAM) # library(gtools) # gtools::permutations(4, 4) max_nr_perm_cycles <- 10 max_nr_min_nr_sign_pval <- 1e3 dmSQTL_permutations_all_genes <- function(x, fit_null, results, max_nr_perm_cycles = 10, max_nr_min_nr_sign_pval = 1e3, prop_mode, prop_tol, n, test, verbose, BPPARAM){ fit_full <- x@fit_full nr_perm_tot <- 0 nr_perm_cycles <- 0 min_nr_sign_pval <- 0 n <- ncol(x@counts) pval <- results$pvalue nas <- is.na(pval) pval <- pval[!nas] pval <- factor(pval) sum_sign_pval <- rep(0, length(pval)) # ds_genes <- results$adj_pvalue < 0.1 while(nr_perm_cycles < max_nr_perm_cycles && min_nr_sign_pval < max_nr_min_nr_sign_pval){ permutation <- sample(n, n) ### Permute counts for all genes counts <- x@counts[, permutation, drop = FALSE] fit_full_perm <- dmSQTL_fitOneModel(counts = counts, genotypes = x@genotypes, dispersion = slot(x, x@dispersion), model = "full", prop_mode = prop_mode, prop_tol = prop_tol, verbose = verbose, BPPARAM = BPPARAM) fit_null_perm <- dmSQTL_fitOneModel(counts = counts, genotypes = x@genotypes, dispersion = slot(x, x@dispersion), model = "null", prop_mode = prop_mode, prop_tol = prop_tol, verbose = verbose, BPPARAM = BPPARAM) results_perm <- dmSQTL_test(fit_full = fit_full_perm, fit_null = fit_null_perm, test = test, n = n, verbose = verbose, BPPARAM = BPPARAM) nr_perm <- nrow(results_perm) nr_perm_tot <- nr_perm_tot + nr_perm nr_perm_cycles <- nr_perm_cycles + 1 ### Count how many pval_permuted is lower than pval from the model pval_perm <- results_perm$pvalue nas_perm <- is.na(pval_perm) pval_perm <- pval_perm[!nas_perm] pval_perm_cut <- cut(pval_perm, c(-1, levels(pval), 2), right=FALSE) pval_perm_sum <- table(pval_perm_cut) pval_perm_cumsum <- cumsum(pval_perm_sum)[-length(pval_perm_sum)] names(pval_perm_cumsum) <- levels(pval) sum_sign_pval <- sum_sign_pval + pval_perm_cumsum[pval] pval_adj <- (sum_sign_pval + 1) / (nr_perm_tot + 1) min_nr_sign_pval <- min(sum_sign_pval) } pval_out <- rep(NA, nrow(results)) pval_out[!nas] <- pval_adj return(pval_out) } pval_permutations <- dmSQTL_permutations_all_genes(x, fit_null, results, max_nr_perm_cycles = 3, max_nr_min_nr_sign_pval = 1e3, prop_mode, prop_tol, verbose, n, test, BPPARAM) ggp <- dm_plotPvalues(pvalues = results$pvalue) pdf(paste0("hist_pvalues_dm.pdf")) print(ggp) dev.off() ggp <- dm_plotPvalues(pvalues = pval_permutations) pdf(paste0("hist_pvalues_permutations_all_genes.pdf")) print(ggp) dev.off() ########################################################################### ### Implement permutations foe each gene individually ########################################################################### library(devtools) load_all("/home/gosia/R/package_devel/DRIMSeq") d <- d1 d <- dmFit(d, BPPARAM = BiocParallel::MulticoreParam(workers = 5)) # d <- dmTest(d, BPPARAM = BiocParallel::MulticoreParam(workers = 5)) x <- d test = "lr" prop_mode = "constrOptimG" prop_tol = 1e-12 verbose = 0 BPPARAM = BiocParallel::MulticoreParam(workers = 5) fit_null <- dmSQTL_fitOneModel(counts = x@counts, genotypes = x@genotypes, dispersion = slot(x, x@dispersion), model = "null", prop_mode = prop_mode, prop_tol = prop_tol, verbose = verbose, BPPARAM = BPPARAM) ### Number of samples used for the analysis n <- unlist(lapply(1:length(x@counts), function(g){ sum(!is.na(x@counts[[g]][1, ])) })) results <- dmSQTL_test(fit_full = x@fit_full, fit_null = fit_null, test = test, n = n, verbose = verbose, return_list = TRUE, BPPARAM = BPPARAM) max_nr_perm = 100 max_nr_sign_pval = 10 verbose = TRUE dmSQTL_permutations_per_gene <- function(x, fit_null, results, max_nr_perm = 1e6, max_nr_sign_pval = 1e2, prop_mode, prop_tol, n, test, verbose = TRUE, BPPARAM){ fit_full <- x@fit_full n <- ncol(x@counts) pval <- lapply(results, function(x){ pval_tmp <- x$pvalue pval_tmp <- pval_tmp[!is.na(pval_tmp)] pval_tmp <- factor(pval_tmp) return(pval_tmp) }) results_width <- unlist(lapply(pval, length)) nas <- results_width == 0 genes2permute <- which(!nas) sum_sign_pval <- vector("list", length(pval)) sum_sign_pval[!nas] <- split(rep(0, sum(results_width)), factor(rep(1:length(results_width), times = results_width))) nr_perm_tot <- rep(0, length(x@counts)) nr_perm_tot[nas] <- NA min_nr_sign_pval <- rep(0, length(x@counts)) min_nr_sign_pval[nas] <- NA while(length(genes2permute) > 0){ if(verbose) message(paste0(length(genes2permute), " genes left for permutation..\n")) permutation <- sample(n, n) ### Permute counts for all genes that need additional permutations counts <- x@counts[genes2permute, permutation] genotypes <- x@genotypes[genes2permute, ] dispersion <- slot(x, x@dispersion) if(is.list(dispersion)) dispersion <- dispersion[genes2permute] fit_full_perm <- dmSQTL_fitOneModel(counts = counts, genotypes = genotypes, dispersion = dispersion, model = "full", prop_mode = prop_mode, prop_tol = prop_tol, verbose = verbose, BPPARAM = BPPARAM) fit_null_perm <- dmSQTL_fitOneModel(counts = counts, genotypes = genotypes, dispersion = dispersion, model = "null", prop_mode = prop_mode, prop_tol = prop_tol, verbose = verbose, BPPARAM = BPPARAM) results_perm <- dmSQTL_test(fit_full = fit_full_perm, fit_null = fit_null_perm, test = test, n = n, return_list = TRUE, verbose = verbose, BPPARAM = BPPARAM) ### Count how many pval_permuted is lower than pval from the model update_nr_sign_pval <- lapply(1:length(results_perm), function(i, results_perm, pval, genes2permute){ # i = 1 pval_perm <- results_perm[[i]]$pvalue pval_perm <- pval_perm[!is.na(pval_perm)] pval_perm_cut <- cut(pval_perm, c(-1, levels(pval[[genes2permute[i]]]), 2), right=FALSE) pval_perm_sum <- table(pval_perm_cut) pval_perm_cumsum <- cumsum(pval_perm_sum)[-length(pval_perm_sum)] names(pval_perm_cumsum) <- levels(pval[[genes2permute[i]]]) nr_sign_pval <- pval_perm_cumsum[pval[[genes2permute[i]]]] return(nr_sign_pval) }, results_perm = results_perm, pval = pval, genes2permute = genes2permute) ### Update values in sum_sign_pval for(i in 1:length(update_nr_sign_pval)){ sum_sign_pval[[genes2permute[i]]] <- sum_sign_pval[[genes2permute[i]]] + update_nr_sign_pval[[i]] } nr_perm <- unlist(lapply(results_perm, nrow)) nr_perm_tot[genes2permute] <- nr_perm_tot[genes2permute] + nr_perm min_nr_sign_pval[genes2permute] <- unlist(lapply(sum_sign_pval[genes2permute], min)) ### Update genes2permute genes2permute <- which(nr_perm_tot < max_nr_perm & min_nr_sign_pval < max_nr_sign_pval) } ### Calculate permutation adjusted p-values pval_adj <- lapply(1:length(results), function(i, results, sum_sign_pval, nr_perm_tot){ pval_tmp <- results[[i]]$pvalue nas <- is.na(pval_tmp) if(sum(!nas) == 0) return(pval_tmp) pval_tmp[!nas] <- (sum_sign_pval[[i]] + 1) / (nr_perm_tot[i] + 1) return(pval_tmp) }, results = results, sum_sign_pval = sum_sign_pval, nr_perm_tot = nr_perm_tot) pval_out <- unlist(pval_adj) return(pval_out) } pval_permutations <- dmSQTL_permutations_per_gene(x, fit_null, results, max_nr_perm = 1e6, max_nr_sign_pval = 1e2, prop_mode, prop_tol, n, test, verbose = TRUE, BPPARAM)
345f4fb2afbad20c57ffeb1527c5244a0cc4dbd3
62df50b1f31e9330bd42d853674dc6d40ee383a8
/baypass_daph_interp.R
82eb5c17e8a6d9cc7968bc52025b1985d4ff6f83
[]
no_license
andbeck/BayPass
2d9cb9c566bbe130768d5d4baaa514f371454393
af336af08b133e9d95399f047ead1dffe1118143
refs/heads/master
2020-07-09T14:05:28.604565
2017-03-22T16:29:49
2017-03-22T16:29:49
66,954,036
3
0
null
null
null
null
UTF-8
R
false
false
5,497
r
baypass_daph_interp.R
# setups library(corrplot) library(ape) library(ggplot2) library(gridExtra) library(dplyr) library(ggthemes) library(qqman) source('baypass_utils.R') # this is in the repo setwd('/Volumes/TTYLMF') # Covariance matrix omega<-as.matrix(read.table("anaprEnvfile__mat_omega.out")) omega<-matrix(omega, 8,8, byrow = TRUE, dimnames=list(c(paste("pop:",1:8)), c(paste("pop:",1:8)))) omega_plot<-cov2cor(omega) par(mfrow = c(2,1)) corrplot(omega_plot,method = "square", order = 'hclust',mar = c(2,1,1,0)) plot(hclust(dist(omega_plot), 'complete')) # # This needs to be developed to establish the criteria for detecting XtX outlier # # DETAIL provided by Gautier # # omega read in above # pi.params<-as.numeric(read.table("anaprEnvfile__summary_beta_params.out",h=T)[,2]) ##the parmeters of the Beta distribution # poolsize<-as.numeric(read.table("SAMPLEFILE")) #the original pool sizes # readcounts<-geno2YN("ALLELEFILE") # the orginal read counts (needed to sample from the observed coverages) # simulate.baypass(omega,nsnp=250000, # beta.pi = pi.params, # sample.size = poolsize, # coverage=readcounts$NN, # pi.maf = 0.01, # suffix="pods", # remove.fixed.loci = F) # The real games begin here. ## ========================================================= ## read in ALL baypass output and processing ## to be use in identification of outliers and plotting ## ========================================================= load('BayPassInterpret.RData') # this should eliminate data reading and prep for # # Step 1: use the pods analysis to identify the 99% ile of XtX # XtX_Emp<-read.table('anaprEnvfile__summary_pi_xtx.out', header = TRUE) # XtX_Sim<-read.table('anaPOD__summary_pi_xtx.out', header = TRUE) # # calcuate the threshold XtX using quantile = 0.99, for the top 1% # XtX_threshold<-quantile(XtX_Sim$M_XtX, 0.99) # XtX_Sig<-XtX_Emp[XtX_Emp$M_XtX>=XtX_threshold,] # # percent exceeding threshold # dim(XtX_Sig)[1]/dim(XtX_Emp)[1] # # Step 2: use the pods analysis to identify the 99% ile of betas # # The tables are indexed by covariable 1-3 # # 1 = lat/pH # # 2 = temp # # 3 = predation # beta_Emp<-read.table('anaprEnvfile__summary_betai_reg.out', header = TRUE) # beta_Sim<-read.table('anaPOD__summary_betai_reg.out', header = TRUE) # # the B # one<-filter(beta_Emp, COVARIABLE == '1') # two<-filter(beta_Emp, COVARIABLE == '2') # three<-filter(beta_Emp, COVARIABLE == '3') # betaThreshold<-beta_Sim %>% # group_by(COVARIABLE) %>% # summarise( # betaThreshold = quantile(BF.dB., 0.99)) # betaThreshold$COVARIABLE<-c("Lat/pH", "Temp", "Predation") # betaThreshold # # scaf positions and ID to add to dfs # scaf_pos<-read.csv('scaf_pos.csv') # # create df of bayes factors and XtX and scaf positions # df_latpH<-data.frame(one, XtX = XtX_Emp$M_XtX, scaf_pos) # df_temp<-data.frame(two, XtX = XtX_Emp$M_XtX, scaf_pos) # df_predation<-data.frame(three, XtX = XtX_Emp$M_XtX, scaf_pos) # these are the outliers based on XtX and bayes factor for each latpH_keyptsID<-filter(df_latpH, BF.dB. > as.numeric(betaThreshold[1,2]) & XtX > XtX_threshold) # 2890 temp_keyptsID<-filter(df_temp, BF.dB. > as.numeric(betaThreshold[2,2]) & XtX > XtX_threshold) # 2531 predation_keyptsID<-filter(df_predation, BF.dB. > as.numeric(betaThreshold[3,2]) & XtX > XtX_threshold) # 3094 # use VennDiagram and gplots library(VennDiagram) library(gplots) # create list of MRKs All<-list(latpH = latpH_keyptsID$MRK,temp = temp_keyptsID$MRK, predation = predation_keyptsID$MRK) # build plot vennPlot<-venn.diagram(All, NULL, fill = c('blue','orange','green'), alpha = c(0.5,0.5,0.5), cex = 3, cat.cex = 2) # draw plot grid.draw(vennPlot) # Hmmm - bit different numbers... # # These are common to all three # length(Reduce(intersect, list(latpH_keyptsID$MRK, temp_keyptsID$MRK, predation_keyptsID$MRK))) # # # THese are common to pairs # length(Reduce(intersect, list(latpH_keyptsID$MRK, predation_keyptsID$MRK))) # length(Reduce(intersect, list(temp_keyptsID$MRK, predation_keyptsID$MRK))) #save(latpH_keyptsID, temp_keyptsID, predation_keyptsID, file = 'outliers.RData') # Produce outlier figures par(mfrow = c(1,3)) #latitude/pH plot(BF.dB. ~ XtX, data = df_latpH, pch = '.', col = '#00000033', ylim = c(-10,60)) points(BF.dB. ~ XtX, data = latpH_keyptsID, pch = 21, col = 'grey') abline(v = XtX_threshold, lty = 3, lwd = 2, col = 'red') abline(h = betaThreshold[1,2], lty = 3, lwd = 2, col = 'green') legend(5,60, legend = c("XtX Threshold", "BayesFactor Threshold", "Outliers"), lty=c(3,3,NA), pch = c(NA, NA, 21), col = c('red', 'green', 'grey')) title('Latitude/pH') # temp plot(BF.dB. ~ XtX, data = df_temp, pch = '.', col = '#00000033', ylim = c(-10,60)) points(BF.dB. ~ XtX, data = temp_keyptsID, pch = 21, col = 'grey') abline(v = XtX_threshold, lty = 3, lwd = 2, col = 'red') abline(h = betaThreshold[2,2], lty = 3, lwd = 2, col = 'green') legend(5,60, legend = c("XtX Threshold", "BayesFactor Threshold", "Outliers"), lty=c(3,3,NA), pch = c(NA, NA, 21), col = c('red', 'green', 'grey')) title('Temperature') # predation plot(BF.dB. ~ XtX, data = df_predation, pch = '.', col = '#00000033', ylim = c(-10,60)) points(BF.dB. ~ XtX, data = predation_keyptsID, pch = 21, col = 'grey') abline(v = XtX_threshold, lty = 3, lwd = 2, col = 'red') abline(h = betaThreshold[3,2], lty = 3, lwd = 2, col = 'green') legend(5,60, legend = c("XtX Threshold", "BayesFactor Threshold", "Outliers"), lty=c(3,3,NA), pch = c(NA, NA, 21), col = c('red', 'green', 'grey')) title('Predation')
c92f491f8677a4079f5b2c89a70d2cb7fa44dbc6
ffdea92d4315e4363dd4ae673a1a6adf82a761b5
/data/genthat_extracted_code/fechner/examples/regMin.Rd.R
b96abb9833ced11cc6a773e622c1463b4fe6e864
[]
no_license
surayaaramli/typeRrh
d257ac8905c49123f4ccd4e377ee3dfc84d1636c
66e6996f31961bc8b9aafe1a6a6098327b66bf71
refs/heads/master
2023-05-05T04:05:31.617869
2019-04-25T22:10:06
2019-04-25T22:10:06
null
0
0
null
null
null
null
UTF-8
R
false
false
289
r
regMin.Rd.R
library(fechner) ### Name: regMin ### Title: Artificial Data: Regular Minimality In Non-canonical Form ### Aliases: regMin ### Keywords: datasets ### ** Examples ## dataset regMin satisfies regular minimality in non-canonical form regMin check.regular(regMin, type = "reg.minimal")
a838be60502310044ae76480ecce0282ddce6ec5
30cf71cda7b873411ed66ad0eb78a0ed21bb26ba
/webgestalt.R
53da1c58cc3b3f306b68ca8ab7d92d653cfdc7b7
[]
no_license
TNO/immune_health_textmining
74050cb82c19d7e1818ee34488b90c1a24d68352
4190c86191c80dd0abd228ac230a237b23939729
refs/heads/master
2020-09-09T11:42:21.133609
2020-05-15T12:02:11
2020-05-15T12:02:11
221,438,037
1
0
null
null
null
null
UTF-8
R
false
false
2,725
r
webgestalt.R
webgestalt <- function(topic){ library(devtools) install_github("bzhanglab/WebGestaltR") install_bitbucket("ibi_group/disgenet2r") install.packages("WebGestaltR") library("WebGestaltR") library("disgenet2r") library(httr) library(jsonlite) library(lubridate) options(stringsAsFactors = FALSE) library("readxl") diseaseIDtab <- read_excel("C:\\TNO\\2019\\20191003_Exposome\\disease_mappings_converted.xlsx", sheet = 1, col_names = TRUE, col_types = "text") ## Arguments args = commandArgs(trailingOnly=TRUE) topic <- args[1] ## Gene list #topic <- "asthma" geneList0 <- (((read.csv(paste("C:\\TNO\\2019\\20191003_Exposome\\output\\",topic,"_protein_list.txt", sep = ""), header = FALSE, stringsAsFactors = FALSE)))) geneList2 <- as.data.frame(geneList0) ## Output directory WebGestalt if "isOutput" = TRUE outputdir <- paste("C:\\TNO\\2019\\20191003_Exposome\\output\\webgestalt\\","outputWebGestaltR\\", sep = "") ## WebGestalt outputWebGestalt <- WebGestaltR(enrichMethod = "ORA", organism = "hsapiens", enrichDatabase = "disease_Disgenet", enrichDatabaseFile = NULL, enrichDatabaseType = "genesymbol", enrichDatabaseDescriptionFile = NULL, interestGeneFile = NULL, interestGene = geneList2[,1], interestGeneType = "genesymbol", collapseMethod = "mean", referenceGeneFile = NULL, referenceGene = NULL, referenceGeneType = NULL, referenceSet = "genome", minNum = 5, maxNum = 2000, sigMethod = "fdr", fdrMethod = "BH", fdrThr = 0.05, topThr = 100, reportNum = 20, perNum = 1000, isOutput = TRUE, outputDirectory = outputdir, projectName = NULL, dagColor = "continuous", setCoverNum = 10, networkConstructionMethod = NULL, neighborNum = 10, highlightType = "Seeds", highlightSeedNum = 10, nThreads = 1, hostName = "http://www.webgestalt.org/") diseaseIDtab <- diseaseIDtab[which(diseaseIDtab$vocabulary=="MSH" | diseaseIDtab$vocabulary=="DO" | diseaseIDtab$vocabulary=="HPO"),] colnames(outputWebGestalt)[1] <- "diseaseId" outputWebGestalt2 <- merge(x = outputWebGestalt, y = diseaseIDtab, by = "diseaseId", all.x = TRUE) write.table(outputWebGestalt2, file = paste("C:\\TNO\\2019\\20191003_Exposome\\output\\webgestalt\\Gene_Disease_relation_MESH_DO_HPO3_",topic,".csv", sep = ""), sep = "\t", row.names = FALSE, col.names = TRUE,quote=TRUE) }
7d487735dbc51f252aadb46344401a9f0afca49b
2f15b2dc16de0471e7bee43f6739b6ad8522c81d
/man/selection_bit_map.Rd
67494e44d6ea386c8cc285791c2e07dd508275be
[ "MIT" ]
permissive
billster45/starschemar
45566be916c95778727a3add3239143d52796aa9
5f7e0201494a36f4833f320e4b9535ad02b9bdc1
refs/heads/master
2022-12-20T13:45:06.773852
2020-09-26T03:44:12
2020-09-26T03:44:12
298,796,838
1
0
NOASSERTION
2020-09-26T11:10:30
2020-09-26T11:10:30
null
UTF-8
R
false
true
593
rd
selection_bit_map.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fact_table_incremental_refresh.R \name{selection_bit_map} \alias{selection_bit_map} \title{Generate a record selection bitmap} \usage{ selection_bit_map(table, values, names) } \arguments{ \item{table}{A \code{tibble}, table to select.} \item{values}{A \code{tibble}, set of values to search.} \item{names}{A vector of column names to consider.} } \value{ A vector of boolean. } \description{ Obtain a vector of boolean to select the records in the table that have the combination of values. } \keyword{internal}
e98b96736514cd2c5af5b3bd3d111cab5711e5ee
f3079beec1719b26e22114da21a8612f725bd8c5
/2015_codeClinic/2_CodeClinic_ImageAnalysis/isthisacroppedversionofthat.R
4b123d11fcce931b55622290ee9c8b8ce6208374
[]
no_license
CheolsoonIm/CodeClinicR
d7712b510f2bf4325be71acafbe4874d74799c49
c2664ebad2fe2bded13a0f204343938f4044865a
refs/heads/master
2021-09-13T04:14:08.280424
2018-04-24T22:37:21
2018-04-24T22:37:21
null
0
0
null
null
null
null
UTF-8
R
false
false
4,485
r
isthisacroppedversionofthat.R
# function to test if one image is a cropped version of another # needle - image that might be a cropped version # haystack - image that might be a parent version # returns TRUE or FALSE isthisacroppedversionofthat <- function(needle,haystack) { # needle <- paste("imagesToAnalyze/","460249177a.jpg",sep="") # haystack <- paste("imagesToAnalyze/","460249177.jpg",sep="") # assumes needle and haystack are jpeg images needle.raster <- readJPEG(needle) needle.width <- ncol(needle.raster) # width and height are used a lot needle.height <- nrow(needle.raster) haystack.raster <- readJPEG(haystack) haystack.width <- ncol(haystack.raster) haystack.height <- nrow(haystack.raster) red.layer <- 1 # We're only interested in one layer # if needle is larger than or same size as haystack, # then needle can't be a cropped version. if ((needle.height >= haystack.height) && (needle.width >= haystack.width)) return(c(0,0)) # I'm going to assume that a match in one (of RGB) layers between # needle and haystack is a match between all layers. This reduces the # amount of data we need to correlate by 2/3 # This requires versions of needle and haystack with just one layer needle.red <- needle.raster[,,red.layer] haystack.red <- haystack.raster[,,red.layer] # points.of.interest is an array of x,y coordinates that are possible # starting points for a subset image. Any points outside of this range # are either too narrow or too shallow to fit needle. # remember that we are talking about rows and columns of the IMAGE... # ...NOT the graph. Images start with 0,0 at upper left. # Graphs start with 0,0 in lower left diff.haystack.needle.height <- haystack.height-needle.height poi.rows <- (1:diff.haystack.needle.height) diff.haystack.needle.width <- haystack.width-needle.width poi.columns <- (1:diff.haystack.needle.width) xpos <<- numeric() ypos <<- numeric() ccf.max <<- numeric() stepSize <- 100 for (rowIndex in seq(from=poi.rows[1], to=poi.rows[length(poi.rows)], by=stepSize)) { for (columnIndex in seq(from=poi.columns[1], to=poi.columns[length(poi.columns)], by=stepSize)) { # if (rowIndex+needle.height < haystack.height & # columnIndex+needle.width < haystack.width) { haystack.subset.to.be.correlated <- haystack.red[ (rowIndex:(rowIndex+needle.height)), (columnIndex:(columnIndex+needle.width)) ] ccf.object <- ccf(as.vector(haystack.subset.to.be.correlated), as.vector(needle.red), plot=FALSE) max.ccf <- max(ccf.object$acf) ccf.max <<- append(ccf.max,max.ccf) xpos <<- append(xpos,columnIndex) ypos <<- append(ypos,rowIndex) ########### # creates pretty graphics - and slows things down maintitle <- paste("ccf=",round(max.ccf,2),"xpos=",columnIndex,"ypos=",rowIndex) maintitle2 <- paste("ccf=",round(max.ccf,2)) saveHere <- paste0("Plot",sprintf("%04d",rowIndex),sprintf("%04d",columnIndex),"_x",columnIndex,"_y",rowIndex,".png") png(filename=saveHere) # nf <- layout(matrix(c(1,2),1,2,byrow=T),c(1,1),c(1,1),T) #layout.show(nf) #boxplot(ccf.object$acf,ylim=c(0,1),main=maintitle2) plot(c(0, haystack.width), c(0, haystack.height), main=maintitle,type = "n") # rasterImage(haystack.subset.to.be.correlated, # xleft=0, # xright=ncol(haystack.subset.to.be.correlated), # ytop=nrow(haystack.subset.to.be.correlated), # ybottom=0) rasterImage(haystack.raster, xleft=0, xright=haystack.width, ytop=haystack.height, ybottom=0) rasterImage(needle.red, xleft=columnIndex, xright=(needle.width+columnIndex), ytop=(haystack.height-(rowIndex+needle.height)), ybottom=(haystack.height-rowIndex)) dev.off() ########### cat("rowIndex=",rowIndex,"columnIndex=",columnIndex," \r") # } } } ccf.results <- matrix(c(xpos,ypos,ccf.max),ncol=3) colnames(ccf.results) <- c("xpos","ypos","ccf.max") }
768d2d175e20fdb1f2ada194e906d7950dc67cfc
4789c9f646348cee93918b3edce7ad81e8b92b40
/man/correlations.to.adjacencies.Rd
9fb3afe03f4e12e6d3476cf63c1609a805a0de5d
[]
no_license
cran/brainwaver
19316a65e8b358efd5441acb9fa8f86a407ab16d
6f0d05b26b1270a2de63b0c86e36b4e23c1f30d3
refs/heads/master
2021-01-16T19:14:15.079321
2010-08-09T00:00:00
2010-08-09T00:00:00
17,694,878
0
1
null
2014-09-06T01:50:20
2014-03-13T04:10:12
R
UTF-8
R
false
false
2,265
rd
correlations.to.adjacencies.Rd
\name{correlations.to.adjacencies} \alias{correlations.to.adjacencies} \alias{ideal.wavelet.levels} \alias{distance} \title{Produce adjencency matrices for a given number of edges} \description{ Given a correlations thingy as produced by \code{const.cor.list}, produce a list of adjacency matrices fiddled to have a preferred number of edges Actually this is not quite possible, but come as close as \code{choose.thresh.nbedges} will allow us. A functional parameter allows us to say things like produce the graphs with n log n edges where n is the number of nodes } \usage{ correlations.to.adjacencies(correlations, edge.func) ideal.wavelet.levels(brain) distance(x,y,z) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{correlations}{a list of correlation matrices produced by \code{const.cor.list}} \item{edge.func}{a function to mention the way to choose the number of edges given the number of nodes in the graph. In the companion scripts files, the small-limit is used and by default \code{edge.func=(function(x){x*log(x)})}} \item{brain}{ matrix containing the data time series. Each column of the matrix represents one time series.} \item{x}{x coordinate} \item{y}{y coordinate} \item{z}{z coordinate} } \details{ Functions produced to manipulate better nice outputs of the package } \value{ \item{correlations.to.adjacencies}{Description of 'comp1'} \item{ideal.wavelets.levels}{number indicating up to each wavelet scale it is possible to go given the length of the time series} \item{disctance}{the euclidean distance in 3D} } \references{ S. Achard, R. Salvador, B. Whitcher, J. Suckling, Ed Bullmore (2006) A Resilient, Low-Frequency, Small-World Human Brain Functional Network with Highly Connected Association Cortical Hubs. \emph{Journal of Neuroscience}, Vol. 26, N. 1, pages 63-72. } \author{John Aspden, external collaborator of the brainwaver package} \seealso{\code{\link{const.cor.list}}} \examples{ data(brain) brain<-as.matrix(brain) # WARNING : To process only the first five regions brain<-brain[,1:5] n.levels<-4 wave.cor.list<-const.cor.list(brain,n.levels=n.levels) adj.mat<-correlations.to.adjacencies(wave.cor.list,edge.func=(function(x){x*log(x)})) } \keyword{multivariate} \keyword{ts}
d48b183d352d2067ae15ab466b1045bfd3bccd00
29585dff702209dd446c0ab52ceea046c58e384e
/lfl/R/tail.fsets.R
1eceafa39de78498d4deb1d6286df24be360ff88
[]
no_license
ingted/R-Examples
825440ce468ce608c4d73e2af4c0a0213b81c0fe
d0917dbaf698cb8bc0789db0c3ab07453016eab9
refs/heads/master
2020-04-14T12:29:22.336088
2016-07-21T14:01:14
2016-07-21T14:01:14
null
0
0
null
null
null
null
UTF-8
R
false
false
250
r
tail.fsets.R
tail.fsets <- function(x, n = 6L, ...) { if (!is.fsets(x)) { stop("'x' is not a valid 'fsets' object") } v <- vars(x) s <- specs(x) class(x) <- setdiff(class(x), 'fsets') return(fsets(tail(x, n=n), vars=v, specs=s)) }
20125db2ca70df4bb063e600b86e329c7ad02a1e
58c16d88f72cdbd25567464d26f028849ec07768
/cachematrix.R
79d8afb0f4bff8aece2f0b3e7534bb9af8ff72cf
[]
no_license
rfquah/ProgrammingAssignment2
9a183abb23d8e01312bbb0ef9eff587b8a970ed6
fcaf9b91ddaaedd1069fe93083e1ea68a97baf92
refs/heads/master
2020-12-26T00:53:44.894633
2014-11-23T14:18:23
2014-11-23T14:18:23
null
0
0
null
null
null
null
UTF-8
R
false
false
1,965
r
cachematrix.R
## makeCacheMatrix is a function that takes a matrix as its argument, ## and sets im (the inverse matrix) to NULL in the function environment. ## Contained within the makeCacheMatrix function is the function set, ## which sets im to NULL in the global environment. But the function set ## is only defined within makeCacheMatrix. it is actually executed within ## the cacheSolve function. makeCacheMatrix <- function(x = matrix()) { im <- NULL # inverse matrix, set to NULL every time the makeCacheMatrix function is called ## NOTE: functions defined below (set, get, setinv, and getinv) are only defined here ## they run when called from the cacheSolve function set <- function(y) { x <<- y im <<- NULL } get <- function() x # this function returns the value of the original matrix setinv <- function(inv) im <<- inv # this function is called by cacheSolve() during the first cacheSolve() access, # and will store the value using the superassignment <<- getinv <- function() im # this function will return the cached inverse matrix to cacheSolve() on # subsequent accesses list(set = set, get = get, setinv = setinv, getinv = getinv) # this list is created each time makeCacheMatrix() is called. it is a list # of the internal functions ('methods') so a calling function knows how to # access those methods. } ## cacheSolve is a function that takes a matrix (x) as its argument and ## returns the matrix inverse from the cache if found in cache, ## otherwise calculates the inverse and returns the newly calculated ## result. cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' im <- x$getinv() if (!is.null(im)) { message("getting cached data") return(im) } data <- x$get() im <- solve(data) x$setinv(im) im }
72ec46f335798a8f3886004ce7b774152315da5f
c0a08d09bb804cbfd9c186ba4e5c75dfb3e4faee
/R/TSGMM_PP.R
59362e0a69c57881daedab16110fc34e4aef8f00
[]
no_license
lalondetl/GMM
bd1b21f694a35c09484dfb6e99aa974a6f6a48f6
628889324529b0b86f55a4d2054bed5442af0b40
refs/heads/master
2018-07-05T06:26:23.000514
2018-05-31T20:57:15
2018-05-31T20:57:15
119,891,979
0
0
null
null
null
null
UTF-8
R
false
false
6,626
r
TSGMM_PP.R
#' Two-Step Generalized Method of Moments, Truncated Count Component of Longitudinal Hurdle Model #' #' This function calculates the Generalized Method of Moments (GMM) parameter estimates and standard errors for the zero-truncated count component ("positive Poisson") of a hurdle model for longitudinal excess zero count responses. This is modeled similarly to a Positive Poisson Zero-Truncated Regression using a log link. The function allows for unbalanced data, meaning subjects can have different numbers of times of observation. Both time-independent covariates and time-dependent covariates can be accommodated. Time-dependent covariates can be handled either by specifying the type of each time-dependent covariate, or by allowing the data to determine appropriate moment conditions through the extended classification method. Data must be organized by subject, and an intercept term is assumed. The function outputs a list with parameter estimates betaHat along with parameter covariance estimates covEst. #' @param y The vector of positive count responses. This vector must be organized by subject, and by time within subject ((sum(Tvec)) x 1). #' @param subjectID The vector of subject ID values for each response ((sum(Tvec)) x 1). #' @param Zmat The design matrix for time-independent covariates ((sum(Tvec)) x K0). #' @param Xmat The design matrix for time-dependent covariates ((sum(Tvec)) x Ktv). #' @param Tvec The vector of times for each subject. #' @param N The number of subjects. #' @param mc The method of identifying appropriate moment conditions, either 'EC' for extended classification (default) or 'Types' for user-identified types. #' @param covTypeVec The vector indicating the type of each time-dependent covariate, according to the order of the columns of Xmat. #' @param betaI The initial parameter estimates. #' r_c The vector of residuals from hurdle GEE with independent working correlation structure. #' @keywords GMM #' @export #' @examples #' TSGMM_PP() TSGMM_PP = function(yvec,subjectID,Zmat,Xmat,Tvec,N,mc='EC',covTypeVec=c(-1),betaI=c(1),r_c=c(-1)){ #################### # DEFINE CONSTANTS # #################### if(!is.matrix(Zmat)){K0 = 0} else if(is.matrix(Zmat)){K0 = ncol(Zmat)} Ktv = ncol(Xmat) K = 1+K0+Ktv # TOTAL NUMBER OF PARAMETERS # Tmax = max(Tvec) K1 = 0 K2 = 0 K3 = 0 K4 = 0 if(covTypeVec[1] != -1) { for(k in 1:Ktv) { if(covTypeVec[k]==1){K1 = K1+1} if(covTypeVec[k]==2){K2 = K2+1} if(covTypeVec[k]==3){K3 = K3+1} if(covTypeVec[k]==4){K4 = K4+1} } } #################### #################### # CONSTRUCT betaI AND r_c IF NECESSARY # if(betaI == c(-1)){betaI = rep(0,(1+ncol(Zmat)+ncol(Xmat)))} ########################################################## ## MAXIMUM NUMBER OF ESTIMATING EQUATIONS (PER SUBJECT) ## ########################################################## if(mc=='Types'){Lmax = 1*Tmax + K0*Tmax + (Tmax^2)*K1 + Tmax*(Tmax+1)/2*K2 + Tmax*K3 + Tmax*(Tmax+1)/2*K4} ########################################## # IF NECESSARY, FIND TYPES OF PARAMETERS # ########################################## if(mc=='EC') { alpha = 0.05/(Tmax^2) types = validComb_EC_PP(yvec,Zmat,Xmat,betaI,Tvec,alpha,r_c) Lmax = 1*Tmax + K0*Tmax + sum(types) } ########################################################## ########################################################## ############################################################# # DEFINE QUADRATIC FORM FUNCTION TAKING ONLY BETAI AS INPUT # ############################################################# QuadForm = function(beta){ G = rep(0,Lmax) VN = matrix(0,Lmax,Lmax) Count = rep(0,Lmax) # Vector of denominators for G and VN # # FILL G AND VN USING VALIDMCPP FOR EACH SUBJECT # for(i in 1:N) { subjectIndex = sum(Tvec[0:(i-1)])+1 if(mc=='EC'){Est_i = validMCPP_EC(yvec,subjectIndex,Zmat,Xmat,beta,Tvec[i],Tmax,Count,types)} if(mc=='Types'){Est_i = validMCPP_Types(yvec,subjectIndex,Zmat,Xmat,covTypeVec,beta,Tvec[i],Tmax,Count)} gEst_i = Est_i[[1]] Count = Est_i[[2]] G = G + gEst_i VN = VN + gEst_i%*%t(gEst_i) } G = G / Count # CREATE DIVISOR MATRIX D FROM COUNT # D = matrix(0,Lmax,Lmax) for(i in 1:Lmax) { for(j in 1:Lmax) { D[i,j] = min(Count[i],Count[j]) } } W = MASS::ginv(VN / D) # QUADRATIC FUNCTION TO BE OPTIMIZED # QF = t(G) %*% W %*% G QF } # END QUADFORM # ############################################################# ############################################################# ###################################################################################### # GMM COEFFICIENTS ARE OBTAINED BY MINIMIZING QUADFORM, WITH BETAI AS INITIAL VALUES # ###################################################################################### betahat = optim(betaI, QuadForm)$par ###################################################################################### ###################################################################################### ######################################################################## # VARIANCE ESTIMATE IS OBTAINED USING DERIVATIVES WITH RESPECT TO BETA # ######################################################################## dBetaG = matrix(0,Lmax,K) VN = matrix(0,Lmax,Lmax) Count = rep(0,Lmax) # Vector of denominators for G and VN # for(i in 1:N) { subjectIndex = sum(Tvec[0:(i-1)])+1 if(mc=='EC'){Est_i = validMCPP_EC(yvec,subjectIndex,Zmat,Xmat,betahat,Tvec[i],Tmax,Count,types)} if(mc=='Types'){Est_i = validMCPP_Types(yvec,subjectIndex,Zmat,Xmat,covTypeVec,betahat,Tvec[i],Tmax,Count)} gEst_i = Est_i[[1]] Count = Est_i[[2]] VN = VN + gEst_i%*%t(gEst_i) if(mc=='EC'){dBetagEst_i = validMDPP_EC(yvec,subjectIndex,Zmat,Xmat,betahat,Tvec[i],Tmax,types)} if(mc=='Types'){dBetagEst_i = validMDPP_Types(yvec,subjectIndex,Zmat,Xmat,covTypeVec,betahat,Tvec[i],Tmax)} dBetaG = dBetaG + dBetagEst_i } # CREATE DIVISOR MATRIX D FROM COUNT # D = matrix(0,Lmax,Lmax) for(i in 1:Lmax) { for(j in 1:Lmax) { D[i,j] = min(Count[i],Count[j]) } } ## CREATE DIVISOR MATRIX FOR DBETAG FROM COUNT ## Divisor = matrix(c(rep(Count,K)),length(Count),K) dBetaG = dBetaG / Divisor W = MASS::ginv(VN / D) AsymptoticWeight = t(dBetaG) %*% W %*% dBetaG AsymptoticCovariance = (1/N)*MASS::ginv(AsymptoticWeight) ######################################################################## ######################################################################## list(betaHat=betahat, covEst = AsymptoticCovariance) } # END TSGMM_PP #
b718936b316fba85246b6031b065d80fee946c7e
4bedace4382076f899e3969043a4e22a1c5da62c
/Testing 2 file.R
749dea5983c319286eced40da7cbe2b4c9261cc8
[]
no_license
muchandifungam/Test-data
5bef5bd5a118569d6abe77a456347392ea19acd9
d64e975d998639afdd8a774c98272f1d63453b0d
refs/heads/master
2023-03-29T02:53:34.299863
2021-04-01T18:37:07
2021-04-01T18:37:07
352,073,933
0
0
null
null
null
null
UTF-8
R
false
false
44
r
Testing 2 file.R
a <- (1:10) b <- c(1:10, nrol=2,ncol=5) a b
5b00e0d3327050c2401ceddd8ea37f50f94bf05f
75ec5fea203bbe5b46867bd3da5d85480bd9f71d
/High-dimension/Cross Validation Steps.Work.R.R
5d096a1bb4b33d9bbf19540a76c733bcd4faffe2
[]
no_license
mshasan/EmLassoSCAD
a4db9c16eabd16b42693b07d0f97b327ebf9c57a
517c5d3fa7db94eee964a687591a666c0b250eed
refs/heads/master
2021-01-20T09:57:19.429087
2017-05-05T01:20:20
2017-05-05T01:20:20
90,310,856
1
1
null
null
null
null
UTF-8
R
false
false
6,185
r
Cross Validation Steps.Work.R.R
## Cross Validation for Glasso ## Row Elimination (every row considered as a fold) for one rho set.seed(100) cv.gl<-function(p,q) # p rows and q culumns { rho<-.01 y<-matrix(rnorm(p*q),ncol=q) cv.s<-numeric(p) for(k in 1:p) { if (k >= p) {x<-y[0:(k-1), ]} else # Elimination of kth-fold {if (k < p) {x<-rbind(y[0:(k-1), ] , y[(k+1):p, ])}} s<-var(x) cv.s[k]<-glasso(s,rho)$loglik # Single Cross Validation } sum(cv.s) # Sum of all corss validation for one rho list(data=y,fold=x,var=s,ind.cv=cv.s,sum=sum(cv.s)) } cv.gl(5,2) ## Fold elimination for one rho set.seed(100) cv.gl<-function(p,q,m,n) # p rows,q columns,m fold and n rows in each fold { rho<-.01 y<-matrix(rnorm(p*q),ncol=q) cv.s<-numeric(m) for(k in 1:m) { # Elimination of kth-fold if (k == 1) {x<-y[(n*k+1):20, ]} else {if (k > 1 && k < m) {x<-rbind(y[1:(n*(k-1)), ] , y[(n*k+1):20, ])}} {if (k == m) {x<-y[1:(n*(k-1)), ]}} s<-var(x) cv.s[k]<-glasso(s,rho)$loglik # Single Cross Validation } sum(cv.s) # Sum of all corss validation for one rho list(data=y,fold=x,var=s,ind.cv=cv.s,sum=sum(cv.s)) } cv.gl(20,2,4,5) ## Glasso Final Cross Validation library(glasso) library(MASS) set.seed(100) cv.gl<-function(n,p,k,m,r,d) # n rows,p columns,k fold,m rows in each fold { # r rho(s) and d diff. between two rho(s) rho<-0 cv.tot<-numeric(r) for (i in 1:r) { rho<-rho + d y<-matrix(rnorm(n*p),ncol=p) cv.s<-numeric(k) for(j in 1:k) { # Elimination of kth-fold if (j == 1) {x<-y[(m*j+1):n, ]} else {if (j > 1 && j < k) {x<-rbind(y[1:(m*(j-1)), ] , y[(m*j+1):20, ])}} {if (j == k) {x<-y[1:(m*(j-1)), ]}} s<-var(x) cv.s[j]<-glasso(s,rho)$loglik # Single Cross Validation } cv.tot[i]<-sum(cv.s) # Crosso Validation for different rho } list(data=y,fold=x,var=s,ind.cv=cv.s,CV=cv.tot) } cv.gl(20,3,5,4,10,.1) ## Adaptive Glasso Final Cross Validation library(glasso) library(MASS) cv.al1<-function(n,p,k,m,r,d,gamma) { y<-matrix(rnorm(n*p),ncol=p) esti.L1.out<-NULL n<-dim(y)[1] p<-dim(y)[2] lambda<-0 cv.tot<-numeric(r) for(i in 1:r) { lambda<-lambda+d cov.sa<-cov(y) esti.L1.out<-glasso(cov.sa,lambda) rhomat<-lambda*matrix(1,p,p)/(pmax(abs(esti.L1.out$wi)^gamma,1e-5)) cv.s.aL1<-numeric(k) for(j in 1:k) { # Elimination of kth-fold if (j == 1) {x<-y[(m*j+1):n, ]} else {if (j > 1 && j < k) {x<-rbind(y[1:(m*(j-1)), ] , y[(m*j+1):20, ])}} {if (j == k) {x<-y[1:(m*(j-1)), ]}} s<-cov(x) cv.s.aL1[j]<-glasso(s,rhomat)$loglik # Single Cross Validation } cv.tot[i]<-sum(cv.s.aL1) # Crosso Validation for different rho } list(data=y,ind.cv=cv.s.aL1,CV=cv.tot) } cv.al1(20,3,5,4,10,.01,0.5) ## SCAD Final Cross Validation library(glasso) library(MASS) cv.scad<-function(n,p,k,m,r,d,a) { y<-matrix(rnorm(n*p),ncol=p) est.L1.out<-NULL n<-dim(y)[1] p<-dim(y)[2] lam<-0 cv.tot<-numeric(r) for(i in 1:r) { lam<-lam+d cov.sa<-cov(y) est.L1.out<-glasso(cov.sa,lam) rhomat<-pmax(lam*((abs(est.L1.out$wi)<=lam) +pmax(a*lam-abs(est.L1.out$wi),0) *abs((est.L1.out$wi)>lam)/(a-1)/lam),1e-4) cv.s.scad<-numeric(k) for(j in 1:k) { # Elimination of kth-fold if (j == 1) {x<-y[(m*j+1):n, ]} else {if (j > 1 && j < k) {x<-rbind(y[1:(m*(j-1)), ] , y[(m*j+1):20, ])}} {if (j == k) {x<-y[1:(m*(j-1)), ]}} s<-cov(x) cv.s.scad[j]<-glasso(s,rhomat)$loglik # Single Cross Validation } cv.tot[i]<-sum(cv.s.scad) # Crosso Validation for different rho } list(data=y,ind.cv=cv.s.scad,CV=cv.tot) } cv.scad(20,3,5,4,10,.01,3.7) ## SCAD Final Cross Validation(multiple steps) library(glasso) library(MASS) cv.scad<-function(n,p,k,m,r,d,a,g) { y<-matrix(rnorm(n*p),ncol=p) est.L1.out<-NULL cv.scad<-NULL n<-dim(y)[1] p<-dim(y)[2] lam<-0 CV<-numeric(r) for(i in 1:r) { lam<-lam+d cov.sa<-cov(y) cv.scad<-numeric(g) for (l in 1:g) { est.L1.out<-glasso(cov.sa,lam) rhomat<-pmax(lam*((abs(est.L1.out$wi)<=lam) +pmax(a*lam-abs(est.L1.out$wi),0) *abs((est.L1.out$wi)>lam)/(a-1)/lam),1e-4) cv.s.scad<-numeric(k) for(j in 1:k) { # Elimination of kth-fold if (j == 1) {x<-y[(m*j+1):n, ]} else {if (j > 1 && j < k) {x<-rbind(y[1:(m*(j-1)), ] , y[(m*j+1):20, ])}} {if (j == k) {x<-y[1:(m*(j-1)), ]}} s<-cov(x) cv.s.scad[j]<-glasso(s,rhomat)$loglik # Single Cross Validation } cv.scad[l]<-cv.s.scad[j] } CV[i]<-sum(cv.scad) # Cross Validation for different rho } list(data=y,cv.s.scad=cv.s.scad,cv.scad=cv.scad,CV=CV) } cv.scad(20,3,5,4,10,.01,3.7,5) ## SCAD Final Cross Validation (multiple steps with while statement and convergence) library(glasso) library(MASS) cv.scad<-function(n,p,k,m,r,d,a) { y<-matrix(rnorm(n*p),ncol=p) est.L1.out<-NULL n<-dim(y)[1] p<-dim(y)[2] lam<-0 cv.tot<-numeric(r) for(i in 1:r) { lam<-lam+d cov.sa<-cov(y) est.L1.out<-glasso(cov.sa,lam) rhomat<-pmax(lam*((abs(est.L1.out$wi)<=lam) +pmax(a*lam-abs(est.L1.out$wi),0) *abs((est.L1.out$wi)>lam)/(a-1)/lam),1e-4) cv.s.scad<-numeric(k) for(j in 1:k) { # Elimination of kth-fold if (j == 1) {x<-y[(m*j+1):n, ]} else {if (j > 1 && j < k) {x<-rbind(y[1:(m*(j-1)), ] , y[(m*j+1):20, ])}} {if (j == k) {x<-y[1:(m*(j-1)), ]}} s<-cov(x) est.scad.old<-NULL est.scad.new<-est.L1.out$wi eps<-1 count<-1 while(eps >1e-4) { est.scad.old<-est.scad.new est.scad.new<-glasso(s,rhomat)$wi count<-count+1 eps<-max(abs(est.scad.old-est.scad.new)) } cat(" Iterration number ") cv.s.scad[j]<-glasso(est.scad.old, rhomat)$loglik # Single Cross Validation } cv.tot[i]<-sum(cv.s.scad) # Crosso Validation for different rho } list(data=y,ind.cv=cv.s.scad,CV=cv.tot,iteration=count) } cv.scad(20,3,5,4,10,.01,3.7) mu0<-c(3, 1, 4);mu0 sig0<-matrix(c(6,1,-2,1,13,4,-2,4,4), nrow=3, byrow=T);sig0 Y<-mvrnorm(20,mu0,sig0);Y ##K-fold cross-validation library(DAAG) cv.lm(df=mydata, fit, m=4) # 3 fold cross-validation
9d980c567eb013deb292e4267a9583e108347380
37d272c2e369a1eb1e55ca7d38ceb9911d42dd05
/man/extract_from_cellranger.Rd
1cc6b660a46dc54cca814b0c0431fbd947ab4a06
[]
no_license
shambam/scgex_navigator
3afc69c769442707c496b5f1ad6fbb0bb52c77a0
361407a6848c972ed117b5f4d3b6399a3b944930
refs/heads/master
2021-01-22T23:54:18.501033
2017-05-31T09:12:26
2017-05-31T09:12:26
85,680,902
0
0
null
null
null
null
UTF-8
R
false
true
551
rd
extract_from_cellranger.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataprep_funcs.R \name{extract_from_cellranger} \alias{extract_from_cellranger} \title{Extracts the components need from a cellRanger aggrergated file} \usage{ extract_from_cellranger(path, build = c("mm10", "hg38")) } \arguments{ \item{path}{A path to the cellranger output folder} \item{build}{The version of the build, default is "mm10", alternative is "hg38"} } \description{ lkjfl;ksjd lksjdf lksdfj lksd fjslkdf slkdjf lskjd } \keyword{cellranger} \keyword{extract}
9313c73dfcbf8323a7f6617d48a14deff9132cd1
295b502d7e367edfa0ee4017f1a7b6a4135211d3
/R/predict.ELMCoxBoost.R
06e34a5a40f27a8e594556ade9d8c246bc5bf7c3
[]
no_license
whcsu/SurvELM
e5b09b504af20ad5e322c687504090cf19689cb9
c9297f6bd29ff3448e84d1420aeed1215e611ba9
refs/heads/master
2021-05-11T02:52:36.034952
2020-01-28T08:57:32
2020-01-28T08:57:32
117,897,717
10
2
null
null
null
null
UTF-8
R
false
false
1,755
r
predict.ELMCoxBoost.R
##' Predicting from An Extreme Learning Machine Cox Model with Likelihood Based Boosting ##' @title SurvELM predict.ELMCoxBoost ##' @param object An object that inherits from class ELMCoxBoost. ##' @param testx A data frame in which to look for variables with which to predict. ##' @param ... Additional arguments for \code{CoxBoost}. ##' @return produces a vector of predictions or a matrix of predictions ##' @seealso \code{predict.CoxBoost} ##' @author Hong Wang ##' @examples ##' set.seed(123) ##' library(SurvELM) ##' library(survival) ##' #Lung DATA ##' data(lung) ##' lung=na.omit(lung) ##' lung[,3]=lung[,3]-1 ##' n=dim(lung)[1] ##' L=sample(1:n,ceiling(n*0.5)) ##' trset<-lung[L,] ##' teset<-lung[-L,] ##' rii=c(2,3) ##' elmsurvmodel=ELMCoxBoost(x=trset[,-rii],y=Surv(trset[,rii[1]], trset[,rii[2]])) ##' #THE predicted linear predictor ##' testpre=predict(elmsurvmodel,teset[,-c(rii)]) ##' #The predicted cumulative incidence function ##' testprecif=predict(elmsurvmodel,teset[,-c(rii)],type="CIF") ##' # The predicted partial log-likelihood ##' testprellk=predict(elmsurvmodel,teset[,-c(rii)],newtime=teset[,rii[1]], ##' newstatus=teset[,rii[2]],type="logplik") ##' uniquetimes=sort(unique(trset$time)) ##' # The predicted probability of not yet having had the event at the time points given in times ##' testprerisk=predict(elmsurvmodel,teset[,-c(rii)],times=uniquetimes,type="risk") ##' @export predict.ELMCoxBoost<- function(object, testx,...) { Kernel_para = object$Kernel_para kerneltype = object$kerneltype trainx = object$trainx H = kernmat(trainx,kerneltype, Kernel_para,testx) #elmcoxpre = survFit(mbelmcox$mbelm_cox,as.matrix(H)) elmcoxpre = predict(object$elmcoxboost,as.matrix(H),...) return(elmcoxpre) }
6ca58b6159703592173cfae73c22a8d8c25709b4
e56c98512229172467f1f4f99870ed2aac5324cd
/man/sdm.Rd
54c5e1d8363b0940d3ab63f53b8f736ef4bcde6f
[]
no_license
babaknaimi/sdm
6de65e769562adedca326adaaf66518870830e62
63ec623526e3867158a4847e3eff1c5d3350552b
refs/heads/master
2021-11-25T10:59:02.624170
2021-11-11T05:35:37
2021-11-11T07:19:16
39,352,874
18
7
null
null
null
null
UTF-8
R
false
false
3,676
rd
sdm.Rd
\name{sdm} \alias{sdm} \alias{sdm,ANY,sdmdata,character-method} \alias{sdm,sdmdata,.sdmCorSetting,ANY-method} \alias{sdm,ANY,sdmdata,.sdmCorSetting-method} \title{Fit and evaluate species distribution models} \description{ Fits sdm for single or multiple species using single or multiple methods specified by a user in \code{methods} argument, and evaluates their performance. } \usage{ sdm(formula, data, methods,...) } \arguments{ \item{formula}{Specifies the structure of the model, types of features, etc.} \item{data}{a \code{sdmdata} object created using \code{\link{sdmData}} function} \item{methods}{Character. Specifies the methods, used to fit the models} \item{...}{additional arguments} } \details{ sdm fits multiple models and can be used to generate multiple runs (replicates) of each method through partitioning (using one or several partitioning methods including: \code{subsampling}, \code{cross-validation}, and \code{bootstrapping}. Each model is evaluated against training data, and if available, splitted data (through partitioning; called dependent test data as well, i.e., "dep.test") and/or indipendent test data ("indep.test"). User should make sure that the methods are available and the required packages for them are installed before putting their names in the function, otherwise, the methods that cannot be run for any reason, are excluded by the function. It is a good practice to call \code{\link{installAll}} function (just one time when the sdm is installed), that tries to install all the packages that may be needed somewhere in the \code{sdm} package. A new method can be adopted and added to the package by a user using \code{\link{add}} function. It is also possible to get an instance of an existing method, override the setting and definition, and then add it with a new name (e.g., my.glm). The output would be a single object (\code{sdmModels}) that can be read/reproduced everywhere (e.g., on a new machine). A setting object can also be taken (exported) out of the output \code{sdmModels} object, that can be used to reproduce the same practice but given new conditions (i.e., new dataset, area. etc.) } \value{ an object of class \code{sdmModels} } \references{ Naimi, B., Araujo, M.B. (2016) sdm: a reproducible and extensible R platform for species distribution modelling, Ecography, 39:368-375, DOI: 10.1111/ecog.01881 } \author{Babak Naimi \email{naimi.b@gmail.com} \url{https://www.r-gis.net/} \url{https://www.biogeoinformatics.org} } \examples{ \dontrun{ file <- system.file("external/pa_df.csv", package="sdm") df <- read.csv(file) head(df) d <- sdmData(sp~b15+NDVI,train=df) d #---- # Example 1: fit using 3 models, and no evaluation (evaluation based on training dataset): m <- sdm(sp~b15+NDVI,data=d,methods=c('glm','gam','gbm')) m # Example 3: fit using 5 models, and # evaluates using 10 runs of subsampling replications taking 30 percent as test: m <- sdm(sp~b15+NDVI,data=d,methods=c('glm','gam','gbm','svm','rf'), replication='sub',test.percent=30,n=10) m # Example 3: fits using 5 models, and # evaluates using 10 runs of both 5-folds cross-validation and bootsrapping replication methods m <- sdm(sp~.,data=d,methods=c('gbm','tree','mars','mda','fda'), replication=c('cv','boot'),cv.folds=5,n=10) m # Example 4: fit using 3 models; evaluate the models using subsampling, # and override the default settings for the method brt: m <- sdm(sp~b15+NDVI,data=d,methods=c('glm','gam','brt'),test.p=30, modelSettings=list(brt=list(n.trees=500,train.fraction=0.8))) m } } \keyword{spatial} \keyword{model} \keyword{data} \keyword{species}
b895df96ad71d67acdac1b6bcd3feda3018bfe70
bad016da9e32faadd8800ff5e65f57cb6909479c
/ui.R
0d266877650adf147d1647cbba94fbc5ba363e6f
[]
no_license
kevindaymath/NCEmissionsShiny
a6636c3ec9602b5f95c76380f610e21461186a8d
0692faa1284e544cb5093dff37e0b950cdb6ec97
refs/heads/master
2020-03-21T01:26:02.603890
2018-06-20T15:25:08
2018-06-20T15:25:08
137,942,356
0
0
null
null
null
null
UTF-8
R
false
false
1,309
r
ui.R
options(warn=-1) library(shiny) library(leaflet) library(DT) load("data\\data.RData") # Define UI for dataset viewer application fluidPage( # Application title titlePanel("EPA Emissions Data (in tons)"), # sidebarLayout( # sidebarPanel( # helpText("Select a county below"), # selectInput("county",label="Choose a county", # choices=NCCountyList$County.Name, selected="Alamance"), # width = 3, # br() # ), mainPanel( tabsetPanel( tabPanel("Map", selectInput("variable",label="Choose a varsiable", choices=var, selected=var[1]), htmlOutput("County"),leafletOutput("CountyMap"), htmlOutput("Region"),leafletOutput("RegionMap")), tabPanel("Table", sidebarPanel( radioButtons("Level",label="Choose a level", choices=list("County"=1,"Region"=2),selected =1), width = 3), checkboxGroupInput("show_vars","Display",unique(categories$Category),selected = "Agriculture",inline=TRUE), DT::dataTableOutput("tableCounty") ) ) ) )
5cc219aa3f04c735d84503be238277f24c890db4
8a03ba8694baec69d38cb30f3198fc1d770b467b
/R/graph_mwra_sewage_data.R
38ecd92d9bfdae03678e8cdf47efa6a47586c7e4
[]
no_license
smach/WrangleMACovidData
c7817e841d16698bb84e9566fefe08dfc5c941a1
cdbb0f9cb1aa22447155aca520db241ee3b6d46d
refs/heads/main
2023-02-20T08:11:01.434747
2021-01-22T00:32:18
2021-01-22T00:32:18
287,988,156
1
0
null
null
null
null
UTF-8
R
false
false
925
r
graph_mwra_sewage_data.R
#' Generate interactive plotly graph of MWRA sewage testing data #' #' Data from http://www.mwra.com/biobot/biobotdata.htm generated by import_mwra_sewage_data() function. See mwra-data vignette for details. #' #' @param mydf dataframe of MWRA sewage test data from import_mwra_sewage_data() #' @param mytitle character string of desired graph title #' #' @return plotly graph #' @export #' graph_sewage_data <- function(mydf, mytitle = "") { plotly::ggplotly( ggplot2::ggplot(mydf, ggplot2::aes(x = SampleDate, y = DetectedCovid, colour = Region, Group = Region)) + ggplot2::geom_line() + ggplot2::geom_point() + ggplot2::scale_color_manual(values = c("#377eb8", "#4daf4a")) + ggplot2::xlab("") + ggplot2::ylab("RNA copies/mL") + ggplot2::theme_minimal() + ggplot2::scale_x_date(date_breaks = "28 days", date_labels = "%b %e") + ggplot2::labs(title = mytitle) ) }
0d685a41b32d1b2d07aeb02b53802e021259538e
6dcd7c7215b226abf5ed6736b9dc118af31e7466
/man/all_object_size.Rd
3a50b744ea8096e14eb59feaaf88f273de3e3d0f
[ "MIT" ]
permissive
adrientaudiere/MiscMetabar
b31a841cdac749a0074a0c24c7f8248348c64a22
2cb7839d26668836aac129af7115dea0a52385c0
refs/heads/master
2023-08-31T06:57:15.546756
2023-08-23T09:10:52
2023-08-23T09:10:52
268,765,075
7
0
NOASSERTION
2023-09-06T10:12:57
2020-06-02T10:02:00
R
UTF-8
R
false
true
487
rd
all_object_size.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/miscellanous.R \name{all_object_size} \alias{all_object_size} \title{List the size of all objects of the GlobalEnv.} \usage{ all_object_size() } \value{ a list of size } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} Code from https://tolstoy.newcastle.edu.au/R/e6/help/09/01/1121.html }
734f5489eab1d5272b3d54f2e7ca3ee27dc0d58f
5307b4b351ab14d178ce00850f3b336ceb58c8e6
/markov_smoking_probabilistic_novgam.R
1b6542e0c025b31ab21e00a1827b7b892acc5bb5
[]
no_license
dearku/Markov-model-without-VGAM
02e1f9bc27ba124250889ca2609f57a07cc590b2
590398230db8c90d0ee6d316726c08a9e5459ce3
refs/heads/main
2023-05-23T10:31:21.294633
2021-06-17T15:52:27
2021-06-17T15:52:27
null
0
0
null
null
null
null
UTF-8
R
false
false
10,476
r
markov_smoking_probabilistic_novgam.R
# Smoking Cessation Markov model # Edited to use rbeta() instead of rdiric() to avoid dependency on VGAM # Howard Thom # Load necessary libraries # If not installed use the following line first # install.packages("BCEA) library(BCEA) # Set a random number seed so results are reproducible set.seed(1002435) # Define the number and names of treatments # These are Standard of Care with website # and Standard of Care without website n_treatments <- 2 treatment_names <- c("SoC with website", "SoC") # Define the number and names of states of the model # This is two and they are "Smoking" and "Not smoking" n_states <- 2 state_names <- c("Smoking", "Not smoking") # Define the number of cycles # This is 10 as the time horizon is 5 years and cycle length is 6 months # The code will work for any even n_cycles (need to change the discounting code if # an odd number of cycles is desired) n_cycles <- 10 # Define simulation parameters # This is the number of PSA samples to use n_samples <- 1000 ############################################################################# ## Input parameters ######################################################### ############################################################################# # The transition matrix is a 2x2 matrix # Rows sum to 1 # Top left entry is transition probability from smoking to smoking # Top right is transition probability from smoking to not smoking # Bottom left is transition probability from not smoking to smoking # Bottom right is transition probability from not smoking to not smoking # There is one transition matrix for each treatment option and each PSA sample # Store them in an array with (before filling in below) NA entries transition_matrices <- array(dim = c(n_treatments, n_samples, n_states, n_states), dimnames = list(treatment_names, NULL, state_names, state_names)) # First the transition matrix for Standard of Care with website # Transitions from smoking temp <- rbeta(n_samples, 85, 15) transition_matrices["SoC with website", , "Smoking", ] <- matrix(c(temp, 1-temp), ncol = 2) # Transitions from not smoking temp <- rbeta(n_samples, 8, 92) transition_matrices["SoC with website", , "Not smoking", ] <- matrix(c(temp, 1-temp), ncol = 2) # Second the transition matrix for Standard of Care # Transitions from smoking temp <- rbeta(n_samples, 88, 12) transition_matrices["SoC", , "Smoking", ] <- matrix(c(temp, 1-temp), ncol = 2) # Transitions from not smoking # These should be the same as the transition probabilities from not smoking for SoC with website # as the website has no impact on probability of relapse transition_matrices["SoC", , "Not smoking", ] <- transition_matrices["SoC with website", , "Not smoking", ] # Now define the QALYS associated with the states per cycle # There is one for each PSA sample and each state # Store in an NA array and then fill in below state_qalys <- array(dim = c(n_samples, n_states), dimnames = list(NULL, state_names)) # QALY associated with 1-year in the smoking state is Normal(mean = 0_95, SD = 0_01) # Divide by 2 as cycle length is 6 months state_qalys[, "Smoking"] <- rnorm(n_samples, mean = 0.95, sd = 0.01) / 2 # QALY associated with 1-year in the not smoking state is 1 (no uncertainty) # So all PSA samples have the same value # Again divide by 2 as cycle length is 6 months state_qalys[, "Not smoking"] <- 1 / 2 # And finally define the state costs # These are all zero as the only cost is a one-off subscription fee of ?50 # to the smoking cessation website state_costs<-array(0, dim = c(n_samples, n_states), dimnames = list(NULL, state_names)) # Define the treatment costs # One for each PSA sample and each treatment # Treatment costs are actually fixed but this allows flexibility if we # want to include uncertainty / randomness in the cost treatment_costs <- array(dim = c(n_treatments, n_samples), dimnames = list(treatment_names, NULL)) # Cost of the smoking cessation website is a one-off subscription fee of ?50 treatment_costs["SoC with website", ] <- 50 # Zero cost for standard of care treatment_costs["SoC", ] <- 0 ############################################################################# ## Simulation ############################################################### ############################################################################# # Build an array to store the cohort vector at each cycle # Each cohort vector has 2 ( = n_states) elements: probability of being in smoking state, # and probability of being in the not smoking state # There is one cohort vector for each treatment, for each PSA sample, for each cycle_ cohort_vectors <- array(dim = c(n_treatments, n_samples, n_cycles, n_states), dimnames = list(treatment_names, NULL, NULL, state_names)) # Assume that everyone starts in the smoking state no matter the treatment cohort_vectors[, , 1, "Smoking"] <- 1 cohort_vectors[, , 1, "Not smoking"] <- 0 # Build an array to store the costs and QALYs accrued per cycle # One for each treatment, for each PSA sample, for each cycle # These will be filled in below in the main model code # Then discounted and summed to contribute to total costs and total QALYs cycle_costs <- array(dim = c(n_treatments, n_samples, n_cycles), dimnames = list(treatment_names, NULL, NULL)) cycle_qalys <- array(dim = c(n_treatments, n_samples, n_cycles), dimnames = list(treatment_names, NULL, NULL)) # Build arrays to store the total costs and total QALYs # There is one for each treatment and each PSA sample # These are filled in below using cycle_costs, # treatment_costs, and cycle_qalys total_costs <- array(dim = c(n_treatments, n_samples), dimnames = list(treatment_names, NULL)) total_qalys <- array(dim = c(n_treatments, n_samples), dimnames = list(treatment_names, NULL)) # The remainder of the cohort_vectors will be filled in by Markov updating below # Main model code # Loop over the treatment options for (i_treatment in 1:n_treatments) { # Loop over the PSA samples for (i_sample in 1:n_samples) { # Loop over the cycles # Cycle 1 is already defined so only need to update cycles 2:n_cycles for (i_cycle in 2:n_cycles) { # Markov update # Multiply previous cycle's cohort vector by transition matrix # i_e_ pi_j = pi_(j-1)*P cohort_vectors[i_treatment, i_sample, i_cycle, ] <- cohort_vectors[i_treatment, i_sample, i_cycle-1, ]%*% transition_matrices[i_treatment, i_sample, , ] } # Now use the cohort vectors to calculate the # total costs for each cycle cycle_costs[i_treatment, i_sample, ] <- cohort_vectors[i_treatment, i_sample, , ] %*% state_costs[i_sample, ] # And total QALYs for each cycle cycle_qalys[i_treatment, i_sample, ] <- cohort_vectors[i_treatment, i_sample, , ] %*% state_qalys[i_sample, ] # Combine the cycle_costs and treatment_costs to get total costs # Apply the discount factor # (1 in first year, 1_035 in second, 1_035^2 in third, and so on) # Each year acounts for two cycles so need to repeat the discount values total_costs[i_treatment, i_sample] <- treatment_costs[i_treatment, i_sample] + cycle_costs[i_treatment, i_sample, ] %*% (1 / 1.035)^rep(c(0:(n_cycles / 2-1)), each = 2) # Combine the cycle_qalys to get total qalys # Apply the discount factor # (1 in first year, 1_035 in second, 1_035^2 in third, and so on) # Each year acounts for two cycles so need to repeat the discount values total_qalys[i_treatment, i_sample] <- cycle_qalys[i_treatment, i_sample, ]%*% (1 / 1.035)^rep(c(0:(n_cycles / 2-1)), each = 2) } } ############################################################################# ## BCEA Analysis of results ################################################# ############################################################################# #Note costs and QALYs need to be transposed in this example for BCEA to run smoking_bcea <- bcea(e = t(total_qalys), c = t(total_costs), ref = 1, interventions = treatment_names) #get summary statistics summary(smoking_bcea, wtp = 20000) #plot the cost-effectiveness plane ceplane.plot(smoking_bcea, wtp = 20000) #plot a CEAC smoking_multi_ce <- multi.ce(smoking_bcea) mce.plot(smoking_multi_ce, pos = c(1,0)) ############################################################################# ## Base R Analysis of results ############################################### ############################################################################# # Average costs # These are ?50 on the website and 0 on standard of care as there are no # costs other than the website subscription cost average_costs <- rowMeans(total_costs) # Average effects (in QALY units) # These are slightly higher on the website as higher probability of # quitting smoking average_effects <- rowMeans(total_qalys) # Incremental costs and effects relative to standard of care # No uncertainty in the costs as the website cost is fixed at ?50 incremental_costs <- total_costs["SoC with website", ]-total_costs["SoC", ] # In some samples the website leads to higher QALYs but in others it is negative # There is uncertainty as to whether the website is an improvement over SoC incremental_effects <- total_qalys["SoC with website", ]-total_qalys["SoC", ] # The ICER comparing Standard of care with website to standard of care # This is much lower than the ?20,000 willingness-to-pay threshold indicating # good value for money ICER <- mean(incremental_costs) / mean(incremental_effects) # Incremental net benefit at the ?20,000 willingness-to-pay # Sometimes positive (website more cost-effective) and sometimes negative (SoC more cost-effective) # Need to look at averages and consider probabilities of cost-effectiveness incremental_net_benefit <- 20000*incremental_effects-incremental_costs # Average incremental net benefit # This is positive indicating cost-effectiveness at the ?20,000 threshold average_inb <- mean(incremental_net_benefit) # Probability cost-effective # This is the proportion of samples for which the incremental net benefit is positive # It is close to 72%, representing good degree of certainty # in recommendation to adopt the smoking cessation website probability_cost_effective <- sum(incremental_net_benefit>0) / n_samples
c50434076e713a9cf75f241d6e3e4e93777e1ecb
6fb04083c9d4ee38349fc04f499a4bf83f6b32c9
/R/wilcox.test.R
253541fd0f101a9644451b158ee0fed57648d416
[]
no_license
phani-srikar/AdapteR
39c6995853198f01d17a85ac60f319de47637f89
81c481df487f3cbb3d5d8b3787441ba1f8a96580
refs/heads/master
2020-08-09T10:33:28.096123
2017-09-07T09:39:25
2017-09-07T09:39:25
214,069,176
0
1
null
null
null
null
UTF-8
R
false
false
6,724
r
wilcox.test.R
#' Wilcox Test. #' #' An S3 class to represent wilcox signed Rank test Performs one- and #' two-sample Wilcoxon tests on vectors of data; the latter is also #' known as \code{Mann-Whitney} test. #' If only x is given, or if both x and y are given and paired is #' TRUE, a Wilcoxon signed rank test of the null that the distribution #' of x (in the one sample case) or of x - y (in the paired two sample #' case) is symmetric about mu is performed. Otherwise, if both x and #' y are given and paired is FALSE, a Wilcoxon rank sum test #' (equivalent to the Mann-Whitney test: see the Note) is carried out. #' In this case, the null hypothesis is that the distributions of x #' and y differ by a location shift of mu and the alternative is that #' they differ by some other location shift (and the one-sided #' alternative "greater" is that x is shifted to the right of y). #' @param x FLvector of data values. Non-finite (e.g., infinite or #' missing) values will be omitted. #' @param y an optional FLVector of data values: as with x non-finite values will be omitted. #' @param paired a logical indicating whether you want a paired test. #' @section Constraints: conf.level, conf.int is not supported currently for FL objects. #' @seealso \code{\link[stats]{wilcox.test}} for R reference implementation. #' @return A list with class "htest". #' @examples #' Wilcoxon Signed Rank test: #' a <- as.FLVector(c(85,70,40,65,80,75,55,20)) #' b <- as.FLVector(c(75,50,50,40,20,65,40,25)) #' res <- wilcox.test(a, b, paired = TRUE) #' #' Mann-Whitney test: #' a <- as.FLVector(c(6, 8, 2, 4, 4, 5)) #' b <- as.FLVector(c(7, 10, 4, 3, 5, 6)) #' res <- wilcox.test(a, b, paired = FALSE) #' @export setGeneric("wilcox.test",function(x, ...) standardGeneric("wilcox.test")) setMethod("wilcox.test",signature(x="ANY"), function(x,...){ return(stats::wilcox.test(x,...)) }) setMethod("wilcox.test",signature(x="FLVector"), function(x,y = NULL,paired = TRUE, mu = 0,...) { if(!is.FLVector(x) || !is.FLVector(y)) stop("Must be FLVector") else { if(paired) { vviewName <- gen_view_name("wsrTest") if(length(x)> length(y)) res <- sqlSendUpdate(connection, createHypoView(y,x,vviewName)) else res <- sqlSendUpdate(connection, createHypoView(x,y,vviewName)) ## vcall <- as.list(sys.call()) dname = paste0(vcall[2]," and ",vcall[3]) ## Using Stored Proc Query. ret <- sqlStoredProc(connection, "FLWSRTest", TableName = vviewName, Val1ColName = "Num_Val1", Val2ColName = "Num_Val2", WhereClause = "NULL" , GroupBy = "DatasetID", TableOutput = 1, outputParameter = c(ResultTable = 'a')) colnames(ret) <- tolower(colnames(ret)) if(!is.null(ret$resulttable)){ sqlstr <- paste0( "SELECT q.W_STAT AS w_stat, q.P_VALUE AS p_value, q.W_STAT_Neg AS w_stat_neg, q.W_STAT_Posi AS w_stat_posi FROM ",ret$resulttable," AS q") result <- sqlQuery(connection,sqlstr) } else result <- ret stats <- c(V = result$w_stat_posi) ## res <- list(statistic = stats, parameter = NULL, p.value = result$p_value, null.value = c("location shift"=0), alternative = "two.sided", method = "Wilcoxon signed rank test", data.name =dname # call=vcall ) class(res) <- "htest" dropView(vviewName) return(res) } else { vviewName <- gen_view_name("MWTest") t <- constructUnionSQL(pFrom = c(a = constructSelect(x), b = constructSelect(y)), pSelect = list(a = c(DatasetID=1, GroupID = 1, Num_Val = "a.vectorValueColumn"), b = c(DatasetID=1, GroupID = 2, Num_Val = "b.vectorValueColumn"))) q <- createView(vviewName,t) vcall <- as.list(sys.call()) dname = paste0(vcall[2]," and ",vcall[3]) ret <- sqlStoredProc(connection, "FLMWTest", TableName = vviewName, ValColName = "Num_Val", GroupColName = "GroupID", WhereClause = "NULL" , GroupBy = "DatasetID", TableOutput = 1, outputParameter = c(ResultTable = 'a')) colnames(ret) <- tolower(colnames(ret)) if(!is.null(ret$resulttable)){ sqlstr <- paste0("SELECT U_STAT AS u_stat, \n ", " P_VALUE AS p_value \n ", " FROM ",ret$resulttable) result <- sqlQuery(connection, sqlstr) } else result <- ret res <- list(statistic = c(W = result$u_stat), parameter = NULL, p.value = result$p_value, null.value = c("location shift"=0), alternative = "two.sided", method = "Wilcoxon rank sum test", data.name = dname ) class(res) <- "htest" dropView(vviewName) return(res) } } })
9d2fb41b4fd15ba85423613fd0f5babc3e329f6a
2e37e4e3506c814f0449fae6971c4e10440e5e01
/tests/testthat/testsummary.zoonWorkflow.R
725e72d716bf594b7b41a7b1f44b20e0ac50d8d8
[]
no_license
cran/zoon
f5c03c31d417238c9be03c7a2bca133c71749fa3
cd5903ef805b4ed31fb4c2b338c32f02f1fee1e3
refs/heads/master
2020-04-06T21:25:50.085542
2020-02-28T15:30:02
2020-02-28T15:30:02
48,091,536
0
0
null
null
null
null
UTF-8
R
false
false
2,252
r
testsummary.zoonWorkflow.R
context("summary.zoonWorkflow") test_that("summary.zoonWorkflow tests", { skip_on_cran() set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = Background(n = 70), model = LogisticRegression, output = SameTimePlaceMap )), class = "character" ) set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = Chain(UKAir, UKAir, UKAir, UKAir, UKAir, UKAir), process = Background(n = 70), model = LogisticRegression, output = SameTimePlaceMap )), class = "character" ) set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = list(UKAir, UKAir), process = Background(n = 70), model = LogisticRegression, output = SameTimePlaceMap )), class = "character" ) set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = Background(n = 70), model = LogisticRegression, output = SameTimePlaceMap )), class = "character" ) set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = list(Background(n = 70), NoProcess), model = LogisticRegression, output = SameTimePlaceMap )), class = "character" ) set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = Background(n = 70), model = list(Domain, LogisticRegression), output = SameTimePlaceMap )), class = "character" ) suppressWarnings({SDMTools_check <- requireNamespace('SDMTools', quietly = TRUE)}) if(!SDMTools_check) skip(message = 'SDMTools required for some tests') set.seed(1) expect_is( summary(workflow( occurrence = UKAnophelesPlumbeus, covariate = UKAir, process = BackgroundAndCrossvalid, model = Domain, output = list( SameTimePlaceMap, PerformanceMeasures ) )), class = "character" ) })
7ed38451def847b1ced89ec383c3acad5ed812bc
269eff99a621cde7e6f26e9fd27a031a4a66ea38
/R-language-projects/K means clustering-Wine/Kmeans-Wine.R
16189748ee66c53fd1fe6e2d3f64d5bd230eacb0
[]
no_license
KrushnaWakode12/Data-Science
d7e1734bdff99e5a2d5203259cd9ee1b0280b6fa
9f6695e8fc8520bce249a8bc04f074222b9728c9
refs/heads/master
2020-10-01T22:12:53.780791
2020-02-25T20:24:22
2020-02-25T20:24:22
227,634,547
0
0
null
null
null
null
UTF-8
R
false
false
1,481
r
Kmeans-Wine.R
#define libraries required for program library(ggplot2) library(cluster) #Read input files df1 <- read.csv('winequality-red.csv', sep = ';') df2 <- read.csv('winequality-white.csv', sep = ';') #add wine labels df1$label <- sapply(df1$pH, function(x){'red'}) df2$label <- sapply(df2$pH, function(x){'white'}) #COmbine both datasets wine <- rbind(df1,df2) #Plot Histograms and Scatterplot between different parameters to understand co-relation between them print(ggplot(wine,aes(x=residual.sugar)) + geom_histogram(aes(fill=label),color='black',bins = 50) + scale_fill_manual(values = c('#ae4554','white')) + theme_gray()) print(ggplot(wine,aes(x=citric.acid)) + geom_histogram(aes(fill=label),color='black',bins = 50) + scale_fill_manual(values = c('#ae4554','white')) + theme_gray()) print(ggplot(wine,aes(x=alcohol)) + geom_histogram(aes(fill=label),color='black',bins = 50) + scale_fill_manual(values = c('#ae4554','white')) + theme_gray()) print(ggplot(wine,aes(x=citric.acid,y=residual.sugar)) + geom_point(aes(color=label), alpha = 0.3) + scale_color_manual(values = c('red','white')) + theme_dark()) #Build K-means model and observe outcome wine.cluster <- kmeans(wine[1:12],2) print(wine.cluster) #Compare Predicted clusters with given data outcome to find effeciency of model print(table(wine$label,wine.cluster$cluster)) write.table(table(wine$label,wine.cluster$cluster), file='conf_table.csv', sep=',',col.names = c('white','red'))
5653e5a8eb9213da1a14c265e0f559cc39d84cff
959c359d37be00c71250fcc8f82d47382ad60637
/cachematrix.R
5059b3fb8f4ebd735e177fc6c73102b7a6abe8eb
[]
no_license
harinimukund/ProgrammingAssignment2
ff93864e14087b204fc834fe7cd5ece978e2e04c
a6f1ab4035d040511617274a2d0d65236a9928e5
refs/heads/master
2021-01-17T15:34:14.356221
2015-12-23T23:23:05
2015-12-23T23:23:05
48,455,639
0
0
null
2015-12-22T21:50:10
2015-12-22T21:50:09
null
UTF-8
R
false
false
1,243
r
cachematrix.R
## The program below is divided in 2 parts. ## 1) The program makeCacheMatrix keeps a list of values in memory ## 2) The program cacheSolve calculates the Inverse of an matrix if it is not cached already. ## The makeCacheMatrix takes in a matrix and returns a list ## which is used later used by the function cacheSolve. makeCacheMatrix <- function(x=matrix(data=NA,nrow=1,ncol=1)) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(inv) m <<- inv getInverse <- function() m list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) } ## The function cacheSolve takes in a matrix and checks if ## the inverse of the matrix is already calculated or not by calling the ## function makeCacheMatrix. If the values returned is Null it uses the SOLVE() in R ## to calculated the Inverse of a matrix and again called the makeCacheMatrix.setInverse() to save this value. cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' m <- x$getInverse() if(!is.null(m)) { message("getting cached data") return(m) } data <- x$get() m <- solve(data, ...) x$setInverse(m) m }
1b297616b288f667bff9c1643ce9fd047c37306e
8e4e6474a8fce97066e9231c0fe4b0a83ab841ff
/Ridgelineattempts/20191016_jmcastagnetto_ridgelines.R
b6231da8fee6981d6c7bc07c20507777f7a303dc
[]
no_license
microbesandmud/dataviz
51d51fae8e797701347a381d1472d0f6db57b0a0
c2ea09ece34068b3776671a681f3feefd80d9fef
refs/heads/master
2020-09-01T09:47:42.489507
2020-05-16T07:14:48
2020-05-16T07:14:48
218,933,769
0
0
null
null
null
null
UTF-8
R
false
false
1,715
r
20191016_jmcastagnetto_ridgelines.R
install.packages("lubridate") install.packages("gganimate") install.packages("extrafont") install.packages("ggdark") install.packages("ggridges") library(tidyverse) library(lubridate) library(extrafont) library(ggdark) library(ggridges) library(tidyverse) df <- read_csv( "20191016_simple_biopiles.csv", col_types = "fnnnnn") p1 <- ggplot(df, aes(y = Biopile, x = Months, fill = ..x..)) + geom_density_ridges_gradient( quantile_lines = TRUE, quantiles = 2, jittered_points = TRUE, alpha = 0.5, point_size = 0.6, point_color = "black") + scale_fill_viridis_c() + labs( title = "Age Distribution of Amusement Park Injuries in Texas", subtitle = "Young men seem to be more injury prone\n(Median value shown as a vertical line)\n#TidyTuesday, 2019-09-10", caption = "Source: data.world\n@jmcastagnetto / Jesus M. Castagnetto", y = "", x = "", fill = "Months" ) + xlim(-10, 80) + dark_theme_minimal() + theme( legend.position = "bottom", legend.text = element_text(size = 10), legend.title = element_text(size = 12), legend.justification = c(0, 0), axis.text.y = element_text(size = 18, color = "yellow"), axis.text.x = element_text(size = 12, color = "yellow"), strip.text = element_text(family = "Inconsolata", size = 36, face = "bold.italic"), plot.margin = unit(rep(1, 4), "cm"), plot.title = element_text(size = 24, face = "bold"), plot.subtitle = element_text(size = 18, face = "bold"), plot.caption = element_text(family = "Inconsolata", size = 14) ) p1 ggsave( plot = p1, filename = "2019-09-10.png", width = 12, height = 9 )
34fbaf0757a0c3866435fa44235e0e4bc78c83b0
8bc0348da53579f6d7cb45d7a60db9eafd04b7eb
/R/supp_rarefaction_curves.R
ceb9d6b318cafd5a5c9976b4ed963bea60e8cb59
[ "MIT" ]
permissive
RadicalCommEcol/multitrophic_feasibility
24fef12cfbd4b59af1c9837ee40b52c3c40122f7
fd98486f0638cc280da79b648727a344f38bd4ee
refs/heads/main
2023-04-15T18:36:02.170317
2023-02-07T09:18:58
2023-02-07T09:18:58
540,769,909
1
0
null
null
null
null
UTF-8
R
false
false
8,165
r
supp_rarefaction_curves.R
# Calculate rarefaction curves of species interactions # for each type of interaction observed (plant-plant, plant-herb, plant-pol) # INPUT # interaction matrices (/data/*_matrices.RData) # OUTPUT # rarefaction curves for every interaction and local community # ------------------------------------------------------------------------- library(tidyverse) library(vegan) library(iNEXT) library(patchwork) # ------------------------------------------------------------------------- # add a version suffix? vers.out <- "" vers <- "" # ------------------------------------------------------------------------- years <- c(2019,2020) plots <- 1:9 pp.all.years <- list() ph.all.years <- list() pfv.all.years <- list() for(i.year in 1:length(years)){ load(paste("./data/plant_plant_matrices_", years[i.year],vers,".RData",sep="")) load(paste("./data/plant_floral_visitor_matrices_", years[i.year],vers,".RData",sep="")) load(paste("./data/plant_herbivore_matrices_", years[i.year],vers,".RData",sep="")) pp.all.years[[i.year]] <- p_p ph.all.years[[i.year]] <- p_h pfv.all.years[[i.year]] <- p_fv } names(pp.all.years) <- years names(ph.all.years) <- years names(pfv.all.years) <- years # remove empty rows and columns ------------------------------------------- # keep only species that appear in a given year and plot for(i.year in 1:length(years)){ for(i.plot in 1:length(plots)){ for(i.guild in c("pp","ph","pfv")){ if(i.guild == "pp"){ my.matrix <- pp.all.years[[i.year]][[i.plot]] my.valid.rows <- apply(my.matrix,1,sum) my.valid.rows <- names(my.valid.rows)[which(my.valid.rows != 0)] my.valid.cols <- apply(my.matrix,2,sum) my.valid.cols <- names(my.valid.cols)[which(my.valid.cols != 0)] # slightly different from ph,pfv, because this is a plant-plant # matrix, so one sp cannot be only on rows/cols. my.valid.sp <- intersect(my.valid.rows,my.valid.cols) my.matrix <- my.matrix[my.valid.sp,my.valid.sp] pp.all.years[[i.year]][[i.plot]] <- my.matrix }else if(i.guild == "ph"){ my.matrix <- ph.all.years[[i.year]][[i.plot]] my.valid.rows <- apply(my.matrix,1,sum) my.valid.rows <- names(my.valid.rows)[which(my.valid.rows != 0)] my.valid.cols <- apply(my.matrix,2,sum) my.valid.cols <- names(my.valid.cols)[which(my.valid.cols != 0)] ph.all.years[[i.year]][[i.plot]] <- my.matrix[my.valid.rows, my.valid.cols] }else if(i.guild == "pfv"){ my.matrix <- pfv.all.years[[i.year]][[i.plot]] my.valid.rows <- apply(my.matrix,1,sum) my.valid.rows <- names(my.valid.rows)[which(my.valid.rows != 0)] my.valid.cols <- apply(my.matrix,2,sum) my.valid.cols <- names(my.valid.cols)[which(my.valid.cols != 0)] pfv.all.years[[i.year]][[i.plot]] <- my.matrix[my.valid.rows, my.valid.cols] }# if i.guild }# for i.guild }# for i.plot }# for i.year # ------------------------------------------------------------------------- # rarefaction/extrapolation # first, convert matrices to 1d vectors, usable by iNEXT, and store them in lists pp.interaction.list <- pp.all.years ph.interaction.list <- ph.all.years pfv.interaction.list <- pfv.all.years for(i.year in 1:length(years)){ for(i.plot in plots){ # plant-plant interactions my.pp.vec <- c(t(pp.all.years[[i.year]][[i.plot]])) my.pp.names.grid <- expand.grid(colnames(pp.all.years[[i.year]][[i.plot]]), rownames(pp.all.years[[i.year]][[i.plot]])) names(my.pp.vec) <- sprintf('%s_%s', my.pp.names.grid[,1], my.pp.names.grid[,2]) pp.interaction.list[[i.year]][[i.plot]] <- my.pp.vec # plant-herb interactions my.ph.vec <- c(t(ph.all.years[[i.year]][[i.plot]])) my.ph.names.grid <- expand.grid(colnames(ph.all.years[[i.year]][[i.plot]]), rownames(ph.all.years[[i.year]][[i.plot]])) names(my.ph.vec) <- sprintf('%s_%s', my.ph.names.grid[,1], my.ph.names.grid[,2]) ph.interaction.list[[i.year]][[i.plot]] <- my.ph.vec # plant-pol interactions my.pfv.vec <- c(t(pfv.all.years[[i.year]][[i.plot]])) my.pfv.names.grid <- expand.grid(colnames(pfv.all.years[[i.year]][[i.plot]]), rownames(pfv.all.years[[i.year]][[i.plot]])) names(my.pfv.vec) <- sprintf('%s_%s', my.pfv.names.grid[,1], my.pfv.names.grid[,2]) pfv.interaction.list[[i.year]][[i.plot]] <- my.pfv.vec }# for i.plot }# for i.year # second, generate iNEXT curves # these lists will hold the iNEXT plots pp.plot.list <- list() ph.plot.list <- list() pfv.plot.list <- list() community.sc <- expand.grid(year = years,plot = plots, pp = NA, pfv = NA, ph = NA) for(i.year in 1:length(years)){ for(i.plot in plots){ # plant-plant interactions pp.endpoint <- round(sum(pp.interaction.list[[i.year]][[i.plot]]) + .25 * sum(pp.interaction.list[[i.year]][[i.plot]])) pp.out <- iNEXT(unlist(pp.interaction.list[[i.year]][[i.plot]]), q=c(0), datatype="abundance", endpoint=pp.endpoint) pp.plot <- ggiNEXT(pp.out, type=2,color.var = "Order.q")+ scale_shape_manual(values = c(19))+ theme_bw(base_size = 12) + theme(legend.position="none")+ labs(x="",y="") + ggtitle(paste("plant-plant: ",years[i.year]," plot ",i.plot,sep="")) pp.plot.list[[length(pp.plot.list)+1]] <- pp.plot # plant-herb interactions ph.endpoint <- round(sum(ph.interaction.list[[i.year]][[i.plot]]) + .25 * sum(ph.interaction.list[[i.year]][[i.plot]])) ph.out <- iNEXT(unlist(ph.interaction.list[[i.year]][[i.plot]]), q=c(0), datatype="abundance", endpoint=ph.endpoint) ph.plot <- ggiNEXT(ph.out, type=2,color.var = "Order.q")+ scale_shape_manual(values = c(19))+ theme_bw(base_size = 12) + theme(legend.position="none")+ labs(x="",y="") + ggtitle(paste("plant-herbivore: ",years[i.year]," plot ",i.plot,sep="")) ph.plot.list[[length(ph.plot.list)+1]] <- ph.plot # plant-pol interactions pfv.endpoint <- round(sum(pfv.interaction.list[[i.year]][[i.plot]]) + .25 * sum(pfv.interaction.list[[i.year]][[i.plot]])) pfv.out <- iNEXT(unlist(pfv.interaction.list[[i.year]][[i.plot]]), q=c(0), datatype="abundance", endpoint=pfv.endpoint) pfv.plot <- ggiNEXT(pfv.out, type=2,color.var = "Order.q")+ scale_shape_manual(values = c(19))+ theme_bw(base_size = 12) + theme(legend.position="none")+ labs(x="",y="") + ggtitle(paste("plant-pollinator: ",years[i.year]," plot ",i.plot,sep="")) pfv.plot.list[[length(pfv.plot.list)+1]] <- pfv.plot pos <- which(community.sc$year == years[i.year] & community.sc$plot == i.plot) community.sc$pp[pos] <- pp.out$DataInfo$SC community.sc$ph[pos] <- ph.out$DataInfo$SC community.sc$pfv[pos] <- pfv.out$DataInfo$SC }# for i.plot }# for i.year mean(community.sc$pp) mean(community.sc$pfv) mean(community.sc$ph) sd(community.sc$pp) sd(community.sc$pfv) sd(community.sc$ph) # all interactions together mean(as.matrix(community.sc[,3:5])) # ------------------------------------------------------------------------- pp.plot.full <- wrap_plots(pp.plot.list) ph.plot.full <- wrap_plots(ph.plot.list) pfv.plot.full <- wrap_plots(pfv.plot.list) # ------------------------------------------------------------------------- # ggsave("results/images/Fig_plant_plant_rarefaction.pdf",pp.plot.full, # device = cairo_pdf, # width = 16,height = 12,dpi = 300) # # ggsave("results/images/Fig_plant_herb_rarefaction.pdf",ph.plot.full, # device = cairo_pdf, # width = 16,height = 12,dpi = 300) # # ggsave("results/images/Fig_plant_pol_rarefaction.pdf",pfv.plot.full, # device = cairo_pdf, # width = 16,height = 12,dpi = 300)
666ab3a89936c7e521dd8f188ad7da1c79b6fdd0
0ce1da8e088edfb8c0f55f0473c2cc1356f590dd
/man/logit.Rd
250c1004341b250c0e6388f13684ea9e7c50107b
[]
no_license
azolling/EBmodules
89cf57929870f176e15ce808e19da600206bec08
a114f566cc24621bafb3bedb343ba79b77bc80ce
refs/heads/master
2021-01-19T19:19:02.468274
2017-04-23T16:39:59
2017-04-23T16:39:59
88,411,378
1
1
null
null
null
null
UTF-8
R
false
true
373
rd
logit.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bayesian_code_final.R \name{logit} \alias{logit} \title{logit function} \usage{ logit(p) } \arguments{ \item{p}{a vector with values between 0 and 1 which we want to take logit.} } \description{ This function computes the logit of a quantity } \examples{ logit(runif(100,0,1)) } \keyword{logit}
48c2c0b4e1f91ace8ad59ccac4bd03f6e95fc04b
cad6b67bfd5bd73dc217346bb029ddb9fb0ef510
/man/bubblesOutput.Rd
07cd42b1b207389cfb4267ec8a4a72e8aafd2a2c
[ "MIT" ]
permissive
jpmarindiaz/bubbleCloud
8e0008766f3ed568a3c4f1f94185edf8d9183e0b
9747838ee6e6cced0d8f20f7d1487d6cfe82e96a
refs/heads/master
2020-03-29T21:24:46.356142
2015-05-24T16:38:13
2015-05-24T16:38:13
31,972,021
3
0
null
null
null
null
UTF-8
R
false
false
313
rd
bubblesOutput.Rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/bubbles.R \name{bubblesOutput} \alias{bubblesOutput} \title{Widget output function for use in Shiny} \usage{ bubblesOutput(outputId, width = "100\%", height = "500px") } \description{ Widget output function for use in Shiny }
ef90d761310be8deb34e1ac8f6c99fbbdb27faf9
5b2f016f1298c790224d83c1e17a425640fc777d
/chol/forestPlot.R
1cdd68ff55ea69802444d0d85dd5c7eb5a61ac5c
[]
no_license
Shicheng-Guo/methylation2020
b77017a1fc3629fe126bf4adbb8f21f3cc9738a0
90273b1120316864477dfcf71d0a5a273f279ef9
refs/heads/master
2023-01-15T20:07:53.853771
2020-02-28T03:48:13
2020-02-28T03:48:13
243,668,721
3
1
null
null
null
null
UTF-8
R
false
false
1,554
r
forestPlot.R
install.packages("metafor") library("metafor") rm(list=ls()) load("CD4_RGSS_data_beforecombat.RData") phen<-read.csv("CD4_RGSS_clinical.csv") methdata<-CD4_RGSS_data_beforecombat dim(phen) dim(methdata) head(phen) i=500 Seq<-paste(phen[,3],phen[,2],sep="_") mean<-tapply(as.numeric(methdata[i,]),Seq,function(x) mean(x,na.rm=T)) sd<-tapply(as.numeric(methdata[i,]),Seq,function(x) sd(x,na.rm=T)) num<-tapply(as.numeric(methdata[i,]),Seq,function(x) length(x)) m1i=mean[seq(1,8,by=2)] m2i=mean[seq(2,8,by=2)] sd1i=sd[seq(1,8,by=2)] sd2i=sd[seq(2,8,by=2)] n1i=num[seq(1,8,by=2)] n2i=num[seq(2,8,by=2)] Source<-unlist(lapply(strsplit(names(m1i),"_"),function(x) x[1])) data<-data.frame(cbind(n1i,m1i,sd1i,n2i,m2i,sd2i)) data$source=Source data es<-escalc(m1i=m1i, sd1i=sd1i, n1i=n1i, m2i=m2i, sd2i=sd2i, n2i=n2i,measure="MD",data=data) md <- rma(es,slab=source,method = "REML", measure = "MD",data=data) plot(md) files=list.files(pattern="*gdc_hg38.txt$",recursive = T) methdata<-c() for(i in 1:length(files)){ temp<-read.table(files[i],head=T,sep="\t",row.names = 1) methdata<-cbind(methdata,temp[,1]) print(i) } files=list.files(pattern="*.FPKM-UQ.txt$",recursive = T) rnaseqdata<-c() for(i in 1:length(files)){ temp<-read.table(files[i],head=F,sep="\t",row.names = 1) rnaseqdata<-cbind(rnaseqdata,temp[,1]) print(i) } colnames(rnaseqdata)<-files rownames(rnaseqdata)<-rownames(temp) save(rnaseqdata,file="rnaseqdata.pancancer.RData") save.image("rnaseqdata.pancancer.env.RData")
07ea18b037f6e6e418a08a4ca9813cc05cf84f4f
541a192813be04a1793959edd57dc7abb7834e22
/R_code/old/test_multivariate.R
a8e6fa3208035e3016043f17aef666d1b1c88bbd
[]
no_license
jumping2000/MasterThesis
03b2abc057fbfde4914c26dd03643b3424d5268f
f0b5dc44ae7e9e87380497d0d03bdfbf86f0e693
refs/heads/master
2021-10-26T16:00:09.891289
2019-04-13T16:56:07
2019-04-13T16:56:07
null
0
0
null
null
null
null
UTF-8
R
false
false
4,086
r
test_multivariate.R
################################################### ############### Multivariate Calibration ########## ################################################### rm(list = ls()) source("MultivariateMertonModel.R") ##### chiamata delle librerie library(tseries) library(mvtnorm) library(pracma) library(DEoptim) library(statmod) library(NMOF) library(readxl) library(xlsx) library(binaryLogic) ##### testing the mvMertonpdf #* (x, dt, mu, S, theta, delta, lambda, theta_z, delta_z, lambda_z, alpha) n = 2 m = (c(0,0)) SS = matrix(c(0.8, 0.2, 0.2, 0.1),ncol = 2) thet = (c(0.5,1.1)) delt = (c(0.1,0.3)) lambd = (c(30,20)) thet_z = 1 delt_z = 0.5 lambd_z = 10 alph = (c(1,2)) xx = rbind(c(0,0)) dt = 1/255 dmvnorm(xx,mean = m, sigma = SS) res =MultivariateMertonPdf(xx, dt=dt, m,SS,thet,delt,lambd,thet_z,delt_z, lambd_z, alph) res N=50 x <- seq(-1,1,length.out=N) y <- seq(-1,1,length.out=N) z <- matrix(rep(0,N*N),ncol = N) X = matrix(rep(0,N*N),ncol = N) Y = matrix(rep(0,N*N),ncol = N) z_nojumps= matrix(rep(0,N*N),ncol = N) for(i in 1:N){ for(j in 1:N){ X[i,j] = x[i] Y[i,j] = y[j] z[i,j] = MultivariateMertonPdf(c(x[i],y[j]), dt=dt, m,SS,thet,delt,lambd,thet_z,delt_z, lambd_z, alph) z_nojumps[i,j] = dmvnorm(c(x[i],y[j]),mean = m*dt, sigma = SS*sqrt(dt)) } } library(rgl) plot3d(X,Y,z, col='green') points3d(X,Y, z_nojumps, col = 'blue') legend3d("bottomleft",c("Jumps", "No jumps")) mean((z-z_nojumps)^2) ################################ negloglikelihood function ############################# ## test negloglikelihood function param=c(m,c(SS[1,1],SS[1,2],SS[2,2]), thet,delt,lambd,thet_z,delt_z,lambd_z,alph) xx = rmvnorm(1000, mean = m*dt, sigma = SS*dt) start_time <- Sys.time() negloglik(param, xx, dt=dt, n = 2) end_time <- Sys.time() end_time-start_time lx =lapply(seq_len(nrow(xx)), function(i) xx[i,]) start_time <- Sys.time() vnegloglik(param, lx, dt=dt, n = 2) end_time <- Sys.time() end_time-start_time start_time <- Sys.time() negloglik_2assets(param, xx, dt=dt, n = 2) end_time <- Sys.time() end_time-start_time # no common jump start_time <- Sys.time() negloglik_2assets_nocommon(params = c(m,c(SS[1,1],SS[1,2],SS[2,2]), thet,delt,lambd), xx, dt=dt, n = 2) end_time <- Sys.time() end_time-start_time ####################################################### ###################### Calibration #################### control_list = list(itermax = 500, NP = 200, strategy = 6,trace=5) bounds = BoundsCreator(2, n_common=1) start_time <- Sys.time() outDE <- DEoptim(negloglik_2assets, lower = bounds$lower, upper = bounds$upper, control = control_list, dt = dt, x = xx, n=2) end_time <- Sys.time() end_time-start_time ### no common jump bounds_nocommon = BoundsCreator(2, n_common=0) start_time <- Sys.time() outDE <- DEoptim(negloglik_2assets_nocommon, lower = bounds_nocommon$lower, upper = bounds_nocommon$upper, control = control_list, dt = dt, x = xx, n=2) end_time <- Sys.time() end_time-start_time ParametersReconstruction(outDE$optim$bestmem,2,common = FALSE) ## ==== DATA ==== ## load data set (need a web connection) x_EuroStoxx<-read.xlsx(file="EuroStoxx.xlsx",sheetName = "sheet1")[,2] #x <- get.hist.quote(instrument = "AAPL", # start = "2008-01-01", end = "2009-06-30", # retclass = "zoo", quote = "AdjClose", compression = "d") #x_EuroStoxx<-(simulateJump(0.1,0.25,1,-0.2,0.001,5,1/252)[,2]) #x_EuroStoxx<-ProcessoMerton(0.1,0.25,255*10,0.3,0.2,1/255) ## log-returns dy <- diff(log(as.vector(x_EuroStoxx))) ## assume 255 days in a year (trading days) dt <- 1 / 255 ## ==== DEOPTIM ESTIMATION ==== #set.seed(1234) outDE <- DEoptim(negloglik, lower = c( 0.1, -10, 1e-4, -10, 1e-4), upper = c(100, 10, 10, 10, 10), control = list(itermax = 500, NP = 100), dt = dt, dy = dy) #summary(outDE) parametri=outDE$optim$bestmem par=parametri[c(2,3,1,4,5)] plot(x_EuroStoxx, type='l') TotalTime=length(x_EuroStoxx)*dt
97945a1d115e12ab395cc1c2acb1ba0e74d7ff08
0b622b091c8d3ccc1fbcb36f35abb8c2b23744e0
/M565FinalProject/Code/Chuck/img_proc/createMaskFromEncodedFile.R
8b7b8a47da57df4077bdff1e82ee70cd5b83c75d
[]
no_license
chuckjia/B565-DataMining
12a8cba020a53910e172797ef587affb07d91263
42d7dd37470f644abbc30d70c888225f92716ecd
refs/heads/master
2021-09-27T22:10:47.901946
2018-11-12T05:14:57
2018-11-12T05:14:57
119,938,162
0
0
null
null
null
null
UTF-8
R
false
false
1,793
r
createMaskFromEncodedFile.R
# install.packages("png") library("png") # install.packages("rstudioapi") library(rstudioapi) createMaskFromEncodedFile <- function(outerFolder, encodedFile, newFolder) { dset <- read.csv(encodedFile) ndpt <- nrow(dset) prevFolder <- '' imgmat <- matrix(0, nrow = 1, ncol = 1) maskNo <- 1 height = 0 width = 0 for (row in 1:ndpt) { if (row %% 100 == 0) cat("Processing row no. ", row, " out of ", ndpt, " rows\n", sep = "") dpt <- dset[row,] currFolder <- as.character(dpt$ImageId) if (currFolder != prevFolder) { maskNo <- 1 prevFolder <- currFolder imgFile <- list.files(file.path(outerFolder, currFolder, 'images'), full.names = T) img <- readPNG(imgFile) height = nrow(img) width = ncol(img) } imgmat <- matrix(0, nrow = height, ncol = width) pixels <- scan(text = as.character(dpt$EncodedPixels), what = 0L, sep = " ", quiet = T) num_cells <- length(pixels) / 2 for (i in 1:num_cells) { pixNo = pixels[2 * i - 1] len = pixels[2 * i] for (j in 1:len) { index_col <- ceiling(pixNo / height) index_row <- pixNo - (index_col - 1) * height imgmat[index_row, index_col] <- 1 pixNo = pixNo + 1 } } folderToWrite <- file.path(outerFolder, currFolder, newFolder) dir.create(folderToWrite) outputfilename <- file.path(folderToWrite, paste(maskNo, ".png", sep = "")) writePNG(imgmat, outputfilename) maskNo = maskNo + 1 } }
f526dc2dbe04bbcc5a8a5a20d96621fba8916695
b61ea73d01d708ad9f337bae20a112ba233f8483
/man/validate_region.Rd
c6438a68a35982d5e89ef31cc17a2665404219b3
[ "MIT" ]
permissive
rnevils/youRtube
2466b490f290948c59e22e93356829d73d3c9aeb
bf0f3963a364a558405d001c4fc4cbc0deafa1a6
refs/heads/master
2022-06-12T05:58:55.552068
2020-05-05T01:56:51
2020-05-05T01:56:51
260,322,960
0
1
MIT
2020-05-05T01:58:06
2020-04-30T21:33:37
R
UTF-8
R
false
true
441
rd
validate_region.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_top_videos.R \name{validate_region} \alias{validate_region} \title{Validates region inputted by user} \usage{ validate_region(key, region) } \arguments{ \item{key}{Your YouTube API key} \item{region}{String or numeric value inputted by user} } \value{ String indicating if region given is valid or invalid } \description{ Validates region inputted by user }
195a54846bf3727a3c4c0bc1d055175e5314bb7a
d80b92f205586c7cbae986ba0a41236b682c4db4
/R/summary.glmmEP.r
189c26b0c10651575550546f408cff986b855c40
[]
no_license
cran/glmmEP
fdfe931681175cc95ce7df6609ca846e85c490b7
31f200bb27d92f2da8b6ebe5c64f461867360659
refs/heads/master
2020-03-18T21:11:51.476444
2019-10-15T07:19:35
2019-10-15T07:19:35
135,265,706
0
0
null
null
null
null
UTF-8
R
false
false
240
r
summary.glmmEP.r
########## R-function: summary.glmmEP ########## # For summarising the glmmEP() fit object. # Last changed: 18 JAN 2018 summary.glmmEP <- function(object,...) return(object$parameters) ########## End of summary.glmmEP ##########
2a11d795f40ab166148a6b67ee57b41341c9bf0b
f708aec3211a52cad14d9fc5d7cfc1b8253758cf
/profiling/1.R-basic/1.C.3_Part3-Visualization.R
203a7391c455e4487521e2c411ee6c02d60e4f59
[]
no_license
jyanglab/labworkshop
93aa1f7f9f0cbb2525d69496ba96fe883e23dba7
bd4cbe61ccaa1fa19c7c4784cf91be31972f8d0f
refs/heads/master
2020-05-24T12:24:59.596074
2019-07-19T21:15:31
2019-07-19T21:15:31
187,267,972
1
0
null
null
null
null
UTF-8
R
false
false
12,738
r
1.C.3_Part3-Visualization.R
# # Let's visualize our data # ======================== # # So far we have covered: # # - data types in R # - reading in data # - subsetting data # - reading documentation # - using functions # - saving data # # Of course, we haven't used one of R's most powerful assets: graphics. This # section is dedicated to creating a plot from the data. While R has very # powerful default plotting functions, we will be using the "ggplot2" package # as it relies on a consistent "grammar of graphics" that gives a clear # relationship between the data and the visualization. # # ### What is ggplot2? # # The package *ggplot2* is built off of the "grammar of graphics" in which # plots are built layer by layer, starting with the coordinate plane # and then adding geometric elements like lines, dots, bars, etc, and assigning # metadata to values like color or shape. # # The advantage of ggplot2 over R's native plotting is that the plots are saved # as R objects and can be modified by adding layers or even replacing data. This # tutorial will begin to scratch the surface of how to use ggplot2, but to get a # better idea of what is possible, you can browse the resources at # http://ggplot2.tidyverse.org/#learning-ggplot2 or examine the code of # colleagues (e.g. Alejandro Rojas: # https://github.com/alejorojas2/Rojas_Survey_Phytopath_2016). # # # After this section, you should have the tools to: # # 1. Create a simple plot in ggplot2 # 2. Save plots # 3. Plot with mean and error bars # # Again, since this is a four hour workshop, we do not expect mastery, but this # at least should give you a starting point. With that in mind, let's get # started! # # ### Getting started install.packages("ggplot2") library("ggplot2") # Data for plotting with ggplot2 must be stored in a data frame fungicide <- read.csv("data/fungicide_dat.csv") # read.csv automatically outputs a data frame # Ready to plot? First of all let's think: # # 1. What visualization might be appropriate for these data? # 2. What should be on the axes? # 3. Should we use lines, points, bars, boxplots, etc? # # To help facilitate your thinking, you may refer to the cheatsheet provided in the 'Help' tab # # # Step 1: Creating our plot # ------------------------- # # > Note: if you are reading this script after attending the workshop, the plot # > may look different due to the interactive nature of the workshop. This is # > intended as an example. # # Before we begin, we should become familiar with two functions: # # - `ggplot()` initializes a ggplot object from a data set. The data set needs # to be a data frame. # - `aes()` is a general way to specify what parts of the ggplot should be # mapped to variables in your data. e.g. What should be the x and y variables? # # # ### Creating the base of the ggplot # # To create our ggplot with nothing on it, we should specify two things: # # 1. The data set (fungicide) # 2. The mapping of the x and y coordinates (from the data set, using aes) # # > Note, we can specify the column names without using quotation marks. yield.plot <- ggplot(data = fungicide, mapping = aes(x = Treatment, y = Yield_bu_per_acre)) # If everything worked, you should see nothing. This is because ggplot2 returns # an R object. This object contains the instructions for creating the # visualization. When you print this object, the plot is created: yield.plot # Now you should see a plot with nothing on it where the x and y axes are # labeled "Treatment" and "Yield_bu_per_acre", respectively. # # To break down what the above function did, it first took in the data set # `fungicide` and then mapped the x and y aesthetics to the Treatment and # Yield_bu_per_acre columns. Effectively, this told ggplot how big our canvas # needs to be in order to display our data, but currently, it doesn't know # HOW we want to display our data; we need to give it a specific geometry. # # # ### Adding a geometry layer # # All functions that add geometries to data start with `geom_`, so if we wanted # the data to be displayed as a line showing the increase of yield over time, # we would use `geom_line()`. If we wanted to show the data displayed as points, # we can use `geom_point()`. # # To add a geometry or anything to a ggplot object, we can just use the `+` # symbol. Here, we will add boxplots. # # > Note: From here on out, I will be wrapping all commands with parentheses. # > This allows the result of the assignment to be displayed automatically. (yield.plot <- yield.plot + geom_boxplot()) # If we want to change the color of the boxplots from white (default) to orange, # we can do this by adding `geom_boxplot(fill = "orange")`. (yield.plot <- yield.plot + geom_boxplot(fill = "orange")) # Instead of all the boxplots having the same color, it will be interesting if we # could color them according to the Treatment. (yield.plot <- yield.plot + geom_boxplot(fill = Treatment)) # Oops! There was an error. It cannot recognize that we are talking about the # Treatment column from our data set. This is because we have to use the function # `aes()` whenever we are referring to our data set. (yield.plot <- yield.plot + geom_boxplot(aes(fill = Treatment))) # This works! # To give a title to our plot, we can use `ggtitle()`. (yield.plot <- yield.plot + ggtitle("Effect of Fungicides on Yield")) # We now have a fully functional and informative plot using only few lines of # code! Producing a visualization of your data can be an extremely useful tool # for analysis, because it can allow you to see if there are any strange patterns # or spurious correlations in your variables. # # We can click on 'Zoom' to view a bigger version of this plot. # # Of course, this plot is not quite publication ready. We need to add some # customization. Let's manipulate the aesthetics of the plot in how the data and # labels are displayed. But first, use the cheatsheet or 'Google' to do the # following exercises: # # ### Exercise 1: Create `new_plot` that is similar to `yield.plot`, but the # ### geometry is a violin plot instead of a box plot. new_plot <- ggplot(fungicide, aes(x = Treatment, y = Yield_bu_per_acre)) + geom_violin(aes(fill=Treatment)) + ggtitle("Effect of Fungicides on Yield") new_plot # ### Exercise 2: Add another layer to the `new_plot` that flips the # ### co-ordinate axes (rotates the plot at right angle). new_plot <- new_plot + coord_flip() new_plot # # ### Changing axes labels # # This is easily done with `xlab()` and `ylab()`: (yield.plot <- yield.plot + xlab("Treatment Applied")) (yield.plot <- yield.plot + ylab("Yield (bu/acre)")) # The labels are now okay, but it's still not publication-ready. The font is too # small, the background should have no gridlines and the axis text needs to be # darker. # # ### Adjusting Look and Feel (theme) # # The first thing we can do is change the default theme from `theme_grey()` to # `theme_bw()`. We will simultaneously set the base size of the font to be 14pt. # (yield.plot <- yield.plot + theme_bw(base_size = 14)) # # There are many different default themes available for ggplot2 objects that # change many aspects of the look and feel. The *ggthemes* contains many popular # themes such as fivethirtyeight and economist. Of course, we can make it # prettier before including it in our final manuscript. # # To adjust granular aspects of the theme, we can use the `theme()` function, # which contains a whopping 71 different options all related to the layout of # the non-data aspects of the plot. # # # ### Exercise 3: Look at `?theme` and figure out the following: # 1. change the aspect ratio of the panels # 2. remove the background grid in the panels ?theme # # When we inspect the help page of the `theme()` function, we can find out how # to adjust several parameters to make our plot look acceptable: # (yield.plot <- yield.plot + theme(aspect.ratio = 1)) # This looks the same (yield.plot <- yield.plot + theme(aspect.ratio = 2)) # This is too skinny (yield.plot <- yield.plot + theme(aspect.ratio = 1.25)) # I think this is perfect! (yield.plot <- yield.plot + theme(panel.grid = element_blank())) # # # Since the information in the legend is repetitive, we can remove it. If you # 'Google' how to remove the legend in ggplot2, you will find that you can use # `guides(fill=FALSE)`. # (yield.plot <- yield.plot + guides(fill = FALSE)) # # # # # ### Putting it all together # # Because we can add information to a plot with the `+` symbol, we can add all # of the elements in one go. Let's combine what we have above. # yield.plot <- ggplot(fungicide, aes(x = Treatment, y = Yield_bu_per_acre)) + geom_boxplot(aes(fill = Treatment)) + ggtitle("Effect of Fungicides on Yield") + xlab("Treatment Applied") + ylab("Yield (bu/acre)") + theme_bw(base_size = 14) + theme(aspect.ratio = 1.25, # We can provide multiple arguments panel.grid = element_blank()) + guides(fill=FALSE) yield.plot # How can we show that the boxplot of Fungicide_B is significantly different? # Hint:`annotate` it. ?annotate # ### Exercise 4: Unravel the working of `annotate` by pasting examples in the console. (yield.plot <- yield.plot + annotate(geom = "text", x = 3, y = 176.5, label = "P < 0.05", color = "red", size = 5)) # Congratulations! Your plot is ready for publishing! # # We can now create a similar plot for Severity Data. severity.plot <- ggplot(fungicide, aes(x = Treatment, y = Severity)) + geom_boxplot() + ggtitle("Effect of Fungicides on Disease Severity") + theme_bw(base_size = 14) + theme(aspect.ratio = 1.5, panel.grid = element_blank()) + xlab("Treatment Applied") + ylab("Disease Severity") severity.plot # # The text of the title is not in the center. To format text elements of the # plot, we can use the function `element_text()` inside `theme()`. Since we # need to edit the text of the plot title, we need to specify # `plot.title = element_text()`. (severity.plot <- severity.plot + theme(plot.title = element_text(hjust = 0.5))) # # Step 2: Saving our plot # ----------------------- # # Now that we have our plot finished, we can save it with the `ggsave()` # function, which allows us to save it as a pdf, png, svg, eps, etc. file. # Or, we can click on 'Export' (button just above the plot) and save it. ggsave(filename = "results/figure1.pdf", width = 88, units = "mm") # # Step 3: Plotting with mean and error bars # ----------------------------------------- # # One another type of plot that is very common in applied agricultural data # sets is that has mean and standard errors for each treatment. Mean can be # depicted in terms of bars or points on the plot. Let's practice this on # fungicide data. # # Before we can plot mean and standard errors, we have to calculate them first, # by using techniques we learned in Part 2 of the workshop. We will need to load # `dplyr` and `plotrix`. Base 'R' does not contain a function to calculate standard # error, but the package `plotrix` does. Moreover, this package can has functions # for creating specialized plots and other plotting accessories. library("dplyr") install.packages("plotrix") library("plotrix") fungicide_m_se <- fungicide %>% select(Treatment, Severity) %>% group_by(Treatment) %>% summarise(mean_sev = mean(Severity), se_sev = std.error(Severity)) # Now, we can create a plot with mean and standard error m_se_plot <- ggplot(data = fungicide_m_se, aes(x = Treatment, y = mean_sev)) m_se_plot # ### Bar graph with standard errors (m_se_plot_bar <- m_se_plot + geom_col(aes(fill = Treatment), width = 0.5)) (m_se_plot_bar <- m_se_plot_bar + geom_errorbar(aes(ymin = mean_sev - se_sev, ymax = mean_sev + se_sev), width = 0.2)) # ### Point plot with standard errors (m_se_plot_point <- m_se_plot + geom_point(aes(color = Treatment), size = 3)) (m_se_plot_point <- m_se_plot_point + geom_errorbar(aes(ymin = mean_sev - se_sev, ymax = mean_sev + se_sev, color = Treatment), width = 0.1)) # You can follow the same steps that we followed for `yield.plot` to transform these # plots to publication quality.
759bed9279aac4bf56c6ec956de3b4a55d89814f
ffdea92d4315e4363dd4ae673a1a6adf82a761b5
/data/genthat_extracted_code/rwt/examples/denoise.Rd.R
88840158ef08f1d297d7a9ca47f5c0b3205d2ecd
[]
no_license
surayaaramli/typeRrh
d257ac8905c49123f4ccd4e377ee3dfc84d1636c
66e6996f31961bc8b9aafe1a6a6098327b66bf71
refs/heads/master
2023-05-05T04:05:31.617869
2019-04-25T22:10:06
2019-04-25T22:10:06
null
0
0
null
null
null
null
UTF-8
R
false
false
544
r
denoise.Rd.R
library(rwt) ### Name: denoise ### Title: Wavelet-based Denoising ### Aliases: denoise denoise.dwt denoise.udwt DWT.TRANSFORM.TYPE ### UDWT.TRANSFORM.TYPE MAD.VARIANCE.ESTIMATOR STD.VARIANCE.ESTIMATOR ### SOFT.THRESHOLD.TYPE HARD.THRESHOLD.TYPE MAX.DECOMPOSITION ### CALC.THRESHOLD.TO.USE DEFAULT.DWT.THRESHOLD.MULTIPLIER ### DEFAULT.UDWT.THRESHOLD.MULTIPLIER default.dwt.option ### default.udwt.option ### Keywords: interface ### ** Examples sig <- makesig(SIGNAL.DOPPLER) h <- daubcqf(6) ret.dwt <- denoise.dwt(sig$x, h$h.0)
ffdbc57185f3a51120d2e8e7461fe20ba3a920f9
865e787ca5d51f3d4b3c5b8af1af3976baa2bc95
/man/eval_M_Z.Rd
5fd896c245f8669107ff5c3918ca13639ce0937c
[]
no_license
wgmueller1/mmppr
f43066e12caf90664f8c34f2a8035b34a9a3f082
63f971e550a4a232638b9b1470bf3ebc6e78a266
refs/heads/master
2021-01-15T17:20:28.159453
2014-06-27T12:39:54
2014-06-27T12:39:54
null
0
0
null
null
null
null
UTF-8
R
false
false
261
rd
eval_M_Z.Rd
% Generated by roxygen2 (4.0.1.99): do not edit by hand \name{eval_M_Z} \alias{eval_M_Z} \title{eval_M_Z} \usage{ eval_M_Z(M, Z, prior) } \arguments{ \item{M}{} \item{Z}{} \item{prior}{} } \description{ This function evaluates p(M|Z) } \examples{ eval_M_Z }
d45f20e3d7c5a088dee4576d9511332a6068c954
cea373fba99a36d39f64b9de0a748e0b8bda8a37
/05_function/venn_intersects_upgrade.R
ee17baff925d49f676764e6dec5aabe514473914
[]
no_license
TheJacksonLaboratory/wild_AD_mic_scRNA
6f949456cf42e297be9970bc03e6f169ba562be5
fb9cb603ba1e05af4f518945ca714508dc8181cb
refs/heads/master
2023-03-15T13:59:23.071302
2021-03-03T02:14:48
2021-03-03T02:14:48
314,021,339
1
2
null
null
null
null
UTF-8
R
false
false
1,158
r
venn_intersects_upgrade.R
## generate intersection table compatible with Vennerable library library(Vennerable) library(tidyverse) venn_intersects_upgrade <- function(x_list){ tmp <- Venn(x_list) intersect_name <- tmp@IndicatorWeight %>% rownames() Weight <- tmp@IndicatorWeight %>% as_tibble() names(Weight) <- str_remove(names(Weight), "\\.") Weight$intersect_name <- intersect_name Set_name_weight <- Weight %>% filter(Weight!=0) %>% select(Weight, intersect_name) # extract the the intersection terms with "non-zero" elements Sets <- tmp@IntersectionSets Gene_ID <- character() for (i in seq_along(Sets)){ for(j in seq_along(Sets[[i]])){ Gene_ID <- c(Gene_ID, Sets[[i]][j]) } } intersect_label <- map2(Set_name_weight$intersect_name, Set_name_weight$Weight, rep) intersect_label_vecter <- character() for (i in seq_along(intersect_label)){ for(j in seq_along(intersect_label[[i]])){ intersect_label_vecter <- c(intersect_label_vecter, intersect_label[[i]][j]) } } gene_intersect <- data.frame(Gene_ID, intersect_label_vecter) colnames(gene_intersect) <- c("Orig_Symbol", "Intersections") return(gene_intersect) }
ea5da434b25d6375e2ed0214167cefd95dc98d04
84af2a5d4cc82c218c6ea63ef6a3f8fdc299c1ac
/R/SETAR_model.R
15e9c1f61cff2ac0c034504d525410a09a0e47c6
[]
no_license
cran/NonlinearTSA
c173ef17fad7165d3f13ad3034ae3b6de4520f4b
8fa55067e97fa0d4ceafe62999b03169c6dca109
refs/heads/master
2023-02-25T02:38:07.707991
2021-01-23T15:30:02
2021-01-23T15:30:02
270,956,992
1
1
null
null
null
null
UTF-8
R
false
false
1,870
r
SETAR_model.R
#' SETAR model estimation #' #' This function allows you to estimate SETAR model #' #' @param y series name, #' @param delay_order Delay order, #' @param lag_length lag length #' @param trim_value trimmed value, .15, .10, .5 #' @return "Model" Estimated model #' @return "threshold" the value of threshold #' @keywords nonlinear model estimation #' @references #' #' Burak Guris, R Uygulamalı Dogrusal Olmayan Zaman Serileri Analizi, DER Yayinevi, 2020. #' @export #' @importFrom stats embed lm resid #' #' @examples #' #'\donttest{ #'x <- rnorm(100) #'SETAR_model(x, 1, 12, .15) #' #' #'data(IBM) #'SETAR_model(IBM, 1, 12, .05) #'} #' #' SETAR_model <- function(y, delay_order, lag_length, trim_value){ mat = embed(y,(lag_length+1)) thres = sort(y) gy = mat[,2] sayi = round(length(thres)*trim_value) trim_thres = thres[(sayi+1):(length(thres)-sayi)] sabit = rep(1,dim(mat)[1]) den = matrix(0 ,nrow = dim(mat)[1], ncol = length(trim_thres)) for(i in 1:length(trim_thres)){ for(ii in 1:dim(mat)[1]){ if(gy[ii] < trim_thres[i]){ den[ii,i] = 1 } else { den[ii,i] = 0 } } } var_SSR = NULL for(iii in 1:ncol(den)){ model <- lm(mat[,1]~I(sabit*den[,iii])+I(mat[,2:ncol(mat)]*den[,iii])+I(sabit*(1-den[,iii]))+I(mat[,2:ncol(mat)]*(1-den[,iii]))-1) SSR = sum((resid(model))^2) var_SSR[iii] = SSR/length(gy) } son = which.min(var_SSR) threshold = trim_thres[son] Constant1 = (sabit*den[,son]) Regime1_ = (mat[,2:ncol(mat)]*den[,son]) Constant2 = (sabit*(1-den[,son])) Regime2_ = (mat[,2:ncol(mat)]*(1-den[,son])) model_son = lm(mat[,1]~Constant1+Regime1_+Constant2+Regime2_-1) kontrol = sum((resid(model_son))^2)/length(gy) my_list <- list("model"=summary(model_son),"threshold"=threshold) return(my_list) }
e0d65c7d7c45679eed779fb0ddd58503fd972a87
bad08314942d890670cb8186827e93387f8242cb
/R/oneWayAnova.R
72b55f3e8a8e081d1f9d8ee2b04e685c9c3c4d9b
[]
no_license
stamats/MKmisc
faaa5a4bc04d015143fcd2d468bc11aa12ef5633
e738e1f1b18899af42c1149335c6ee063e9de80c
refs/heads/master
2022-11-25T06:06:56.692986
2022-11-19T15:35:13
2022-11-19T15:35:13
33,780,395
10
2
null
2015-06-29T18:02:53
2015-04-11T15:13:48
R
UTF-8
R
false
false
321
r
oneWayAnova.R
## Modification of function Anova in package genefilter oneWayAnova <- function(cov, na.rm = TRUE, var.equal = FALSE){ function(x) { if (na.rm) { drop <- is.na(x) x <- x[!drop] cov <- cov[!drop] } oneway.test(x ~ cov, var.equal = var.equal)$p.value } }
1cbbd4a1513bd7180a49830e2d7d9d5433e8a19e
c1f1d1615f7f3eb62382fcdf38c6eb96c6ec0040
/LuasStrike/LuasStrike.R
3854720a10d9f4f71bea0e0e99871f19383be077
[]
no_license
mryap/SentimentAnalysis
fc9c333ad9401fca5017211d86b3f16ffd998c09
b0cb3cbd39dcbc9b71cd286ec00b175059ca0237
refs/heads/main
2023-01-23T15:56:38.557807
2020-12-07T14:35:23
2020-12-07T14:35:23
319,342,929
0
0
null
null
null
null
UTF-8
R
false
false
893
r
LuasStrike.R
install.packages("base64enc") library(httr) library(twitteR) library(base64enc) consumer_key <- 'kDbigJNR6f9BMu6o2Sy95IJp2' consumer_secret <- 'oXB0795wCX0KwaMC8kT3DgUk45Zv94Bu2DMFVqak0dYUTordEk' access_token <- '9465632-warwshtU6ax4XsrHYPc5llNWMe17xqAczznh6AH0NN' access_secret <- 'XULeCzfftRUqUUrzj3Hla2Uv29YU7eojRBE27akvLUnGZ' setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret) save(setup_twitter_oauth, file='twitter_authentication.Rdata') load('twitter_authentication.Rdata') #Once you launched the code first time, you can start from this line in the future (libraries should be connected) tweets<-searchTwitter("#LuasStrike", n=10000,lang='en') dataTweet<-plyr::ldply(tweets,as.data.frame) #To count how many missing values are in the replyToSN column of this data frame (i.e. dataTweet) sum(is.na(dataTweet$replyToSN))
75ed534f5eda2a2411fe48ab1f4d44c8908f6a67
1888f6a3e9892150524e392e9288456c4564ef62
/cachematrix.R
33a35d813f4e2dd9ec736d92847800fd692061a6
[]
no_license
PKathib/ProgrammingAssignment2
1e07012bcf0628746309835a1d59f7d4df9ce3cb
717b70cf749a1682c52814259109a6d6847d985a
refs/heads/master
2021-01-18T10:15:01.807760
2016-02-20T04:22:27
2016-02-20T04:22:27
52,133,547
0
0
null
2016-02-20T03:02:41
2016-02-20T03:02:39
null
UTF-8
R
false
false
1,813
r
cachematrix.R
## We are creating two functions in R. ## 1. makeCacheMatrix, 2. cacheSolve ## Both these functions are used to get the inverse of the matrix and then to cache them for future use ## as matrix inversion is an expensive process. ## # 1. Set the value of the passed matrix ## # 2. Get the value of the passed matrix ## # 3. Set the inverse of the passed matrix ## # 4. Get the inverse of the passed matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setinverse <- function(inverse) inv <<- inverse getinverse <- function() inv list(set=set, get=get, setinverse=setinverse, getinverse=getinverse) } ## Write a short comment describing this function cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x' inv <- x$getinverse() if(!is.null(inv)) { message("reading from cache...") return(inv) } data <- x$get() inv <- solve(data) x$setinverse(inv) inv } # inverse matrix results verified from http://www.purplemath.com/modules/mtrxinvr.htm # s <- matrix(c(1,3,3,1,4,3,1,3,4), nrow=3, ncol=3,byrow = TRUE) # s # m = makeCacheMatrix(s) # m$get() # # cacheSolve(m) ## Test Data # > s <- matrix(c(1,3,3,1,4,3,1,3,4), nrow=3, ncol=3,byrow = TRUE) # > s # [,1] [,2] [,3] # [1,] 1 3 3 # [2,] 1 4 3 # [3,] 1 3 4 # > m = makeCacheMatrix(s) # > m$get() # [,1] [,2] [,3] # [1,] 1 3 3 # [2,] 1 4 3 # [3,] 1 3 4 # > cacheSolve(m) # [,1] [,2] [,3] # [1,] 7 -3 -3 # [2,] -1 1 0 # [3,] -1 0 1 # > ## Test Data
f86bfd05d7c53d64912a0eec5c121e8623f11dc4
860efbde82499c1cc307e36b57f6af41fe37225e
/man/analyze.gain.Rd
9c3f0ac1bfe5604822bb4bdf71c71aeff6ac85d3
[]
no_license
cran/gainML
92a2ffb79ca5026e9e509edcdc1cc43b151ddb92
f85e402726004d6f9a31f812cc0a66bf83eabffc
refs/heads/master
2020-12-21T23:34:19.542072
2019-06-28T12:40:07
2019-06-28T12:40:07
236,601,381
0
0
null
null
null
null
UTF-8
R
false
true
7,466
rd
analyze.gain.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/analysis_total.R \name{analyze.gain} \alias{analyze.gain} \title{Analyze Potential Gain from Passive Device Installation on WTGs by Using a Machine Learning-Based Tool} \usage{ analyze.gain(df1, df2, df3, p1.beg, p1.end, p2.beg, p2.end, ratedPW, AEP, pw.freq, freq.id = 3, time.format = "\%Y-\%m-\%d \%H:\%M:\%S", k.fold = 5, col.time = 1, col.turb = 2, bootstrap = NULL, free.sec = NULL, neg.power = FALSE) } \arguments{ \item{df1}{A dataframe for reference turbine data. This dataframe must include five columns: timestamp, turbine id, wind direction, power output, and air density.} \item{df2}{A dataframe for baseline control turbine data. This dataframe must include four columns: timestamp, turbine id, wind speed, and power output.} \item{df3}{A dataframe for neutral control turbine data. This dataframe must include four columns and have the same structure with \code{df2}.} \item{p1.beg}{A string specifying the beginning date of period 1. By default, the value needs to be specified in \samp{\%Y-\%m-\%d} format, for example, \code{'2014-10-24'}. A user can use a different format as long as it is consistent with the format defined in \code{time.format} below.} \item{p1.end}{A string specifying the end date of period 1. For example, if the value is \code{'2015-10-24'}, data observed until \code{'2015-10-23 23:50:00'} would be considered for period 1.} \item{p2.beg}{A string specifying the beginning date of period 2.} \item{p2.end}{A string specifying the end date of period 2. Defined similarly as \code{p1.end}.} \item{ratedPW}{A kW value that describes the (common) rated power of the selected turbines (REF and CTR-b).} \item{AEP}{A kWh value describing the annual energy production from a single turbine.} \item{pw.freq}{A matrix or a dataframe that includes power output bins and corresponding frequency in terms of the accumulated hours during an annual period.} \item{freq.id}{An integer indicating the column number of \code{pw.freq} that describes the frequency of power bins in terms of the accumulated hours during an annual period. By default, this parameter is set to 3.} \item{time.format}{A string describing the format of time stamps used in the data to be analyzed. The default value is \code{'\%Y-\%m-\%d \%H:\%M:\%S'}.} \item{k.fold}{An integer defining the number of data folds for the period 1 analysis and prediction. In the period 1 analysis, \eqn{k}-fold cross validation (CV) will be applied to choose the optimal set of covariates that results in the least prediction error. The value of \code{k.fold} corresponds to the \eqn{k} of the \eqn{k}-fold CV. The default value is 5.} \item{col.time}{An integer specifying the column number of time stamps in wind turbine datasets. The default value is 1.} \item{col.turb}{An integer specifying the column number of turbines' id in wind turbine datasets. The default value is 2.} \item{bootstrap}{An integer indicating the current replication (run) number of bootstrap. If set to \code{NULL}, bootstrap is not applied. The default is \code{NULL}. A user is not recommended to set this value and directly run bootstrap; instead, use \code{\link{bootstrap.gain}} to run bootstrap.} \item{free.sec}{A list of vectors defining free sectors. Each vector in the list has two scalars: one for starting direction and another for ending direction, ordered clockwise. For example, a vector of \code{c(310 , 50)} is a valid component of the list. By default, this is set to \code{NULL}.} \item{neg.power}{Either \code{TRUE} or \code{FALSE}, indicating whether or not to use data points with a negative power output, respectively, in the analysis. The default value is \code{FALSE}, i.e., negative power output data will be eliminated.} } \value{ The function returns a list of several objects (lists) that includes all the analysis results from all steps. \describe{ \item{\code{data}}{A list of arranged datasets including period 1 and period 2 data as well as \eqn{k}-folded training and test datasets generated from the period 1 data. See also \code{\link{arrange.data}}.} \item{\code{p1.res}}{A list containing period 1 analysis results. This includes the optimal set of predictor variables, period 1 prediction for the REF turbine and CTR-b turbine, the corresponding error measures such as RMSE and BIAS, and BIAS curves for both REF and CTR-b turbine models; see \code{\link{analyze.p1}} for the details.} \item{\code{p2.res}}{A list containing period 2 analysis results. This includes period 2 prediction for the REF turbine and CTR-b turbine. See also \code{\link{analyze.p2}}.} \item{\code{gain.res}}{A list containing gain quantification results. This includes effect curve, offset curve, and gain curve as well as the measures of effect (gain without offset), offset, and (the final) gain; see \code{\link{quantify.gain}} for the details.} } } \description{ Implements the gain analysis as a whole; this includes data arrangement, period 1 analysis, period 2 analysis, and gain quantification. } \details{ Builds a machine learning model for a REF turbine (device installed) and a baseline CTR turbine (CTR-b; without device installation and preferably closest to the REF turbine) by using data measurements from a neutral CTR turbine (CTR-n; without device installation). Gain is quantified by evaluating predictions from the machine learning models and their differences during two different time periods, namely, period 1 (without device installation on the REF turbine) and period 2 (device installed on the REF turbine). } \note{ \itemize{ \item This function will execute four other functions in sequence, namely, \code{\link{arrange.data}}, \code{\link{analyze.p1}}, \code{\link{analyze.p2}}, \code{\link{quantify.gain}}. \item A user can alternatively run the four funtions by calling them individually in sequence.} } \examples{ df.ref <- with(wtg, data.frame(time = time, turb.id = 1, wind.dir = D, power = y, air.dens = rho)) df.ctrb <- with(wtg, data.frame(time = time, turb.id = 2, wind.spd = V, power = y)) df.ctrn <- df.ctrb df.ctrn$turb.id <- 3 # For Full Sector Analysis res <- analyze.gain(df.ref, df.ctrb, df.ctrn, p1.beg = '2014-10-24', p1.end = '2014-10-25', p2.beg = '2014-10-25', p2.end = '2014-10-26', ratedPW = 1000, AEP = 300000, pw.freq = pw.freq, k.fold = 2) # In practice, one may use annual data for each of period 1 and period 2 analysis. # One may typically use k.fold = 5 or 10. # For Free Sector Analysis free.sec <- list(c(310, 50), c(150, 260)) res <- analyze.gain(df.ref, df.ctrb, df.ctrn, p1.beg = '2014-10-24', p1.end = '2014-10-25', p2.beg = '2014-10-25', p2.end = '2014-10-26', ratedPW = 1000, AEP = 300000, pw.freq = pw.freq, k.fold = 2, free.sec = free.sec) gain.res <- res$gain.res gain.res$gain #This will provide the final gain value. } \references{ H. Hwangbo, Y. Ding, and D. Cabezon, 'Machine Learning Based Analysis and Quantification of Potential Power Gain from Passive Device Installation,' arXiv:1906.05776 [stat.AP], Jun. 2019. \url{https://arxiv.org/abs/1906.05776}. } \seealso{ \code{\link{arrange.data}}, \code{\link{analyze.p1}}, \code{\link{analyze.p2}}, \code{\link{quantify.gain}} }
f62778905382e394986d0aa870672235479ce5ca
36bf489230433e0e8ae7b88cf6a9f9b0cf299f15
/plot3.R
abe8a8c2470c3b7a8a58314a54142b4e60cca3e4
[]
no_license
samermounir/ExData_Plotting1
27fcc7c3ee881dbebad56e5483f9f4de207c27d3
fad4e75e97e34b4df78dfdcd7f980524c1adede8
refs/heads/master
2021-01-18T00:13:59.859161
2014-12-05T15:23:05
2014-12-05T15:23:05
null
0
0
null
null
null
null
UTF-8
R
false
false
1,549
r
plot3.R
############################################################ ##You have to extract the data into your working directory## ############################################################ ## Step 0 using the lubridate library library(lubridate) ## Step 1 read the data into the elecdata including doing all the adjustments ## like reading the header , seperator ";", removing the rows containing n"?" elecdata<-read.table("household_power_consumption.txt",sep=";",header=TRUE,na.strings="?",colClasses = c(rep("character", 2), rep("numeric", 7))) ## Step 2 creating a new data set for first & Second of Feb. 2007 only mydata <- elecdata[elecdata$Date %in% c("1/2/2007","2/2/2007"),] ## Step 3 Creating the plot and putting the submetering data in different colos using the points command par(bg=NA) ## set the background to transparent plot(dmy(mydata$Date)+ hms(mydata$Time),mydata$Sub_metering_1 ,type="n",xlab="",ylab ="Energy sub metering",cex.lab=1) points (dmy(mydata$Date)+ hms(mydata$Time),mydata$Sub_metering_1,type="l") points(dmy(mydata$Date)+ hms(mydata$Time),mydata$Sub_metering_2,col="red",type="l") points(dmy(mydata$Date)+ hms(mydata$Time),mydata$Sub_metering_3,col="blue",type="l") ## Step 4 Creating the legend legend("topright",c("Sub_metering_1","Sub_metering_2","Sub_metering_3"),lty =c(1,1),col=c("black","red","blue"),text.font=2,cex=0.8,pt.cex=1) ## Step 5 Copy my plot to a PNG file 480 * 480 dev.copy(png, file = "plot3.png",width=480,height=480) ## Copy my plot to a PNG file dev.off() ## Don't forget to close the PNG device!
26f6d8cc7130dd909e5fb4ccf6489c38b76bd59e
d8e6354d5fcc6f3f1202fccccaf816f11d6a0518
/R Files/ps2.r
a08ca5c4d635a1bb22403c123ad9f9b9b550c2b2
[]
no_license
nishidhvlad/Repository
4f7ff19c7c4cb92f53fc6d3f4df79dc2e82a7a04
b10e664b6d9912bb49f5d20d0ab16562f76a90de
refs/heads/master
2020-03-26T04:29:44.084478
2018-08-12T22:36:21
2018-08-12T22:36:21
144,506,506
0
0
null
null
null
null
UTF-8
R
false
false
7,510
r
ps2.r
################################ # QUESTION 1 ################################ rm(list=ls(all=TRUE)) #remove all variables library(data.table) context1 <- fread("attend.csv") #read data file attendrt <- context1$attend/32 hwrt <- context1$hw/8 summary(context1) model1 <- lm(termGPA~priGPA+ACT+attendrt+hwrt, data=context1) summary(model1) # Coefficients: # Estimate Std. Error t value Pr(>|t|) # (Intercept) -1.286983 0.164169 -7.839 1.77e-14 *** # priGPA 0.548962 0.042418 12.942 < 2e-16 *** # ACT 0.036099 0.006051 5.966 3.92e-09 *** # attendrt 0.155436 6.770 2.81e-11 *** # hwrt 0.913031 0.116932 7.808 2.22e-14 *** #termGPA = -1.287 + 0.549*priGPA + 0.036*ACT + 1.052*attendrt + 0.913*hwrt #Interpretations:- #1. Estimated Coeffiecient for attendrt in model 1 is 1.052 #2. Estimated Coeffiecent for hwrt in model 1 is 0.913 #3. The termGPA of 2.906 for a student with a 32 ACT and a 2.2 priGPA who attended 28 lectures and turned-in 8 homework assignments #4. The termGPA of 3.407 for a student with a 20 ACT and 3.9 priGPA who attended 28 lectures and turned in 8 homework assignments. ####### to compare b1 and b2, b1*std(priGPA) > b2*std(ACT) #5. priGPA has more impact to termGPA since higher priGPA tends to higher termGPA #6. The termGPA of 2.771 for a student with a 25 ACT and a 3.0 priGPA who attends all the classes, but only finishes half the homework assignments #7. The termGPA of 2.691 for a similarly qualifieed student who turns in all the homwork assignments, but only attends half the classes #8. Attendance is of more importance to the change of termGPA as even homework rate increases termGPA do not increases to that extend. #9. Because attendrt and hwrt gives us the relative value and it is easier to compare both of them as they dont have any units, but in ACT and priGPA , different types of values are present with no common comparable parameter. ############################################################### # QUESTION 2 ############################################################### rm(list=ls(all=TRUE)) library(data.table) context2 <- fread("CEOSAL2.csv") summary(context2) lsalary <- log(context2$salary) lmktval <- log(context2$mktval) lsales <- log(context2$sales) model2 <- lm(lsalary~lmktval+profits+ceoten, data=context2) summary(model2) #Coefficients: # Estimate Std. Error t value Pr(>|t|) #(Intercept) 4.7095052 0.3954502 11.909 < 2e-16 *** # lmktval 0.2386220 0.0559166 4.267 3.25e-05 *** # profits 0.0000793 0.0001566 0.506 0.6132 #ceoten 0.0114646 0.0055816 2.054 0.0415 * model3 <- lm(lsalary~lmktval+profits+ceoten+lsales, data=context2) summary(model3) #Coefficients: # Estimate Std. Error t value Pr(>|t|) #(Intercept) 4.558e+00 3.803e-01 11.986 < 2e-16 *** # lmktval 1.018e-01 6.303e-02 1.614 0.1083 #profits 2.905e-05 1.503e-04 0.193 0.8470 #ceoten 1.168e-02 5.342e-03 2.187 0.0301 * # lsales 1.622e-01 3.948e-02 4.109 6.14e-05 *** #Interpretation: #1. Since profits consist of negative values, Log transformation can't be performed on data with '-ve' values. #2. Every 1% increase in the market value is associated with a 0.2386% increase in the salary of chief executive officers for U.S. corporations controlling profits and years as CEO of the company. #3. Every 1% increase in the market value is associated with a 0.1018% increase in the salary of chief executive officers for U.S. corporations controlling profits, years as CEO of the company and % of sales. #4. Model2 tells us that mktval is quite significant when it comes to salary whereas Model3 has a different story which says there is Omitted Variable Biasing in Model1 because Sales component is missing. From Model 2, it is clear sales is more significant to Salary as compared to mktval. #5. Coefficient on profits is particularly not of such significance in model3 that can be clearly inferred from the p-value (>0.05) for profits is very high. #6. Every 1% increase in the sales is associated with 0.1622% increase in the salary of chief executive officers for U.S. corporations controlling for profits, years as CEO of the company and % of mktval. ################################################# # Question 3 ################################################ rm(list=ls(all=TRUE)) library(data.table) context3 <- fread("hprice1.csv") summary(context3) llotsize <- log(context3$lotsize) lsqrft <- log(context3$sqrft) model4 <- lm(price~bdrms+llotsize+lsqrft+colonial, data=context3) summary(model4) #Coefficients: # Estimate Std. Error t value Pr(>|t|) #(Intercept) -2030.455 210.967 -9.625 3.68e-15 *** # bdrms 18.572 9.308 1.995 0.0493 * # llotsize 61.446 12.372 4.966 3.60e-06 *** # lsqrft 225.508 30.072 7.499 6.41e-11 *** # colonial 4.134 14.509 0.285 0.7764 lprice <- log(context3$price) model5 <- lm(lprice~bdrms+llotsize+lsqrft+colonial, data=context3) summary(model5) #Coefficients: #Estimate Std. Error t value Pr(>|t|) #(Intercept) -1.34959 0.65104 -2.073 0.0413 * # bdrms 0.02683 0.02872 0.934 0.3530 #llotsize 0.16782 0.03818 4.395 3.25e-05 *** # lsqrft 0.70719 0.09280 7.620 3.69e-11 *** # colonial 0.05380 0.04477 1.202 0.2330 #Interpretation #1. Every 1% increase in the lotsize is associated with a $614.66 increase in the price of the house controlling No. of bedrooms,size of the house and colonial style. #2. Every 1% increase in the lotsize is associated with a 0.1678% increase in the price of the house controlling for No. of bedrooms,size of the house and colonial style. #3. The price of the house increases by $4,134 for every colonial house #4. R-squared value basically suggests that Model4 is a better fit for the given data set. #5. As per model4 if we increase 1 bedroom master suite then that will eventually increase the price of house by $18572 and increase in 10% of sqft will increase the price of house by $22550. Total price will increase to approximately $342k from $300k. $42k is greater than my valued enjoyment rate of $20k so model 4 is appropriate model for pursuing the expansion #################################################### # Question 4 ################################################### rm(list=ls(all=TRUE)) context4 <- fread("JTRAIN2.csv") summary(context4) model6 <- lm(re78~re75+train+educ+black, data = context4) summary(model6) #Coefficients: # Estimate Std. Error t value Pr(>|t|) #(Intercept) 1.97686 1.89028 1.046 0.2962 #re75 0.14697 0.09811 1.498 0.1349 #train 1.68422 0.62700 2.686 0.0075 ** # educ 0.41026 0.17267 2.376 0.0179 * # black -2.11277 0.82941 -2.547 0.0112 * #Interpretation #1. Every $1000 increase in re75(Real earnings in 1975) is associated with a $146.97 increase in re78 controlling job training, years of education and black #2. For every trained low income man, there is a $1684.22 increase in the Real earnings in 1978 controlling re75(Real earnings in 1975), years of education and black. It is significat at 1% #3. For every black low income man, there is a $2112.28 decrease in the Real earnings in 1978 controlling re75(Real earnings in 1975), years of education, and job training
95d53883542d5fda33b19b8597cd71444dcc106c
93aed4eda5fe4e23d8f0f042b1180449eac9517c
/RakregiszterScraper.R
41c8294647faa0a26a8bdd84492496cb51ab9d23
[]
no_license
tamas-ferenci/RakregiszterVizualizator
543467171eae1456247608a8926f93dfc9304595
1e0085f80f56cbb3940d9704c549f5bcedfa704d
refs/heads/master
2021-10-11T16:05:16.592672
2021-09-28T11:50:36
2021-09-28T11:50:36
146,289,139
0
0
null
null
null
null
UTF-8
R
false
false
4,442
r
RakregiszterScraper.R
library(data.table) ftfy <- reticulate::import("ftfy") # https://github.com/rspeer/python-ftfy years <- rvest::html_attr(rvest::html_elements(rvest::read_html("http://stat.nrr.hu/"), xpath = "//select[@id='edit-eve']/option"), "value")[-1] counties <- rvest::html_text(rvest::html_elements(rvest::read_html("http://stat.nrr.hu/"), xpath = "//select[@id='edit-megye']/option"), "value")[-1] counties <- data.frame(do.call(rbind, strsplit(counties, " - "))) colnames(counties) <- c("CountyNo", "County") counties$CountyNo <- as.numeric(counties$CountyNo) counties$County[counties$County=="Györ-Moson-Sopron megye"] <- "Győr-Moson-Sopron megye" ICDs <- rvest::html_text(rvest::html_elements(rvest::read_html("http://stat.nrr.hu/"), xpath = "//select[@id='edit-diagkod']/option"), "value")[-1] ICDs <- data.table(ICDCode = substring(ICDs, 1, 3), ICDName = substring(ICDs, 7, 41)) saveRDS(ICDs, file = "ICDs.rds") tab <- rbindlist(lapply(years, function(year) { print(year) res <- httr::POST("http://stat.nrr.hu/", body = list("diagkod[]" = "000", "eve[]" = year, "sex[]" = "0", "megye[]" = "00", "megyechk" = "1", "op" = "Szűrés", "form_id" = "nrr_stat")) res <- httr::content(res) ids <- rvest::html_text(rvest::html_nodes(res, xpath = "//div[@id='dialog']/node()[not(self::div)]")) ids <- ids[grepl("Neme", ids)] tab <- rvest::html_table(res) tab <- tab[sapply(tab, ncol)==20] for(i in 1:length(tab)) { names(tab[[i]]) <- sapply(names(tab[[i]]), ftfy$fix_text) tab[[i]]$Diagkód <- sapply(iconv(tab[[i]]$Diagkód, "utf-8", "latin1", sub = ""), ftfy$fix_text) } tab <- rbindlist(lapply(1:length(tab), function(i) data.table(tab[[i]], id = ids[i]))) tab <- tab[Diagkód!="Összesen", !"Összesen"] tab$Sex <- as.numeric(substr(tab$id, 8, 8)) tab$CountyNo <- substr(tab$id, 19, 20) tab <- tab[!CountyNo%in%c("", "00")] tab$CountyNo <- as.numeric(tab$CountyNo) tab$Year <- year tab$ICDCode <- sapply(strsplit(tab$Diagkód, "-"), `[`, 1) tab <- merge(CJ(ICDCode = ICDs$ICDCode, Sex = 1:2, CountyNo = 1:20, Year = year), tab, all.x = TRUE) tab[is.na(Diagkód)][, 6:23] <- 0 tab[, !c("Diagkód", "id")] })) colnames(tab)[grepl("-", colnames(tab))] <- paste0("Age", seq(0, 85, 5)) tab$Year <- as.numeric(tab$Year) tab$Sex <- ifelse(tab$Sex==1, "Férfi", "Nő") tab <- merge(tab, counties) tab <- tab[, c("ICDCode", paste0("Age", seq(0, 85, 5)), "Year", "County", "Sex")] write.csv2(tab, "RawDataWide.csv", row.names = FALSE) tab <- melt(tab, id.vars = c("ICDCode", "Year", "County", "Sex"), variable.name = "Age", value.name = "N") tab$Age <- as.numeric(substring(tab$Age, 4)) write.csv2(tab, gzfile("RawDataLong.csv.gz"), row.names = FALSE) PopPyramid <- rbind( fread("Nepesseg_OtevesKor_Nemenkent_Megyenkent_1990_2016.csv", dec = ",", skip = 6, header = TRUE, check.names = TRUE), fread("Nepesseg_OtevesKor_Nemenkent_Megyenkent_2017_2019.csv", dec = ",", skip = 6, header = TRUE, check.names = TRUE) )[, -7] PopPyramid$Időszak[PopPyramid$Időszak==""] <- NA PopPyramid$Nem[PopPyramid$Nem==""] <- NA PopPyramid$Korév[PopPyramid$Korév==""] <- NA PopPyramid <- tidyr::fill(PopPyramid, Időszak, Nem, Korév, Terület) PopPyramid$Időszak <- as.numeric(substring(PopPyramid$Időszak, 1, 4)) PopPyramid$Korév <- as.numeric(substring(PopPyramid$Korév, 1, 2)) names(PopPyramid) <- c("Year", "Sex", "Age", "County", "PopJan1", "PopMidYear") write.csv2(PopPyramid, "PopPyramid.csv", row.names = FALSE) saveRDS(PopPyramid, "Nepesseg_OtevesKor_Nemenkent_Megyenkent_1990_2019.rds") tab <- merge(tab, PopPyramid[, .(Year, Sex, Age, County, Population = PopMidYear)], by = c("County", "Sex", "Age", "Year")) write.csv2(tab, gzfile("RawDataLongWPop.csv.gz"), row.names = FALSE) saveRDS(tab, file = "RawDataLongWPop.rds") StdPops <- fread("StdPops18.csv") StdPops <- merge(StdPops, tab[, .(sum(Population)), .(Age, Sex)][, .(Age, StdHUN = V1/sum(V1)*1e6), .(Sex)]) write.csv2(StdPops, "StdPops.csv", row.names = FALSE) saveRDS(StdPops, file = "StdPops.rds") MapHunNUTS3 <- rgdal::readOGR("OSM_kozighatarok", "admin6", encoding = "UTF8", use_iconv = TRUE, stringsAsFactors = FALSE) saveRDS(MapHunNUTS3, file = "MapHunNUTS3.rds")
ae0f1cda9c105b53bfed5381bda4bd0a10f99489
91ec04b21cd17e36a6784865aee08dc729c0a4ea
/cachematrix.R
4f6373d7292ea2218d913027d5e08b4669803b9a
[]
no_license
praneets/ProgrammingAssignment2
a1816cf217581e522439c56cb24682b78a8b3c2c
2bf6dd3af99a78887ceddf874720bb148c5cbe90
refs/heads/master
2021-01-18T06:56:08.406543
2014-05-24T10:34:39
2014-05-24T10:34:39
null
0
0
null
null
null
null
UTF-8
R
false
false
1,109
r
cachematrix.R
## Put comments here that give an overall description of what your ## functions do ## This function creates a list of functions that will work on the argument x. ## Argument x will be initiated when this function is called. The four ## functions are set, get, setinv and getinv. The cache for this function is ## the variable inv. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setinv <- function(inverse) inv <<- inverse getinv <- function() inv list( set = set, get = get, setinv = setinv, getinv = getinv) } ## This function actually calculates the inverse of the input matrix. If ## the inverse of the matrix is already available in the cache, it retrieves ## it, or else, it calculates it afresh and then returns it. cacheSolve <- function(x, ...) { inv <- x$getinv() if(!is.null(inv)) { message("getting cached data") return(inv) } data <- x$get() inv <- solve(data, ...) x$setinv(inv) inv }
e8b8aa76d9ba5ee1e5a0a0ac0de8a8177a071a79
7e3f188372012ed9635facb1a2a3b0bab71cef48
/man/check.assign.with.multiple.sol.Rd
af4ee984a5a8761afb2e72812ef58b574fd3c8aa
[]
no_license
skranz/RTutor
ae637262b72f48646b013b5c6f89bb414c43b04d
f2939b7082cc5639f4695e671d179da0283df89d
refs/heads/master
2023-07-10T03:44:55.203997
2023-06-23T05:33:07
2023-06-23T05:33:07
11,670,641
203
61
null
2020-06-17T16:11:34
2013-07-25T20:47:22
R
UTF-8
R
false
true
694
rd
check.assign.with.multiple.sol.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tests_for_ps.r \name{check.assign.with.multiple.sol} \alias{check.assign.with.multiple.sol} \title{Checks an assignment to a variable with up to 5 possibly correct solutions} \usage{ check.assign.with.multiple.sol( sol1, sol2, sol3, sol4, sol5, ..., sol.list = list() ) } \arguments{ \item{sol1}{An assignment that needs to be checked, e.g. x<-5. Similar for sol2, sol3, sol4, sol5.} } \description{ Can be called in a #< test block for a custom test. } \examples{ \donttest{ # Assume the task is that x shall be a number # below 11 and divisible by 5 check.assign.with.multiple.sol(x<-5, x<-10) } }
a26c00b2b8303340e429d29189fd12a1ab572a8d
8c353819bc833ce88ff5c1f2d27f31d40ac2b162
/data-raw/ice.R
8ad25391d5c60711f944c13ae30087f322b42cbd
[]
no_license
AustralianAntarcticDivision/SOmap
6e1e91ec59a59be6471ce1b940c9363154f949b7
0297ee8aea87015e32a2d3e4f9b009d00a549d29
refs/heads/master
2023-03-12T07:42:44.477742
2023-03-07T02:44:57
2023-03-07T02:44:57
155,124,496
24
5
null
2023-02-02T22:18:42
2018-10-28T23:06:11
R
UTF-8
R
false
false
295
r
ice.R
ice <- raadtools::readice(latest = TRUE) date <- getZ(ice) psproj <- "+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" ice <- setZ(raster::projectRaster(ice, crs = psproj), date) ice[ice < 1] <- NA usethis::use_data(ice)
694e779bee0d6b4b6aaa894421c0a2c7f09e32f3
71aedc7b7f4e70697b09b8786b835df061b2ade9
/man/creds_from_file.Rd
d333268d3d1e191fdd9c15a737a3916ecfeabb93
[]
no_license
jflournoy/scorequaltrics
e6027483aedeb16c3ff07956b803511ebed5dc78
f3114b315b96ed05d99b7950b538a3c2c11ce0ae
refs/heads/master
2022-04-28T11:10:43.565376
2022-04-21T20:30:07
2022-04-21T20:30:07
247,803,512
1
0
null
2022-04-21T20:29:57
2020-03-16T19:48:30
R
UTF-8
R
false
true
537
rd
creds_from_file.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auth.R \name{creds_from_file} \alias{creds_from_file} \title{creds_from_file} \usage{ creds_from_file(creds_yaml = "credentials.yaml") } \arguments{ \item{creds_yaml}{The .yaml file that contains the user's credentials} } \description{ Reads the API key and base URL from a file and sets up the environment variables necessary for accessing data. Uses \code{\link[qualtRics]{qualtrics_api_credentials}}, but does not save credentials to the .Renviron file. }
25e35d17b26ca4f9ae8efef448ebc185567ae0c4
2c40d0d8a09d8808acb6187cbc98b091758e3c2e
/ClassifiyTracks.R
21b037f4e657336ded0bc051acfb8d33b487d58b
[]
no_license
thorstenwagner/spie-photonics-europe-2016
f98e9b30791fac90b8e5aaa7111611cfbc3bc971
9e443d3da321265b83565785cbd1dbc4078679d3
refs/heads/master
2021-01-10T02:33:47.630061
2016-02-17T09:08:33
2016-02-17T09:08:33
51,763,237
0
0
null
null
null
null
UTF-8
R
false
false
2,760
r
ClassifiyTracks.R
#The MIT License (MIT) # #Copyright (c) 2016 Thorsten Wagner (wagner@biomedical-imaging.de) # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #copies of the Software, and to permit persons to whom the Software is #furnished to do so, subject to the following conditions # #The above copyright notice and this permission notice shall be included in all #copies or substantial portions of the Software. # #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #SOFTWARE. library("randomForest"); lvl.to.num <- function(a){ return(as.numeric(as.character(a))); } makePrediction <- function(features,model,title){ ###Elongation elong <- lvl.to.num (features$elong); ###Fractal dimension fd <- lvl.to.num (features$fd); ###Long time / short time diffusion coefficient ratio LtStRatio <- lvl.to.num (features$LtStRatio); combinedData <- data.frame(ELONG=elong,FD=fd,LTST.RATIO=LtStRatio); features.predict <- predict(model,combinedData); print(title); print(table(features.predict)) } load("randomForestModel.RData"); ########################################################## ### PREDICTION ### ########################################################## load("tracks_nta_many_free.RData"); features <- help[[2]]; makePrediction(features,features.model,"### PREDICTION OF FREE DIFFUSION 100nm POLYSTYRENE PARTICLES (NTA) ###"); load("tracks_cyto_confined.RData"); features <- help[[2]]; makePrediction(features,features.model,"### PREDICTION OF CONFINED DIFFUSION 50nm GOLD PARTICLES (DARKFIELD) ###"); load("tracks_cyto_active.RData"); features <- help[[2]]; makePrediction(features,features.model,"### PREDICTION OF ACTIVE DIFFUSION 50nm GOLD PARTICLES (DARKFIELD) ###"); load("tracks_laser_confined.RData"); features <- help[[2]]; makePrediction(features,features.model,"### PREDICTION OF CONFINED DIFFUSION 50nm GOLD PARTICLES (LASER-SCANNING) ###"); load("tracks_laser_active.RData"); features <- help[[2]]; makePrediction(features,features.model,"### PREDICTION OF ACTIVE DIFFUSION 50nm GOLD PARTICLES (LASER-SCANNING) ###");
4a2cc4760686d57dc5b0170b2758eec38d200826
05a9f722bfd91a75144ebf840f296f932b5baf20
/BrestNewlyn/correlationNewlynSubPolarGyreIndex.R
1cf96d201f55445c1de1a2fff0c09cfe36cb49ec
[]
no_license
simonholgate/R-Scripts
05118e4e92118a506eaf29bf6fa9aca4ea3f9477
89ab9ee9da1bbce10f4dc9a422259dda64748689
refs/heads/master
2020-05-17T14:48:02.345740
2012-06-21T11:19:58
2012-06-21T11:19:58
4,738,138
1
0
null
null
null
null
UTF-8
R
false
false
3,773
r
correlationNewlynSubPolarGyreIndex.R
library(fields) library(robust) source("~/Dropbox/BrestNewlyn/matrixMethods.R") load("~/Dropbox/brestNewlynData/analysis/paper/correlationACRE/brestNewlyn.tot.ps.RData") newlyn.full.p.start <- 1916 newlyn.full.p.end <- 2008 newlyn.full.p.yrs <- c(newlyn.full.p.start:newlyn.full.p.end) hatun.period <- c(which(newlyn.full.p.yrs>=1960):which(newlyn.full.p.yrs==2004)) hatun.yrs <- newlyn.full.p.yrs[hatun.period] hatun.tot.p <- newlyn.tot.p.full[hatun.period] filt.hatun.tot.p <- filter(hatun.tot.p, c(0.25, 0.5, 0.25), method="conv", sides=2) plot(hatun.yrs, -hatun.tot.p, type='l', col='red', lwd=2) lines(hatun.yrs, -filt.hatun.tot.p, col='blue', lwd=2, lty=2) grid() hakkinen.period <- c(which(newlyn.full.p.yrs==1993):which(newlyn.full.p.yrs==2001)) hakkinen.tot.p <- newlyn.tot.p.full[hakkinen.period] hakkinen <- read.table(file="hakkinenData.txt", sep=",", colClasses=c("numeric", "numeric"), col.names=c("year", "pc1")) ##x11() ##plot(hakkinen$year, hakkinen$pc1, type='l', col='blue') intsct <- intersect(which(hakkinen$year>=1993), which(hakkinen$year<=2002)) hakkinen.yrs <- 1993:2001 hakkinen.annual <- hakkinen$pc1[intsct] dim(hakkinen.annual) <- c(12,length(hakkinen.yrs)) hakkinen.annual <- colMeans(hakkinen.annual) ## Re-scaling Hakkinen data to fit Newlyn ##range(hakkinen.annual) -> -0.1181667 0.1391667 ##which(hatun.yrs==1993) -> 34 ##which(hatun.yrs==2002) -> 43 ##diff(range(-hatun.tot.p[34:43])) -> 1164.665 ##mean(-hatun.tot.p[34:43]) -> -102490.1 lines(hakkinen.yrs, hakkinen.annual/0.139/2*1164-102490, col='magenta', lwd=2) hatun <- read.table(file="hatunData.txt", sep=",", colClasses=c("numeric", "numeric"), col.names=c("year", "pc1")) ##plot(hatun$year, hatun$pc1, type='l', col='blue', lty=3) ## Re-scaling Hatun data to fit Newlyn ##range(hatun$pc1) -> -8.1 10.3 ##diff(range(-hatun.tot.p)) -> 1660.483 ##mean(-hatun.tot.p[34:43]) -> -102232.8 lines(hatun$year, hatun$pc1/10.3/2*1660-102232, col='cyan', lwd=2, lty=3) ## Normalised plot plot(hatun.yrs, (-hatun.tot.p - mean(-hatun.tot.p))/1076.7611, type='l', col='red', lwd=2, ylim=c(-1,1), ann=F) ##lines(hatun.yrs, (-filt.hatun.tot.p - mean(-filt.hatun.tot.p, na.rm=T))/764.2831, col='blue', lwd=2, lty=2) grid(lwd=2) title(main="Newlyn sea level and gyre index", ylab="Normalised sea level/gyre index", xlab="Years") lines(hakkinen.yrs, (hakkinen.annual - mean(hakkinen.annual))/0.1314722, col='magenta', lwd=2) lines(hatun$year, (hatun$pc1 - mean(hatun$pc1))/9.218182, col='cyan', lwd=2) intsct <- intersect(which(hatun$year>=1993), which(hatun$year<2002)) hakkinen.hatun <- hatun$pc1[intsct] ## Normalised plot over Hakkinen yrs plot(hakkinen.yrs, (-hakkinen.tot.p - mean(-hakkinen.tot.p))/254.2495, type='l', col='red', lwd=2, ylim=c(-1,1), ann=F) ##lines(hatun.yrs, (-filt.hatun.tot.p - mean(-filt.hatun.tot.p, na.rm=T))/764.2831, col='blue', lwd=2, lty=2) grid(lwd=2) title(main="Newlyn sea level and gyre index", ylab="Normalised sea level/gyre index", xlab="Years") lines(hakkinen.yrs, (hakkinen.annual - mean(hakkinen.annual))/0.1314722, col='magenta', lwd=2) lines(hakkinen.yrs, (hakkinen.hatun - mean(hakkinen.hatun))/9.666667, col='cyan', lwd=2) ## Normalised plot over Hakkinen yrs shown over Hatun yrs plot(hatun.yrs, (-hatun.tot.p - mean(-hakkinen.tot.p))/254.2495, type='l', col='red', lwd=2, ylim=c(-1,1), ann=F) ##lines(hatun.yrs, (-filt.hatun.tot.p - mean(-filt.hatun.tot.p, na.rm=T))/764.2831, col='blue', lwd=2, lty=2) grid(lwd=2) title(main="Newlyn sea level and gyre index", ylab="Normalised sea level/gyre index", xlab="Years") lines(hakkinen.yrs, (hakkinen.annual - mean(hakkinen.annual))/0.1314722, col='magenta', lwd=2) lines(hatun$year, (hatun$pc1 - mean(hatun$pc1))/9.666667, col='cyan', lwd=2)
5bf467df96d204dc4f41df885374134a4639c872
36881f038bac0454ac2f1adaabf472074e38fd1d
/Code/man/module.input.Rd
92f49cee6032e8782b51ad10c35cad96f645da5b
[]
no_license
PriSomeda/longleafGY
d3a3580de4d86e73ebe3f7e422d81cd906ed0f39
bffa7bbfbc5d5d476b6a5a1809df73f35968d147
refs/heads/master
2020-03-18T20:54:43.555997
2018-06-03T21:47:15
2018-06-03T21:47:15
135,246,715
0
1
null
null
null
null
UTF-8
R
false
true
4,219
rd
module.input.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/module.input.r \name{module.input} \alias{module.input} \title{Module of input tree- or stand-level data to prepare it for further simulations.} \usage{ module.input(TYPE = "PLOT", TREEDATA = NA, AREA = NA, SI = NA, HDOM0 = NA, AGE0 = NA, BA0 = NA, N0 = NA, AGEF = 50, THINNING = "FALSE", AGET = NA, BAR = NA, t = 5, d = 15, method = 2) } \arguments{ \item{TYPE}{Character for type of input data. PLOT: stand-level data information, TREE: tree-level information. Default is PLOT} \item{TREEDATA}{Data frame with tree-level information with columns: PLOTID, TREEID, DBH, HT (these should be identical names).} \item{AREA}{Numeric value of size of the inventory plot (m2). Required for TYPE='TREE'.} \item{SI}{Numeric value of Site Index (m) (Dominant Height of the plot at age 50 years).} \item{HDOM0}{Numeric value of Dominant Height (m) at initial age (or age 0).} \item{AGE0}{Numeric value of initial stand age or age 0 (years).} \item{BA0}{Numeric value of Basal Area (m2/ha) at age 0 (required for model projection).} \item{N0}{Numeric value of number of trees per hectare at age 0.} \item{AGEF}{Numeric value of final stand age (in years) of simulation. Default is 50.} \item{THINNING}{If TRUE then a thinning is implemented according to AGET and BAR. Default is FALSE.} \item{AGET}{Numeric value of stand age (in years) where thinning is planned.} \item{BAR}{Numeric value of Relative Basal Area (\%, 0-1) to be removed when thinning at age AGET.} \item{t}{Numeric value top stem diameter outside bark for merchantability limit (cm).} \item{d}{Numeric value of a DBH threshold limit for merchantable trees (cm).} \item{method}{Numeric value that identifies the method to estimate missing heights from TYPE='TREE'. 1: parametrized DBH-height model that requires DBH, BA and AGE, 2: fits a simple DBH-height model from available measurements using the equation: ln(Ht) = b0 + b1/DBH. Default method=2.} } \value{ A list containing the following: \code{- SI} Site Index (m). \code{- AGE0} Initial stand age or age 0 (years). \code{- HDOM0} Dominant Height (m) at initial age (or age 0). \code{- BA0} Basal Area (m2/ha) at age 0. \code{- N0} Number of trees per hectare at age 0. \code{- QD} Mean quadratic diameter (cm) at age 0. \code{- SDIR0} Relative stand density index (\%) at age 0. \code{- VOL_OB0} Total stand-level volume outside bark (m3/ha) at age 0. \code{- VOL_IB0} Total stand-level volume inside bark (m3/ha) at age 0. \code{- VOLm_OB0} Merchantable stand-level volume outside bark (m3/ha) at age 0. \code{- VOLm_IB0} Merchantable stand-level volume inside bark (m3/ha) at age 0. \code{- AGEF} Final stand age (in years) of simulation. \code{- THINNING} Logical that indicates if thinning is implemented according to AGET and BAR. \code{- AGET} Stand age (in years) where thinning is planned. \code{- BAR} Relative Basal Area (\%, 0-1) to be removed when thinning at age AGET. \code{- t} Top stem diameter outside bark for merchantability limit (cm). \code{- d} DBH threshold limit for merchantable trees (cm). \code{- method} Selection of the method to estimate missing heights from TYPE='TREE'. } \description{ \code{module.input} Prepares tree- or stand-level data from a single plot, checks and completes missing values, and calculates several stand-level parameters including total volume. It also reads required information for further simulations including simulation age and details of future thinning. Some information is only traspassed to other modules. Note that form tree-level data individual tree (complete or incomplete) information is required. } \examples{ # Example 1 - Input stand-level data module.input(TYPE='PLOT', BA0=17.3, SI=30, AGE0=17, N0=1200, AGEF=18) module.input(TYPE='PLOT', BA0=17.3, HDOM0=16, AGE0=17, N0=1200, AGEF=18) module.input(TYPE='PLOT', HDOM0=16, AGE0=17, N0=1200, AGEF=18) # BA obtained by prediction # Example 2 - Input with individual tree data module.input(TYPE='TREE', TREEDATA=treedata, AREA=500, AGE0=23, AGEF=32) } \author{ Priscila Someda-Dias, Salvador A. Gezan }
32fe4b0ca157ec62e7d2ef35dc729f27370af628
47f1ebbeb9e1c2f639926da5fc42cd7ae508f350
/man/makeACSdf.Rd
cdc05e1171ed01c0fcde74d2351e014bd0d6a1cc
[]
no_license
maxsibilla/spew
ee72183a2aa43a31025247134bafdc1d4a6fb6e6
375526cef25f7029e12d4148d37ac11a3560a6f7
refs/heads/master
2021-01-20T17:46:47.928742
2017-05-10T14:23:38
2017-05-10T14:23:38
null
0
0
null
null
null
null
UTF-8
R
false
true
438
rd
makeACSdf.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acs-tables.R \name{makeACSdf} \alias{makeACSdf} \title{make a more usable df from acs objects} \usage{ makeACSdf(acs_obj) } \arguments{ \item{acs_obj}{class "acs" from acs package} } \value{ a formatted df where the rows are the geographies and the columns are summary table values } \description{ make a more usable df from acs objects } \details{ to come }
1df62e558423ddffbd4cefbc028566006a147e4c
c73f0d6bf7ba22627fdbf8b2fca89ba4c8058c9a
/plot1.R
d33e2c919976256df4ab67fe80ade70e8950e040
[]
no_license
wills8/ExData_Plotting1
d457495b6e5f05d988553d518e9ea477457633f9
3c9c1baaa97ad0ffdb785e92912dfdfbfbc2e1aa
refs/heads/master
2020-06-11T10:27:19.429294
2019-06-26T15:47:32
2019-06-26T15:47:32
193,931,514
0
0
null
2019-06-26T15:28:03
2019-06-26T15:28:02
null
UTF-8
R
false
false
616
r
plot1.R
# John Hopkins Exploratory Data Analysis Project 1 # Data Source: UC Irvine Machine Learning Repository # Data Title: Electric Power Consumption # PLOT 1 # Read data in and subset data data <- read.table("household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "?") subData <- data[data$Date %in% c("1/2/2007", "2/2/2007"), ] # Create histogram and png file of Global Active Power attach(subData) png("plot1.png", height = 480, width = 480) hist(Global_active_power, xlab = "Global Active Power (kilowatts)", main = "Global Active Power", col = "Red") dev.off()
1490c84dc423983e6e8c6e4bd4c2bde9b86a8bbe
506e917f1a30059c0d61d897e099f178c85098b8
/R/perf.metric.R
3b90a0cf3026a2b7491faa5c90b8f4067a46d640
[]
no_license
pierrecattin/thesis-resources
03262e980857493a208fd11198503c6af0170091
6a321aa377a00f82a86e5f61d6170ab0ba849f52
refs/heads/master
2021-06-22T08:00:42.441620
2018-08-24T15:23:18
2018-08-24T15:23:18
136,451,744
0
0
null
null
null
null
UTF-8
R
false
false
907
r
perf.metric.R
#' Performance Metric #' #' @param freq.acc data frame containing at least columns Freqency, Accuracy and Sr if metric is "mean.sr" #' @param metric c("mean.accuracy", "mean.sr") #' #' @return Performance metric computed as a mean accros frequency levels #' @export #' perf.metric <- function(freq.acc, metric){ freq.grid <- seq(min(round(freq.acc$Frequency, 2)), max(round(freq.acc$Frequency, 2)), by=0.01) # find lines in freq.acc that have the closest freqency to each element of freq.grid find.closest <- function(freq){ return(which.min(abs(freq.acc$Frequency - freq))) } indices <- sapply(X=freq.grid, FUN=find.closest) # compute metric freq.acc.filtered <- freq.acc[indices,] value <- switch(metric, mean.accuracy = mean(freq.acc.filtered$Accuracy), mean.sr = mean(freq.acc.filtered$Sr), stop("unknown metric")) return(value) }
21278bd12ef8df0699e678ad4c3d27435c659e99
ffdea92d4315e4363dd4ae673a1a6adf82a761b5
/data/genthat_extracted_code/event/examples/hboxcox.Rd.R
b51d4897789bc4a8d534d0da4926997cbe62416b
[]
no_license
surayaaramli/typeRrh
d257ac8905c49123f4ccd4e377ee3dfc84d1636c
66e6996f31961bc8b9aafe1a6a6098327b66bf71
refs/heads/master
2023-05-05T04:05:31.617869
2019-04-25T22:10:06
2019-04-25T22:10:06
null
0
0
null
null
null
null
UTF-8
R
false
false
177
r
hboxcox.Rd.R
library(event) ### Name: hboxcox ### Title: Log Hazard Function for a Box-Cox Process ### Aliases: hboxcox ### Keywords: distribution ### ** Examples hboxcox(2, 5, 5, 2)
49da1f7aad633a382beca45ef50434fdad798ef0
452042d9a5cb876a90a9cb1f4c802d0f4b1453c7
/R/espn_draftpicks.R
960d25cf2de4af8e7be24d927068311c13f4b90c
[ "MIT" ]
permissive
jpiburn/ffscrapr
dc420370f6940275aaa8cb040c5ec001a25268b8
4e7bda862500c47d1452c84a83adce7ee1987088
refs/heads/main
2023-06-02T00:09:09.670168
2021-06-12T15:52:23
2021-06-12T15:52:23
377,976,824
1
0
NOASSERTION
2021-06-17T22:42:26
2021-06-17T22:42:26
null
UTF-8
R
false
false
677
r
espn_draftpicks.R
#### ff_draftpicks - ESPN #### #' ESPN Draft Picks #' #' @param conn the list object created by `ff_connect()` #' @param ... other arguments (currently unused) #' #' @describeIn ff_draftpicks ESPN: does not support future/draft pick trades - for draft results, please use ff_draft. #' #' @examples #' \donttest{ #' conn <- espn_connect( #' season = 2018, #' league_id = 1178049, #' espn_s2 = Sys.getenv("TAN_ESPN_S2"), #' swid = Sys.getenv("TAN_SWID") #' ) #' #' ff_draftpicks(conn) #' } #' #' @export ff_draftpicks.espn_conn <- function(conn, ...) { rlang::warn("ESPN does not support draft pick trades. For draft results, please use ff_draft()") return(NULL) }
93dee8c29ef9feca00f6d2ebac62209cbdfe320b
fc70b4b8f15ec7062ad57714ad81441015b559b8
/inst/app/server/projection/reactive.R
f1e0211f94a765b97451476ebff7c15d08b27376
[]
no_license
jackolney/CascadeDashboard
02aa85dc78e6ab916ba6e01328b45f483d81b0c0
25e29abd233ba365501900c800f81ae0beadc0c6
refs/heads/master
2020-07-07T05:58:55.039907
2017-04-04T07:58:23
2017-04-04T07:58:26
66,279,770
0
0
null
null
null
null
UTF-8
R
false
false
264
r
reactive.R
plotOptimCostImpact.ranges <- reactiveValues(x = NULL, y = NULL) plotOpt_909090.ranges <- reactiveValues(x = NULL, y = NULL) plotOpt_DALYs.ranges <- reactiveValues(x = NULL, y = NULL) plotOpt_DALYs_909090.ranges <- reactiveValues(x = NULL, y = NULL)
9999cb982cd61e7077d24bd65b833c1a2cfe5041
fc96da2f9cac0702e0caa7b40ca9a732ad798bcb
/scripts/archive/sfa_gwis_gwastools/sfa_gwis_gwastools_fhs.R
61f1e9e96448d3906a4dc5fc305be56b06c452b6
[]
no_license
echoheqian/whi-diet-response
d452df48fd1c04b9c5eb81be8255727edeeb35ec
0372f9c7fc5e48ae4b7121a504b6979ed175fa38
refs/heads/master
2023-04-24T14:25:19.611522
2021-05-05T15:54:31
2021-05-05T15:54:31
null
0
0
null
null
null
null
UTF-8
R
false
false
5,544
r
sfa_gwis_gwastools_fhs.R
silent <- lapply( c("knitr", "tidyverse", "cowplot", "doParallel", "kableExtra", "glmnet", "broom", "GWASTools", "SNPRelate"), library, character.only=T) args <- commandArgs(trailingOnly=T) dv_withEx <- args[1] rf <- args[2] main_effect_threshold <- args[3] INT <- function(x) qnorm((rank(x, na.last="keep") - 0.5) / sum(!is.na(x))) winsorize <- function(x, num_SDs=5) { bounds <- mean(x, na.rm=T) + num_SDs * c(-1, 1) * sd(x, na.rm=T) case_when(x < bounds[1] ~ bounds[1], x > bounds[2] ~ bounds[2], TRUE ~ x) } make_qqplot <- function(p_vec, plotTitle="Title") { p_vec <- p_vec[!is.na(p_vec)] qqplot(-log10(1:length(p_vec) / length(p_vec)), -log10(p_vec), pch=".", main=plotTitle, xlab="Expected (-logP)", ylab="Observed (-logP)") abline(0, 1, col="red") } gControl <- function(pVals) { # See van Iterson 2017 methods and/or Lehne 2015 code for details on genomic control for EWAS # Below is modeled after Lehne 2015 lambda <- median(qchisq(pVals, df=1, lower.tail=F), na.rm=T) / qchisq(0.5, df=1) round(lambda, 2) } bim_to_SnADF <- function(bfile) { bim_df <- read_tsv(paste0(bfile, ".bim"), col_names=c("chromosome", "rsID", "cm", "position", "A1", "A2")) %>% mutate(snpID=1:nrow(.)) %>% mutate_at(vars(chromosome, position), as.integer) SnpAnnotationDataFrame(data.frame(bim_df, stringsAsFactors=F)) } fam_to_ScADF <- function(bfile) { phenos <- read_delim("../data/processed/gen4/fhs_gwas_phenos.txt", delim=" ") fam_df <- read_delim(paste0(bfile, ".fam"), delim="\t", col_names=c("FID", "IID", "father", "mother", "sex", "pheno")) %>% left_join(phenos, by=c("IID")) %>% mutate(scanID=IID) ScanAnnotationDataFrame(data.frame(fam_df, stringsAsFactors=F)) } make_gds <- function(bfile, gds_name, summary=F) { snpgdsBED2GDS(paste0(bfile, ".bed"), paste0(bfile, ".fam"), paste0(bfile, ".bim"), gds_name, cvt.snpid="int") if (summary) snpgdsSummary(gds_name) } run_gwis_chunk <- function(genoData, outcome, covars, ivar, start, stop, robust=F) { assocRegression( genoData, outcome=outcome, model.type="linear", covar=covars, ivar=ivar, robust=robust, snpStart=start, snpEnd=stop) } covar_sets <- list( fat_carbEx=c("age", "fat", "pro", "alc", "tot_cal"), sfa_carbEx=c("age", "sfa", "mufa", "pufa", "pro", "alc", "tot_cal"), myhei=c("age", "myhei"), fat_carbEx_Bin=c("age", "fatBin", "pro", "alc", "tot_cal"), sfa_carbEx_Bin=c("age", "sfaBin", "mufa", "pufa", "pro", "alc", "tot_cal"), myhei_Bin=c("age", "myheiBin") ) interaction_vars <- list( fat_carbEx="fat", sfa_carbEx="sfa", myhei="myhei", fat_carbEx_Bin="fatBin", sfa_carbEx_Bin="sfaBin", myhei_Bin="myheiBin" ) outcome_transforms <- list( bmi="logBMI", # hsCRP="logHSCRP", tg="logTG", glu="logGLU", ldl="ldl", sbp="logSBP", delta_bmi="delta_bmi", delta_tg="delta_tg", delta_glu="delta_glu", delta_ldl="delta_ldl", delta_sbp="delta_sbp" ) outcome_basenames <- list( bmi="bmi", # hsCRP="logHSCRP", tg="tg", glu="glu", ldl="ldl", sbp="sbp", delta_bmi="bmi", delta_tg="tg", delta_glu="glu", delta_ldl="ldl", delta_sbp="sbp" ) run_gwis <- function(outcome, dv, genoset, robust=T) { covars <- covar_sets[[dv]] ivar <- interaction_vars[[dv]] outcome_transform <- outcome_transforms[[outcome]] outcome_basename <- outcome_basenames[[outcome]] bfile <- paste0("../data/processed/fhs_subsets/fhs_", outcome_basename, "_", genoset) snpAnnot <- bim_to_SnADF(bfile) scanAnnot <- fam_to_ScADF(bfile) gds_name <- paste0(bfile, ".gds") # make_gds(bfile, gds_name) gds <- GdsGenotypeReader(openfn.gds(gds_name, allow.fork=T)) genoData <- GenotypeData(gds, snpAnnot=snpAnnot, scanAnnot=scanAnnot) num_cores <- detectCores() chunks <- as.integer(cut(1:nsnp(genoData), num_cores)) cl <- makeForkCluster(num_cores) registerDoParallel(cl) res <- foreach(idx=unique(chunks), .combine=rbind, .packages="GWASTools") %dopar% run_gwis_chunk(genoData, outcome_transform, covars, ivar, min(which(chunks == idx)), max(which(chunks == idx)), robust=robust) stopCluster(cl) close(gds) res } ####### RUN GWIS ####### gwis_res <- run_gwis(rf, dv_withEx, main_effect_threshold) annotate_sumstats <- function(ss, bfile, maf_filter=0.01) { anno <- bim_to_SnADF(bfile) %>% getAnnotation() %>% select(snpID, rsID, chromosome, position, A1, A2) ss %>% filter(MAF > maf_filter) %>% select(snpID, MAF, n, GxE.Est, GxE.SE, GxE.pval) %>% inner_join(anno, by="snpID") %>% select(SNP=rsID, CHR=chromosome, BP=position, A1, A2, MAF, N=n, BETA=GxE.Est, SE=GxE.SE, P=GxE.pval) } dv <- interaction_vars[[dv_withEx]] write_tsv(gwis_res, paste0("../data/processed/gen4/fhs_res/fhs_", dv, "_", rf, "_", main_effect_threshold, ".res_raw")) res_anno <- annotate_sumstats(gwis_res, paste0("../data/processed/fhs_subsets/fhs_", rf, "_", main_effect_threshold)) write_tsv(res_anno, paste0("../data/processed/gen4/fhs_res/fhs_", dv, "_", rf, "_", main_effect_threshold, ".res"))
a4d53fa74f9bee0d737b0768e888af7e71b70c80
47f4ff8f58149e3b7301b455f47754aa041dc8f0
/server.r
fe844b38aa4c4010141b9584b5d7315d428963ed
[]
no_license
ashish9308/SentimentAnalysis
fa6fa7fb4fdab3cfa53e54fc5fec94ca0b311477
43ef62aea356ddaa3e4474933b48b9a5fe9175ce
refs/heads/master
2021-05-04T22:17:10.619013
2020-01-30T13:18:04
2020-01-30T13:18:04
120,026,675
1
0
null
null
null
null
UTF-8
R
false
false
11,132
r
server.r
#We need to have an app created at https://dev.twitter.com/apps before making any API requests to Twitter. #It's a standard method for developers to gain API access, and, more importantly, #it helps Twitter to observe and restricts developer from making high load API requests. shinyServer(function(input, output) { library("shiny") library("tm") library("wordcloud") library("twitteR") library("plyr") library("stringr") library("caret") library("RColorBrewer") library("sentiment") library("shinydashboard") #The first step toward getting any kind of token access from Twitter is to create an app on it. #You have to go to https://dev.twitter.com/ and log in with your Twitter credentials. api_key <- "O2VNH2udBjqp1tUkIAfMTmqVs" api_secret <- "DEN4MpFhgSTgzCtIag94uf4vGts6hZLzpkOtJxG823JKvVikMS" access_token <- "174395040-5ISwJ3MpJ77pkZEj4B0nHowljekXOwrqjwGIRuoJ" access_token_secret <- "R2NJHAGxuLCPlkzCzU3S0lQmng9RO8aj6Sj1sv4DfyvBm" setup_twitter_oauth(api_key,api_secret,access_token,access_token_secret) observeEvent(input$executetweet,{ #We'll start with the searchTwitter()function (discussed previously) on the TwitteR package to gather the tweets tweets= searchTwitter(input$text, n = input$n, lang= "en", since= format(input$dateRange[1]), until=format(input$dateRange[2])) #Before applying any intelligent algorithms to gather more insights from the tweets collected so far, let's first clean the corpus. tweetstext <- sapply(tweets, function(x) x$getText()) catch.error = function(x) { # let us create a missing value for test purpose y = NA # Try to catch that error (NA) we just created catch_error = tryCatch(tolower(x), error=function(e) e) # if not an error if (!inherits(catch_error, "error")) y = tolower(x) # check result if error exists, otherwise the function works fine. return(y) } cleanTweets<- function(tweet){ # Clean the tweet for sentiment analysis # remove html links, which are not required for sentiment analysis tweet = gsub("(f|ht)(tp)(s?)(://)(.*)[.|/](.*)", " ", tweet) # First we will remove retweet entities from the stored tweets (text) tweet = gsub("(RT|via)((?:\\b\\W*@\\w+)+)", " ", tweet) # Then remove all "#Hashtag" tweet = gsub("#\\w+", " ", tweet) # Then remove all "@people" tweet = gsub("@\\w+", " ", tweet) # Then remove all the punctuation tweet = gsub("[[:punct:]]", " ", tweet) # Then remove numbers, we need only text for analytics tweet = gsub("[[:digit:]]", " ", tweet) # finally, we remove unnecessary spaces (white spaces, tabs etc) tweet = gsub("[ \t]{2,}", " ", tweet) tweet = gsub("^\\s+|\\s+$", "", tweet) # if anything else, you feel, should be removed, you can. For example "slang words" etc using the above function and methods. # Next we'll convert all the word in lower case. This makes uniform pattern. tweet = catch.error(tweet) tweet } cleanTweetsAndRemoveNAs<- function(Tweets) { TweetsCleaned = sapply(Tweets, cleanTweets) # Remove the "NA" tweets from this tweet list TweetsCleaned = TweetsCleaned[!is.na(TweetsCleaned)] names(TweetsCleaned) = NULL # Remove the repetitive tweets from this tweet list TweetsCleaned = unique(TweetsCleaned) TweetsCleaned } TweetsCleaned = cleanTweetsAndRemoveNAs( tweetstext) # After getting the cleaned Twitter data, we are going to use few such R packages to assess the sentiments in the tweets. #It's worth mentioning here that not all the tweets represent sentiments. A few tweets can be just information/facts, while others #can be customer care responses. # Ideally, they should not be used to assess the customer sentiment about a particular organization. # As a first step, we'll use a Naive algorithm, which gives a score based on the number of times a positive or a negative word #occurred in the given sentence (and, in our case, in a tweet). # Here we are scanning positive-words.txt and negative-words.txt file for comparing it with our tweets in order to get sentiments. #Here are a few examples of existing positive and negative sentiment words: # Positive: Love, best, cool, great, good, and amazing # Negative: Hate, worst, sucks, awful, and nightmare pos = scan('positive-words.txt', what = 'character', comment.char = ';') neg = scan('negative-words.txt', what = 'character', comment.char = ';') pos.words = pos neg.words = neg #Now, we create a function, score.sentiment(), which computes the raw sentiment based on the simple matching algorithm: getSentimentScore = function(sentences, words.positive, words.negative, .progress='none') { require(plyr) require(stringr) scores = laply(sentences, function(sentence, words.positive, words.negative) { # Let first remove the Digit, Punctuation character and Control characters: sentence = gsub('[[:cntrl:]]', '', gsub('[[:punct:]]', '', gsub('\\d+', '', sentence))) # Then lets convert all to lower sentence case: sentence = tolower(sentence) # Now lets split each sentence by the space delimiter words = unlist(str_split(sentence, '\\s+')) # Get the boolean match of each words with the positive & negative opinion-lexicon pos.matches = !is.na(match(words, words.positive)) neg.matches = !is.na(match(words, words.negative)) # Now get the score as total positive sentiment minus the total negatives score = sum(pos.matches) - sum(neg.matches) return(score) }, words.positive, words.negative, .progress=.progress ) # Return a data frame with respective sentence and the score return(data.frame(text=sentences, score=scores)) } #Let's now move one step further. Instead of using simple matching of opinion lexicon, we'll use something called Naive Bayes #to decide on the emotion present in any tweet. We will require packages called Rstem and sentiment to assist with this. #It's important to mention here that both these packages are no longer available in CRAN, so we have to provide the repository location #as a parameter install.package() function. TweetsClassEmo = classify_emotion(TweetsCleaned, algorithm="bayes", prior=1.0) #Let's substitute NA values with the word unknown to make further analysis easier: Emotion = TweetsClassEmo[,7] Emotion[is.na(Emotion)] = "unknown" #Further, we'll use another function, classify_polarity(), provided by the sentiment package, to classify the tweets into two classes, #pos (positive sentiment) and neg (negative sentiment). The idea is to compute the log likelihood of a tweet, assuming it belongs to #either of the two classes. Once these likelihoods are calculated, a ratio of the pos-likelihood to neg-likelihood is calculated, and, #based on this ratio, the tweets are classified as belonging to a particular class. It's important to note that if this ratio turns out #to be 1, then the overall sentiment of the tweet is assumed to be "neutral". The code is as follows: TweetsClassPol = classify_polarity(TweetsCleaned, algorithm="bayes") # we will fetch polarity category best_fit for our analysis purposes, Pol = TweetsClassPol[,4] # Let us now create a data frame with the above results SentimentDataFrame = data.frame(text=TweetsCleaned, emotion=Emotion, polarity=Pol, stringsAsFactors=FALSE) # rearrange data inside the frame by sorting it SentimentDataFrame = within(SentimentDataFrame, emotion <- factor(emotion, levels=names(sort(table(emotion), decreasing=TRUE)))) #Function to plot sentiments in tweets plotSentiments1<- function (sentiment_dataframe,title) { library(ggplot2) ggplot(sentiment_dataframe, aes(x=emotion)) + geom_bar(aes(y=..count.., fill=emotion)) + scale_fill_brewer(palette="Dark2") + ggtitle(title) + theme(legend.position='right') + ylab('Number of Tweets') + xlab('Emotion Categories') } ## Similarly we will plot distribution of polarity in the tweets plotSentiments2 <- function (sentiment_dataframe,title) { library(ggplot2) ggplot(sentiment_dataframe, aes(x=polarity)) + geom_bar(aes(y=..count.., fill=polarity)) + scale_fill_brewer(palette="RdGy") + ggtitle(title) + theme(legend.position='right') + ylab('Number of Tweets') + xlab('Polarity Categories') } #Now lets make word cloud of tweets removeCustomeWords <- function (TweetsCleaned) { for(i in 1:length(TweetsCleaned)){ TweetsCleaned[i] <- tryCatch({ TweetsCleaned[i] = removeWords(TweetsCleaned[i], c(stopwords("english"), "care", "guys", "can", "dis", "didn", "guy" ,"booked", "plz")) TweetsCleaned[i] }, error=function(cond) { TweetsCleaned[i] }, warning=function(cond) { TweetsCleaned[i] }) } return(TweetsCleaned) } getWordCloud <- function (sentiment_dataframe, TweetsCleaned, Emotion) { emos = levels(factor(sentiment_dataframe$emotion)) n_emos = length(emos) emo.docs = rep("", n_emos) TweetsCleaned = removeCustomeWords(TweetsCleaned) for (i in 1:n_emos){ emo.docs[i] = paste(TweetsCleaned[Emotion == emos[i]], collapse=" ") } corpus = Corpus(VectorSource(emo.docs)) tdm = TermDocumentMatrix(corpus) tdm = as.matrix(tdm) colnames(tdm) = emos require(wordcloud) suppressWarnings(comparison.cloud(tdm, colors = brewer.pal(n_emos, "Dark2"), scale = c(3,.5), random.order = FALSE, title.size = 1.5)) } ########## Plotting actual plots output$plot1 <- renderPlot({ Result = getSentimentScore(TweetsCleaned, pos.words , neg.words) hist(Result$score, main =paste("Sentiments of tweets Vs Frequency of sentiments" ), col = "orange") output$text <- renderText({ paste("Mean Sentiment score", mean(Result$score)) }) }) output$plot2 <- renderPlot({ plotSentiments1(SentimentDataFrame, 'Sentiment Analysis of Tweets on Twitter') }) output$plot3 <- renderPlot({ plotSentiments2(SentimentDataFrame, 'Polarity Analysis of Tweets on Twitter') }) output$plot4 <- renderPlot({ getWordCloud(SentimentDataFrame, TweetsCleaned, Emotion) }) }) })
c9d6f73cafa41b2d19f208c9076e338465389131
e2ad154f7a7001a2a393141993432bd04a5889b2
/man/getQuizTemplate.Rd
7e20beb055396b4c8bedc363a816c36ae6af2e2f
[ "Apache-2.0" ]
permissive
takewiki/learnr
0dab59ce219986e97727cc03042f6f66af3e497c
0a9b4bc729d30e7a546bf840e7711c18a2930d36
refs/heads/master
2020-03-16T23:01:31.349360
2019-06-21T08:25:05
2019-06-21T08:25:05
133,061,854
1
0
Apache-2.0
2018-05-11T16:13:46
2018-05-11T16:13:46
null
UTF-8
R
false
true
586
rd
getQuizTemplate.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getQuizTemplate.R \name{getQuizTemplate} \alias{getQuizTemplate} \title{获取测试的模板数据,提供中英文2种格式} \usage{ getQuizTemplate(path = "./", lang = "en") } \arguments{ \item{path}{文件的路径,默认为当前项目目录} \item{lang}{语言的内容,默认为英文,也可以为中文,指定为cn即可} } \value{ 实际没有返回值,后续考虑完善 } \description{ 获取测试的模板数据,提供中英文2种格式 } \examples{ #getQuizTemplate(lang='cn'); }
6254a6d45a9a01b7e604f3c8d9372260f12d555a
fa60f8262586afbf25096cfb954e5a9d391addf7
/R_Machine_Learning/r_14_2(Diabetes_Random_Forest).R
cdc504b04b3676eb70bf5b5bcdeb52d913ab49e1
[]
no_license
pprasad14/Data_Science_with_R
ce5a2526dad5f6fa2c1fdff9f97c71d2655b2570
3b61e54b7b4b0c6a6ed0a5cc8243519481bb11b9
refs/heads/master
2020-05-05T08:56:39.708519
2019-04-06T20:42:11
2019-04-06T20:42:11
179,884,402
0
0
null
null
null
null
UTF-8
R
false
false
1,759
r
r_14_2(Diabetes_Random_Forest).R
#load data dataset = read.csv("Diabetes.csv") # another way to make train and test set without caTools set.seed(123) id = sample(2, nrow(dataset), prob = c(0.7,0.3), replace = T) table(id) training_set = dataset[id==1,] test_set = dataset[id ==2,] #building descision tree library(rpart) classifier = rpart(is_diabetic ~ ., data = training_set) #plot plot(classifier, margin = 0.1) text(classifier, cex = 0.7) # cex is font ##### library(rpart.plot) rpart.plot(classifier, type = 3, digits = 3, fallen.leaves = T, cex = 0.6) # Predictions y_pred1 = predict(classifier, newdata = test_set, type = "class") # we dont want probs #Confusion Matrix library(caret) confusionMatrix(test_set$is_diabetic, y_pred1) #Random Forest library(randomForest) set.seed(123) rf = randomForest(is_diabetic ~ ., data = training_set) print(rf) # plot classifier2 plot(rf) # 3 lines, for different no of 'mtry' #pred library(caret) y_pred2 = predict(rf, newdata = test_set) confusionMatrix(test_set$is_diabetic, y_pred2) rf3 = randomForest(is_diabetic ~ ., data = training_set, importance = T, mtry = 5, ntree = 500) rf3 #best no of trees best = tuneRF(training_set[-9], training_set$is_diabetic, stepFactor = 1, improve = 0.05, trace = T, plot = T) #Importance importance(classifier2) # check the importance of variables varImpPlot(classifier2) #to visualize the important variables # Tree package #install.packages("tree") library(tree) classifier4 = tree(is_diabetic ~ ., data = training_set) plot (classifier4, margin = 0.1) text(classifier4, cex = 0.7) y_pred4 = predict(classifier4, newdata = test_set, type = "class") #CM confusionMatrix(test_set$is_diabetic, y_pred4)
68bf46f9dc4ca5efe521539d493391236f6c30af
af901bc01d668ecd411549625208b07024df3ffd
/man/string.Rd
af2f09ee1ac52f16fe237465c602ac8dc02c566d
[ "MIT", "BSD-2-Clause" ]
permissive
r-lib/rlang
2784186a4dafb2fde7357c79514b3761803d0e66
c55f6027928d3104ed449e591e8a225fcaf55e13
refs/heads/main
2023-09-06T03:23:47.522921
2023-06-07T17:01:51
2023-06-07T17:01:51
73,098,312
355
128
NOASSERTION
2023-08-31T13:11:13
2016-11-07T16:28:57
R
UTF-8
R
false
true
1,522
rd
string.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils-encoding.R \name{string} \alias{string} \title{Create a string} \usage{ string(x, encoding = NULL) } \arguments{ \item{x}{A character vector or a vector or list of string-like objects.} \item{encoding}{If non-null, set an encoding mark. This is only declarative, no encoding conversion is performed.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} These base-type constructors allow more control over the creation of strings in R. They take character vectors or string-like objects (integerish or raw vectors), and optionally set the encoding. The string version checks that the input contains a scalar string. } \examples{ # As everywhere in R, you can specify a string with Unicode # escapes. The characters corresponding to Unicode codepoints will # be encoded in UTF-8, and the string will be marked as UTF-8 # automatically: cafe <- string("caf\uE9") Encoding(cafe) charToRaw(cafe) # In addition, string() provides useful conversions to let # programmers control how the string is represented in memory. For # encodings other than UTF-8, you'll need to supply the bytes in # hexadecimal form. If it is a latin1 encoding, you can mark the # string explicitly: cafe_latin1 <- string(c(0x63, 0x61, 0x66, 0xE9), "latin1") Encoding(cafe_latin1) charToRaw(cafe_latin1) } \keyword{internal}
3e213b4053723f1798a3b80f6be684766efc5618
ffdea92d4315e4363dd4ae673a1a6adf82a761b5
/data/genthat_extracted_code/hutils/examples/ahull.Rd.R
6e5347a52456c24062a17a338815729e85c2c5e9
[]
no_license
surayaaramli/typeRrh
d257ac8905c49123f4ccd4e377ee3dfc84d1636c
66e6996f31961bc8b9aafe1a6a6098327b66bf71
refs/heads/master
2023-05-05T04:05:31.617869
2019-04-25T22:10:06
2019-04-25T22:10:06
null
0
0
null
null
null
null
UTF-8
R
false
false
169
r
ahull.Rd.R
library(hutils) ### Name: ahull ### Title: Maximum area given x and y coordinates ### Aliases: ahull ### ** Examples ahull(, c(0, 1, 2, 3, 4), c(0, 1, 2, 0, 0))
60ce03c6825db3146b2016dfb8a1fea2ca85d0b5
b352edcb8ffea55c1b1bf4fae9be834213acf550
/plot3.R
a1dd2a3a27a8dc6fddd1a9ec2b9a62074df25197
[]
no_license
connorburleigh/ExData_Plotting1
b4db52f2ce2fda22f94cbcc093e79ac2672d957b
cda28544f8fe8f2d952c4dd76b97a75fff8ad5c9
refs/heads/master
2021-01-24T23:35:09.938602
2015-08-07T16:28:03
2015-08-07T16:28:03
38,980,661
0
0
null
2015-07-12T22:37:24
2015-07-12T22:37:23
null
UTF-8
R
false
false
1,268
r
plot3.R
## downlaod.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip","/Users/connorburleigh/Coursera/power_consumption.zip",method="curl") library(lubridate) wd<-getwd() temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp,method="curl") data <- read.table(unz(temp, "household_power_consumption.txt"),na.strings="?", sep=";",) unlink(temp) ## for local testing ## data<-read.csv("/Users/connorburleigh/Coursera/household_power_consumption.txt", sep=";",na.strings="?",stringsAsFactors=FALSE) Date_and_Time<-paste(data$Date,data$Time) Date_and_Time<-dmy_hms(Date_and_Time) clean_data<-cbind(Date_and_Time, data) relevant_data<-clean_data[clean_data$Date_and_Time >= ymd_hms("2007-2-1 00:00:00")& clean_data$Date_and_Time < ymd_hms("2007-2-3 00:00:00"),] png("plot3.png", height=480, width = 480) plot(relevant_data$Date_and_Time,relevant_data$Sub_metering_1, type="l",ylab="", xlab="") lines(relevant_data$Date_and_Time,relevant_data$Sub_metering_2,col="red") lines(relevant_data$Date_and_Time,relevant_data$Sub_metering_3,col="blue") title(ylab= "Energy sub metering") legend('topright',legend=legend_headings, lwd = 1, col=c("black","red","blue")) dev.off()
112befc89ac2ba26e62ecdc9bbfad9dc1c8337d0
dabe6fa5a3caf17d8b0c3dab939c614e3143775a
/2_model/src/evaluate.R
5794101f0602c6858876abae1475f76a8e59e35f
[]
no_license
wdwatkins/lake-temperature-neural-networks
d0c166183adaf82ef6562312a6fcd49a864ff255
626e569cb397f4d67299ebf3d80e1e8fa5dc4057
refs/heads/master
2020-03-25T05:36:10.759004
2019-11-16T01:29:16
2019-11-16T01:29:16
143,456,068
1
0
null
2018-08-03T17:37:01
2018-08-03T17:37:01
null
UTF-8
R
false
false
505
r
evaluate.R
evaluate_model <- function(model_list_ind, dat_ind, rmd_file, site_id, output_html, priority_lakes) { model_list <- readRDS(as_data_file(model_list_ind)) dat <- readRDS(as_data_file(dat_ind)) lake_name <- lookup_lake_name(site_id, priority_lakes) meets_data_criteria <- priority_lakes %>% filter(site_id == !!site_id) %>% pull(meets_data_criteria) rmarkdown::render( input = rmd_file, output_format = "html_document", output_file = output_html, output_dir = "2_model/doc") }
3e5989032e601345b8f6b7339a53589c6d2ce34b
44143d0c480e1cabf87f2c44909afe2aa85bd67c
/man/summary.QTE.Rd
20bd6aba13590fb3629f767ab70d0eb8fa88c3bc
[]
no_license
bcallaway11/qte
c383e991a3969e9e50e30477e701ee11c500d574
09830e766b7f9e28643928e9a170f73d9c4c0bcf
refs/heads/master
2023-08-30T21:43:34.342973
2023-08-15T21:37:43
2023-08-15T21:37:43
19,584,525
8
5
null
null
null
null
UTF-8
R
false
true
352
rd
summary.QTE.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/qte.R \name{summary.QTE} \alias{summary.QTE} \title{Summary} \usage{ \method{summary}{QTE}(object, ...) } \arguments{ \item{object}{A QTE Object} \item{...}{Other params (to work as generic method, but not used)} } \description{ \code{summary.QTE} summarizes QTE objects }
4d6c59c59edba85969b7d9d698d3e7fe2413af0c
ffdea92d4315e4363dd4ae673a1a6adf82a761b5
/data/genthat_extracted_code/rmutil/examples/Levy.Rd.R
e353872507527841c666297726f470c46f1de7e9
[]
no_license
surayaaramli/typeRrh
d257ac8905c49123f4ccd4e377ee3dfc84d1636c
66e6996f31961bc8b9aafe1a6a6098327b66bf71
refs/heads/master
2023-05-05T04:05:31.617869
2019-04-25T22:10:06
2019-04-25T22:10:06
null
0
0
null
null
null
null
UTF-8
R
false
false
210
r
Levy.Rd.R
library(rmutil) ### Name: Levy ### Title: Levy Distribution ### Aliases: dlevy plevy qlevy rlevy ### Keywords: distribution ### ** Examples dlevy(5, 2, 1) plevy(5, 2, 1) qlevy(0.6, 2, 1) rlevy(10, 2, 1)
9e9d7379d34f764b0a04d122e853e89f168da823
d125c6d235454381dfc70bf01056563af9ae071c
/R/children.R
f12451bc5a4ad34508f30e7935b7de0faf117413
[ "MIT" ]
permissive
dmkaplan2000/taxize
02e68eef6e62fcb5233c11928b5bd47b0cf339e3
5b6c4479eb7188d0289d7df6aff3b1a9d61422df
refs/heads/master
2021-01-22T10:51:43.095152
2015-06-18T15:44:07
2015-06-18T15:44:07
null
0
0
null
null
null
null
UTF-8
R
false
false
5,015
r
children.R
#' Retrieve immediate children taxa for a given taxon name or ID. #' #' This function is different from \code{\link{downstream}} in that it only collects immediate #' taxonomic children, while \code{\link{downstream}} collects taxonomic names down to a specified #' taxonomic rank, e.g., getting all species in a family. #' #' @export #' #' @param x character; taxons to query. #' @param db character; database to query. One or more of \code{itis}, \code{col}, or \code{ncbi}. #' @param rows (numeric) Any number from 1 to inifity. If the default NA, all rows are #' considered. Note that this parameter is ignored if you pass in a taxonomic id of any of the #' acceptable classes: tsn, colid. NCBI has a method for this function but rows doesn't work. #' @param ... Further args passed on to \code{\link{col_children}}, #' \code{\link{gethierarchydownfromtsn}}, or \code{\link{ncbi_children}}. #' See those functions for what parameters can be passed on. #' #' @return A named list of data.frames with the children names of every supplied taxa. #' You get an NA if there was no match in the database. #' #' @examples \dontrun{ #' # Plug in taxon names #' children("Salmo", db = 'col') #' children("Salmo", db = 'itis') #' children("Salmo", db = 'ncbi') #' #' # Plug in IDs #' (id <- get_colid("Apis")) #' children(id) #' #' ## Equivalently, plug in the call to get the id via e.g., get_colid into children #' identical(children(id), children(get_colid("Apis"))) #' #' (id <- get_colid("Apis")) #' children(id) #' children(get_colid("Apis")) #' #' # Many taxa #' (sp <- names_list("genus", 3)) #' children(sp, db = 'col') #' children(sp, db = 'itis') #' #' # Two data sources #' (ids <- get_ids("Apis", db = c('col','itis'))) #' children(ids) #' ## same result #' children(get_ids("Apis", db = c('col','itis'))) #' #' # Use the rows parameter #' children("Poa", db = 'col') #' children("Poa", db = 'col', rows=1) #' #' # use curl options #' library("httr") #' res <- children("Poa", db = 'col', rows=1, config=verbose()) #' res <- children("Salmo", db = 'itis', config=verbose()) #' res <- children("Salmo", db = 'ncbi', config=verbose()) #' } children <- function(...){ UseMethod("children") } #' @method children default #' @export #' @rdname children children.default <- function(x, db = NULL, rows = NA, ...) { nstop(db) switch(db, itis = { id <- get_tsn(x, rows = rows, ...) setNames(children(id, ...), x) }, col = { id <- get_colid(x, rows = rows, ...) setNames(children(id, ...), x) }, ncbi = { if (all(grepl("^[[:digit:]]*$", x))) { id <- x class(id) <- "uid" setNames(children(id, ...), x) } else { out <- ncbi_children(name = x, ...) structure(out, class='children', db='ncbi', .Names=x) } }, # ubio = { # id <- get_ubioid(x, ...) # out <- children(id, ...) # names(out) <- x # }, stop("the provided db value was not recognised", call. = FALSE) ) } #' @method children tsn #' @export #' @rdname children children.tsn <- function(x, db = NULL, ...) { fun <- function(y){ # return NA if NA is supplied if (is.na(y)) { out <- NA } else { out <- gethierarchydownfromtsn(tsn = y, ...) } } out <- lapply(x, fun) names(out) <- x class(out) <- 'children' attr(out, 'db') <- 'itis' return(out) } #' @method children colid #' @export #' @rdname children children.colid <- function(x, db = NULL, ...) { fun <- function(y){ # return NA if NA is supplied if(is.na(y)){ out <- NA } else { out <- col_children(id = y, ...) } return(out) } out <- lapply(x, fun) if(length(out)==1){ out=out[[1]] } else { out=out } class(out) <- 'children' attr(out, 'db') <- 'col' return(out) } # children.ubioid <- function(x, db = NULL, ...) { # fun <- function(y){ # # return NA if NA is supplied # if(is.na(y)){ # out <- NA # } else { # hierid <- ubio_classification_search(namebankID = y) # hierid <- hierid[ grep(104, hierid$classificationtitleid), 'hierarchiesid' ] # out <- ubio_classification(hierarchiesID = hierid, childrenFlag = 1, ...)[['children']] # } # return(out) # } # out <- lapply(x, fun) # class(out) <- 'children' # attr(out, 'db') <- 'ubio' # return(out) # } #' @method children ids #' @export #' @rdname children children.ids <- function(x, db = NULL, ...) { fun <- function(y, ...){ # return NA if NA is supplied if (is.na(y)) { out <- NA } else { out <- children(y, ...) } return(out) } out <- lapply(x, fun) class(out) <- 'children_ids' return(out) } #' @method children uid #' @export #' @rdname children children.uid <- function(x, db = NULL, ...) { out <- ncbi_children(id = x, ...) class(out) <- 'children' attr(out, 'db') <- 'ncbi' return(out) }
8aa0bc862701f663f54287dbb3cd3e47dd8bceee
40eccb8e26853d23ea3d35ac15225a420333ad55
/spinGameSamples.R
9fef52cafa95987e02290a5bde72590a68a27416
[]
no_license
dinhtuanphan/CoolProjects
72df0fe4f1dd56f85bb883a1eb3821a9c4a4159b
2eaffa8c3d278d1c4cbc52bb2fb3c1e6403c937a
refs/heads/main
2023-08-28T12:27:39.514791
2021-10-01T19:20:03
2021-10-01T19:20:03
370,442,930
0
0
null
null
null
null
UTF-8
R
false
false
243
r
spinGameSamples.R
runs <- 100000 spin <- function() { expectation <- sum(sample(c(1/2, -1/4, 1/2), size = 10, replace = TRUE)) if (expectation < 0) { return(1) } else { return(0) } } prob <- sum(replicate(runs, spin())) / runs print(prob)
a50094e817c264cd3018be07080152adfcc67fcb
747803a7abca38892a07ae46239ef58300d7bc0c
/exercises/exercise1_vectors.R
73b8dca0acc66ef3218206db775577dc03197306
[]
no_license
m-nabais/neurasmus_rmarkdown_workshop
0b07d7a84acd49c9c7d00a86f5e9c35c0f283cc6
29c986910572a8638f6542ac504ff87ebed5ea34
refs/heads/master
2022-11-06T13:03:08.217465
2020-06-13T13:49:55
2020-06-13T13:49:55
268,495,378
0
0
null
null
null
null
UTF-8
R
false
false
1,625
r
exercise1_vectors.R
######################### ## Example 1 - vectors ## ######################### a <- c(1,2,5.3,6,-2,4) # numeric vector b <- c("one","two","three") # character vector c <- c(TRUE,TRUE,TRUE,FALSE,TRUE,FALSE) #logical vector d <- c("1", 1, "TRUE", TRUE, "Hello") ########################## ## Exercise 1 - vectors ## ########################## # 1. Create a variable called "vec1" and assign it the vector # c("Hello", ",", "", "world", "!") # 2. Find the number of elements of vec1. # 3. Assign the 1st, 3rd and last elements of the vector to the variables # x, y and z, respectively. # 4. Run the following code: print(paste("The 1st element of vec1 is:", x)) print(paste("The 3rd element of vec1 is:", y)) print(paste("The last element of vec1 is:", z)) # 4.1 Why is the 3rd element of vec1 not printing anything? Is there a mistake in your code? # 4.2 Could you access the last element of vec1? Did you use a built-in R function? If not, can you think of any? # 4.3. What is the paste() function doing? How is it different from the c()? Hint: use the function length(). # 5. What happens if you print vector *d* in the example above? What type has vector *d*? # 6. Can you replace the 3rd element of vec1 y "pretty"? Hint: vectos are mutable and you can replace an element with []. ######################### # Optional exercises: ## ######################### # 1. Spend some time adding, multiplying, subtracting and dividing the vectors a, b, c and d. Are all operations allowed with every vector? Pay attention to the errors displayed! Do they make sense? # 2. How would you modify the first element of a?
be00aaf3a7a91dbe70b0b45a1b7b3639b17ce785
f634745ad3168a636a5d6a1de2b339aab108b9f5
/digit.R
83f7d3d69b39fdc755e8999e6ebeb91655082a87
[]
no_license
anupamsingh81/grades
33c49826ea436b02d005419344118ccdc2d9c2e2
2058a2ed5631e81981cc09420dccd6bb8ec2af59
refs/heads/master
2021-09-09T01:44:45.980347
2018-03-13T07:08:55
2018-03-13T07:08:55
125,007,751
0
0
null
null
null
null
UTF-8
R
false
false
541
r
digit.R
library(digitizeR) app <- wpd.launch() plot(res_2005$V1,res_2005$V2) library(tidyverse) res_2005$V1 res_2005 = res_2005 %>% rename(marks=V1,percent=V2) %>% ggplot(aes(marks,percent))+ #stat_smooth() geom_line() res_2005 %>% filter(V1<81) pnorm(60,mean(res_2005$V1),sd(res_2005$V1)) mean(res_2005$V1) r1=res_2005 %>% rename(marks=V1,percent=V2) %>% mutate(percent=abs(as.integer(100*percent)),marks=floor(marks)) jj=map2(.x=r1$marks,.y=r1$percent,.f=rep) kk=jj %>% unlist() median(kk)
1d87a0af5ba21b0bc716568435b597cff6471373
1a1a686b70a443f0d61b0e6903323a396c18c212
/R/ct_update_databases.R
8351c9201f7ccf8c237c4765e3648fad48d77dac
[]
no_license
cran/comtradr
8d3e6d4073a49b215bce43d181f1f7daab61a2bf
aa054cbec4893182cae0b78dee951c0c21b46477
refs/heads/master
2022-04-29T19:10:49.795077
2022-04-20T05:32:29
2022-04-20T05:32:29
87,315,342
2
0
null
null
null
null
UTF-8
R
false
false
12,128
r
ct_update_databases.R
#' Check for updates to country/commodity databases #' #' Use of the Comtrade API requires access to the Comtrade countries database #' and commodities database. The \code{comtradr} package keeps each DB saved #' as a data frame in the package directory, as Comtrade makes updates to #' these DB's infrequently (roughly once per year). #' #' This function will check to see if Comtrade has made any updates to either #' database. If an update is found, it will download the updated DB and save #' it to the \code{comtradr} package directory, and update the DB for use #' within the current R session. #' #' @param force logical, if TRUE, both the country and commodity databases #' will be downloaded, regardless of the status of the DB's on file. Default #' value is FALSE. #' @param verbose logical, if TRUE, an update status message will be printed #' to console. Default value is TRUE. #' @param commodity_type Trade data classification scheme to use, see #' "details" for a list of the valid inputs. Default value is "HS", which is #' the default "type" of the commodity database on file upon install of #' \code{comtradr}. Please note that if the value passed to this arg doesn't #' match the values in variable "type" of the current commodity DB, then #' this function will replace the current commodity DB with that of the #' type specified by this arg. If you don't intend to change the type of the #' current commodity DB, then no input for this arg is required. To see #' the "type" of the current commodity DB, use #' \code{\link{ct_commodity_db_type}}. #' @param commodity_url Default value NULL, otherwise this should be the base #' url of the Comtrade json data directory. Only necessary if the Comtrade #' site changes from "https://comtrade.un.org/data/cache/". This partial #' url string will have a commodity extension appended to it to create a #' valid url. The commodity extension will be chosen based on the input to #' arg \code{commodity_type}. #' @param reporter_url Default value NULL, otherwise this should be a url as a #' char string that points to the reporter areas JSON dataset on the Comtrade #' website. Only necessary if the Comtrade site changes from #' \url{https://comtrade.un.org/data/cache/reporterAreas.json} #' @param partner_url Default value NULL, otherwise this should be a url as a #' char string that points to the reporter areas JSON dataset on the Comtrade #' website. Only necessary if the Comtrade site changes from #' \url{https://comtrade.un.org/data/cache/partnerAreas.json} #' #' @details The default for arg \code{commodity_type} is \code{HS}. Below is a #' list of all valid inputs with a very brief description for each, for more #' information on each of these types, see #' \url{https://comtrade.un.org/data/doc/api/#DataAvailabilityRequests} #' \itemize{ #' \item \code{HS}: Harmonized System (HS), as reported #' \item \code{HS1992}: HS 1992 #' \item \code{HS1996}: HS 1996 #' \item \code{HS2002}: HS 2002 #' \item \code{HS2007}: HS 2007 #' \item \code{HS2012}: HS 2012 #' \item \code{HS2017}: HS 2017 #' \item \code{SITC}: Standard International Trade Classification (SITC), as #' reported #' \item \code{SITCrev1}: SITC Revision 1 #' \item \code{SITCrev2}: SITC Revision 2 #' \item \code{SITCrev3}: SITC Revision 3 #' \item \code{SITCrev4}: SITC Revision 4 #' \item \code{BEC}: Broad Economic Categories #' \item \code{EB02}: Extended Balance of Payments Services Classification #' } #' #' @return Updated database of commodities and countries. #' #' @export #' #' @examples \dontrun{ #' ct_update_databases() #' } ct_update_databases <- function(force = FALSE, verbose = TRUE, commodity_type = c("HS", "HS1992", "HS1996", "HS2002", "HS2007", "HS2012", "HS2017", "SITC", "SITCrev1", "SITCrev2", "SITCrev3", "SITCrev4", "BEC", "EB02"), commodity_url = NULL, reporter_url = NULL, partner_url = NULL) { # Input validation. stopifnot(is.logical(force)) stopifnot(is.logical(verbose)) if (!is.null(commodity_url)) { stopifnot(is.character(commodity_url)) commodity_url <- commodity_url } else { commodity_url <- "https://comtrade.un.org/data/cache/" } if (!is.null(reporter_url)) { stopifnot(is.character(reporter_url)) reporter_url <- reporter_url } else { reporter_url <- "https://comtrade.un.org/data/cache/reporterAreas.json" } if (!is.null(partner_url)) { stopifnot(is.character(partner_url)) partner_url <- partner_url } else { partner_url <- "https://comtrade.un.org/data/cache/partnerAreas.json" } # Append the correct url str to the end of commodity_url, based on arg # "commodity_type". commodity_type <- match.arg(commodity_type) if (commodity_type == "HS") { commodity_url <- paste0(commodity_url, "classificationHS.json") } else if (commodity_type == "HS1992") { commodity_url <- paste0(commodity_url, "classificationH0.json") } else if (commodity_type == "HS1996") { commodity_url <- paste0(commodity_url, "classificationH1.json") } else if (commodity_type == "HS2002") { commodity_url <- paste0(commodity_url, "classificationH2.json") } else if (commodity_type == "HS2007") { commodity_url <- paste0(commodity_url, "classificationH3.json") } else if (commodity_type == "HS2012") { commodity_url <- paste0(commodity_url, "classificationH4.json") } else if (commodity_type == "HS2017") { commodity_url <- paste0(commodity_url, "classificationH5.json") } else if (commodity_type == "SITC") { commodity_url <- paste0(commodity_url, "classificationST.json") } else if (commodity_type == "SITCrev1") { commodity_url <- paste0(commodity_url, "classificationS1.json") } else if (commodity_type == "SITCrev2") { commodity_url <- paste0(commodity_url, "classificationS2.json") } else if (commodity_type == "SITCrev3") { commodity_url <- paste0(commodity_url, "classificationS3.json") } else if (commodity_type == "SITCrev4") { commodity_url <- paste0(commodity_url, "classificationS4.json") } else if (commodity_type == "BEC") { commodity_url <- paste0(commodity_url, "classificationBEC.json") } else if (commodity_type == "EB02") { commodity_url <- paste0(commodity_url, "classificationEB02.json") } # Create output message. if (verbose) { msg <- "All DB's are up to date, no action required" } # Get the current date/time. curr_date <- format(Sys.time(), "%a, %d %b %Y %X %Z") # If "force" is FALSE, get the current databases as data frames. if (!force) { country_df <- get_country_db() commodity_df <- get_commodity_db() } # Get the commodity database from the Comtrade website. Compare the # "last-modified" date value within the header to the "date" attribute of # the current commodity database on file. If the "last-modified" date is # newer than the date of the current database, or the value passed to arg # "commodty_type" doesn't match the "type" attribute of the current database, # or arg "force" is TRUE, the old DB will be replaced by the newer DB. # Replacement will be for both the current session and within the data dir # of the comtradr package. res <- httr::GET(commodity_url, httr::user_agent(get("ua", envir = ct_env))) if (force || commodity_type != attributes(commodity_df)$type || httr::headers(res)$`last-modified` > attributes(commodity_df)$date) { # Extract data frame. commodity_df <- res %>% httr::content("text", encoding = "UTF-8") %>% jsonlite::fromJSON(simplifyDataFrame = TRUE) %>% magrittr::extract2("results") %>% `colnames<-`(c("code", "commodity", "parent")) # Assign attributes to the data frame (current date/time, and type). attributes(commodity_df)$date <- curr_date attributes(commodity_df)$type <- commodity_type # Save df to data dir of the comtradr package. save( commodity_df, file = paste0(system.file("extdata", package = "comtradr"), "/commodity_table.rda"), compress = "bzip2" ) # Save df to ct_env. assign("commodity_df", commodity_df, envir = ct_env) # Update the output message. if (verbose) { msg <- paste0("Updates found. The following datasets have been ", "downloaded: commodities DB") } } # Get the reporter country database and the partner country database from # the Comtrade website. Compare the "last-modified" date value within the # header of each to the "date" attribute of the current country_table # database on file. If either of the "last-modified" dates is newer than the # date of the database on file, or if arg "force" is TRUE, replace the # database on file with the data pulled from the Comtrade website. country_update <- FALSE res_rep <- httr::GET(reporter_url, httr::user_agent(get("ua", envir = ct_env))) res_par <- httr::GET(partner_url, httr::user_agent(get("ua", envir = ct_env))) if (force || httr::headers(res_rep)$`last-modified` > attributes(country_df)$date || httr::headers(res_rep)$`last-modified` > attributes(country_df)$date) { country_update <- TRUE # Get reporters dataset as data frame. reporters <- res_rep %>% httr::content("text", encoding = "UTF-8") %>% jsonlite::fromJSON(simplifyDataFrame = TRUE) %>% magrittr::extract2("results") %>% `colnames<-`(c("code", "country_name")) # Get partners dataset as data frame. partners <- res_par %>% httr::content("text", encoding = "UTF-8") %>% jsonlite::fromJSON(simplifyDataFrame = TRUE) %>% magrittr::extract2("results") %>% `colnames<-`(c("code", "country_name")) # Get all countries and codes as vectors. countries <- c(reporters$country_name, partners$country_name) codes <- c(reporters$code, partners$code) # Initialize output data frame. country_df <- data.frame("country_name" = unique(countries), stringsAsFactors = FALSE) # Add country codes to country_df. country_df$code <- vapply(unique(countries), function(x) { codes[match(x, countries)] }, character(1), USE.NAMES = FALSE) # Add logical vector indicating, for each obs of country_df, whether the # country appears as a reporter. country_df$reporter <- vapply(unique(countries), function(x) { any(reporters$country_name == x) }, logical(1), USE.NAMES = FALSE) # Add logical vector indicating, for each obs of country_df, whether the # country appears as a partner. country_df$partner <- vapply(unique(countries), function(x) { any(partners$country_name == x) }, logical(1), USE.NAMES = FALSE) } # Assign attributes to the data frame (current date/time). attributes(country_df)$date <- curr_date # If updates were found for the country reference dataset, then save the # updated country DB to the data dir of the comtradr package, and update # "country_df" within ct_env. if (country_update) { save( country_df, file = paste0(system.file("extdata", package = "comtradr"), "/country_table.rda"), compress = "bzip2" ) # Save country_df to ct_env. assign("country_df", country_df, envir = ct_env) # Update the output message. if (verbose) { if (grepl("Updates found", msg, fixed = TRUE)) { msg <- paste0(msg, ", countries DB") } else { msg <- paste0("Updates found. The following datasets have been ", "downloaded: countries DB") } } } # Finally, print to console the results of the update function (msg). if (verbose) { message(msg) } return(invisible()) }
ceebb0d882ce5f257cadee2776171d2ea64df92c
f351a9b16a1fd6da52b2c2fa00bda484e7ef6f1c
/SNP_analysis/snp_PCA2.R
de9196602b67688db7e1eb22fb0197b7f3a0cdfa
[]
no_license
tania-k/Friedmanniomyces_popgen
19f7b105ba28d78367752b73ab416b3477787a6e
816e8e98fe6ac693729c0a58ef8dbde3484a8d8a
refs/heads/master
2023-04-12T14:30:20.450499
2022-11-20T11:35:33
2022-11-20T11:35:33
568,384,429
0
0
null
null
null
null
UTF-8
R
false
false
7,832
r
snp_PCA2.R
library(gdsfmt) library(SNPRelate) library(dplyr) library(wordcloud) library(tm) library(ggfortify) library(ggplot2) library(plotly) library(phyloseq) library(ggrepel) library(ggbiplot) library(RColorBrewer) gdsfile = "plots/snps_selected.gds" vcf.fn <- "vcf/CCFEE_5001_v1.All.SNP.combined_selected.vcf.gz" if(!file.exists(gdsfile)){ snpgdsVCF2GDS_R(vcf.fn, gdsfile,method="biallelic.only") #option=snpgdsOption(CM002236=1,CM002237=2,CM002238=3,CM002239=4,CM002240=5,CM002241=6,CM002242=7)) } snpgdsSummary(gdsfile) genofile <- snpgdsOpen(gdsfile) chroms <- read.gdsn(index.gdsn(genofile,"snp.chromosome")) #get.attr.gdsn(index.gdsn(genofile, "snp.chromosome")) chr <- strtoi(sub("SCAF_([0-9]+)","\\1",chroms,perl=TRUE)) pca <- snpgdsPCA(genofile,num.thread=2,autosome.only=FALSE) pc.percent <- pca$varprop*100 id <- pca$sample.id #id <- c("5001", "5193", "5195", "5199", "5200", "5208", "524", "5273", "5275", "5277", "5281", "5283", "5307", "5311", "5311_v1", "5486", "6074", "6081", "6082", "6096", "6249", "6250", "6464", "670", "690") #pca$sample.id = id head(round(pc.percent, 2)) pdf("plots/PCA_snp_plots5.pdf") tab <- data.frame(sample.id = pca$sample.id, # pop = pheno$MinimalMediaGrowth, EV1=pca$eigenvect[,1], # PCA vector 1 EV2=pca$eigenvect[,2], # PCA vector 2 stringsAsFactors=FALSE) #p1<-plot(tab$EV2, tab$EV1, #, col=as.integer(tab$pop), #xlab="eigenvector 2", ylab="eigenvector 1", main="PCA SNP plot") #text(x = pca$eigenvect[,2], y = pca$eigenvect[,1], labels = tab$sample.id, pos = 1 ,cex =0.8, offset = 0.5) #mx <- apply(tab$EV2,5,max) #mn <- apply(tab$EV1,5,min) #https://blog.fellstat.com/?cat=11 p2 <-textplot(tab$EV2, tab$EV1, id, cex=1, new=TRUE, show.lines=TRUE, xlim=c(-0.15,0.65),ylim=c(-0.30,0.40)) set.seed(100) # recode the snp.gds to support chromosomes? ibs.hc <- snpgdsHCluster(snpgdsIBS(genofile, num.thread=2,autosome.only=FALSE)) rv <- snpgdsCutTree(ibs.hc) plot(rv$dendrogram, leaflab="none", main="Friedmanniomyces endolithicus Strains") snpgdsDrawTree(rv, type="z-score", main="Friedmanniomyces endolithicus Strains") snpgdsDrawTree(rv, main="Friedmanniomyces endolithicus Strains", edgePar=list(col=rgb(0.5,0.5,0.5, 0.75), t.col="black")) table(rv$samp.group) df = data.frame(group = rv$samp.group) rownames(df) = pca$sample.id write.csv(df,"plots/popset_inferred.csv") tab <- data.frame(sample.id = pca$sample.id, pop = rv$samp.group, EV1=pca$eigenvect[,1], # PCA vector 1 EV2=pca$eigenvect[,2], # PCA vector 2 stringsAsFactors=FALSE) #plot(tab$EV2, tab$EV1, # col=as.integer(tab$pop), # xlab="eigenvector 2", ylab="eigenvector 1", main="PCA SNP plot") #CORRSNP <- snpgdsPCACorr(pca, genofile, eig.which=1:4,num.thread=2) #savepar <- par(mfrow=c(3,1), mai=c(0.3, 0.55, 0.1, 0.25)) #for (i in 1:3) #{ # plot(abs(CORRSNP$snpcorr[i,]), ylim=c(0,1), xlab="", ylab=paste("PC", i), # col=factor(chr), pch="+") #} options(ggrepel.max.overlaps = Inf) #http://rstudio-pubs-static.s3.amazonaws.com/53162_cd16ee63c24747459ccd180f69f07810.html #https://ggrepel.slowkow.com/articles/examples.html metadata <- read.csv("metadata.tsv", sep = "\t", row.names = 1, header = TRUE) metadata2 <- read.csv("metadata.tsv", sep = "\t") dataset_pcr <- metadata2[2:3] pca_res <- prcomp(dataset_pcr, scale. = TRUE) biplot = ggbiplot(pcobj = pca_res, choices = c(1,2), #label.position = "identity", #label.repel = TRUE, obs.scale = 1, var.scale = 1, # Scaling of axis #labels = row.names(metadata), # Add labels as rownames #labels.size = 3.5, varname.size = 3.5, varname.abbrev = FALSE, # Abbreviate variable names (TRUE) var.axes = FALSE, # Remove variable vectors (TRUE) circle = FALSE, # Add unit variance circle (TRUE) ellipse = TRUE, groups = metadata$Ploidy) # Adding ellipses #print(biplot) #repel that shit https://stackoverflow.com/questions/68738673/how-to-repel-labels-in-ggplot #turn off the legend to get the secret a's to disappear from legend https://stackoverflow.com/questions/18337653/remove-a-from-legend-when-using-aesthetics-and-geom-text biplot2 = biplot + labs(title = "PCA of SNPs generated with 25 strains of \nFriedmanniomyces endolithicus", colour = "Ploidy") + theme_bw() + expand_limits(x = c(-1, 3.5)) + geom_label_repel(mapping = aes(label = row.names(metadata), color = factor(metadata$Ploidy)), show.legend = FALSE) + scale_color_manual(values = c("Diploid" = "purple", "Haploid"="orange","Triploid"="steelblue")) #+ xlim = c(-2.0,2.65) + ylim = c(-1.5,2.50) print(biplot2) biplot3 = ggbiplot(pcobj = pca_res, choices = c(1,2), #label.position = "identity", #label.repel = TRUE, obs.scale = 1, var.scale = 1, # Scaling of axis #labels = row.names(metadata), # Add labels as rownames #labels.size = 3.5, varname.size = 3.5, varname.abbrev = FALSE, # Abbreviate variable names (TRUE) var.axes = FALSE, # Remove variable vectors (TRUE) circle = FALSE, # Add unit variance circle (TRUE) ellipse = TRUE, groups = factor(metadata2$Year)) # Adding ellipses #print(biplot3) #repel that shit https://stackoverflow.com/questions/68738673/how-to-repel-labels-in-ggplot biplot4 = biplot + labs(title = "PCA of SNPs generated with 25 strains of \nFriedmanniomyces endolithicus", colour = "Year") + theme_bw() + expand_limits(x = c(-1, 3.5)) + geom_label_repel(mapping = aes(label = row.names(metadata), color = factor(metadata$Year)), show.legend = FALSE) + scale_color_manual(values = c("Diploid" = "purple", "Haploid"="orange","Triploid"="steelblue", "1981" = "#FF5733", "1997" = "#7AFF33", "2004" = "#33FCFF", "2010" = "#FCFF33", "2011" = "#336BFF", "2016" = "#FF33AC")) print(biplot4) biplot5 = ggbiplot(pcobj = pca_res, choices = c(1,2), #label.position = "identity", #label.repel = TRUE, obs.scale = 1, var.scale = 1, # Scaling of axis #labels = row.names(metadata), # Add labels as rownames #labels.size = 3.5, varname.size = 3.5, varname.abbrev = FALSE, # Abbreviate variable names (TRUE) var.axes = FALSE, # Remove variable vectors (TRUE) circle = FALSE, # Add unit variance circle (TRUE) ellipse = TRUE, groups = factor(metadata$Elevation)) # Adding ellipses #print(biplot) #repel that shit https://stackoverflow.com/questions/68738673/how-to-repel-labels-in-ggplot biplot6 = biplot + labs(title = "PCA of SNPs generated with 25 strains of \nFriedmanniomyces endolithicus", colour = "Elevation") + theme_bw() + expand_limits(x = c(-1, 3.5)) + geom_label_repel(mapping = aes(label = row.names(metadata), color = factor(metadata$Elevation)), show.legend = FALSE) + scale_color_manual(values = c("Diploid" = "purple", "Haploid"="orange","Triploid"="steelblue", "200" = "#FF5733" , "1000" = "#7AFF33", "2000" = "#33FCFF", "3000" = "#FCFF33")) print(biplot6)
b2fd28ac5b667477314e144d2b8cb30adcd22e69
5d8eb44c6dccda49d67ccd48052909a12cc7da30
/GSE22544_Bootstrap.R
0ed3138717f140b9e1e1a6bb92835054a15fc0f6
[]
no_license
justjooz/research-experience
c797b75a439ca9003b52ada3ed372ddf84f6aedc
a467ce10f4d5fe2722f18f066100913e84465e82
refs/heads/master
2020-06-25T00:01:16.290799
2019-08-03T04:23:30
2019-08-03T04:23:30
199,132,600
1
0
null
null
null
null
UTF-8
R
false
false
9,575
r
GSE22544_Bootstrap.R
# this R script shows the process to obtain significant genes, binarize them, and do a 1000x bootstrap # followed by using a distance matrix/heat map # and confusion matrix to obtain the F-score, recall, precision # Set working directory setwd("D:/Code/RE/My R scripts") # ========================================================================================================== # Reading GSE22544 dataframe into script new_df_GSE22544 <- read.csv("new_df_GSE22544.csv", header = T, sep = ",", stringsAsFactors = F, row.names = 1) # read exprs dataframe new_df_GSE22544 <- cbind(new_df_GSE22544[, c(4,8,9,13)], new_df_GSE22544[,-c(4,8,9,13)]) # rearranges the normal classes to the first 4 columns new_df_GSE22544 <- na.omit(new_df_GSE22544) # removes NAs which causes probs with for loop # (2) Method 1: using for loops to produce binary matrix (but leads to error that says "data are essentially constant") # =========================================================================================================== significantgenes <- c() # to initialise the vector boot_list <- list() library(progress) pb <- progress_bar$new(total = 1000) for(j in 1:1000){ # 1000 is the number of bootstraps ## cannot be run if done on bigger datasets significantgenes <- c() boot_normal <- sample(new_df_GSE22544[, 1:4], size=4, replace=TRUE) boot_IDC <- sample(new_df_GSE22544[,5:20], size=4, replace=TRUE) for(i in 1:2000){ # 9994 is the number of genes # if set to 9995, "data are essentially constant" error ttest_1 <- try(t.test(boot_normal[i,], boot_IDC[i,])) if (ttest_1$p.value <= 0.05) # if p value is <= 0.05(less than or equals), { significantgenes <- append(significantgenes, 1) # assign the genes (rows) as 1 (significant) } else # if p value is > 0.05, { significantgenes <- append(significantgenes, 0) # assign the genes (rows) as 0 (not significant) } } boot_list <- append(boot_list, list(significantgenes)) pb$tick() Sys.sleep(1 / 1000) } # (2) Method 2: Using "genefilter" package's "rowttests" function (runs faster than nested loop & w/o error) # ================================================================================================= # -------- Prep ---------------- #BiocManager::install("genefilter") library(genefilter) class_factor_2 <- as.factor(c(rep("normal", 4), rep("IDC", 4))) # creating a class factor (normal & IDC) # ------ rowttests function to generate binary matrix ----------- significantgenes_2 <- c() boot_list_2 <- list() library(progress) pb <- progress_bar$new(total = 1000) for (i in 1:1000){ m_normal <- as.matrix(sample(new_df_GSE22544[,1:4], size = 4, replace = T)) # samples 4 normal patients into a matrix m_IDC <- as.matrix(sample(new_df_GSE22544[,5:20], size = 4, replace = T)) # samples 4 normal patients into a matrix m_bind <- cbind(m_normal, m_IDC) # has 8 columns, first 4 columns are sampled normal, last 4 columns are sample IDC ttest_2 <- rowttests(m_bind, class_factor_2) # rowttests tests all 9994 rows(genes) w/o error significantgenes_2 <- as.numeric(ttest_2$p.value < 0.05) # <0.05 forms a boolean output, and it is changed to numeric by as.numeric. boot_list_2 <- append(boot_list_2, list(significantgenes_2)) # append each sampling as a list to a list pb$tick() # for progress bar Sys.sleep(1 / 1000) # for progress bar } # -------rowttests function to generate binary matrix ----------- # (3) Convert list into matrix # ================================================================================================== boot_mat_2 <- matrix(unlist(boot_list_2), ncol = 1000, byrow = FALSE) # converting list into matrix # dim(boot_mat_2) # (4) Computing rowsums of each gene to see significance out of 1000 # =========================================================================== sum_vect <- rowSums(boot_mat_2) tail(sort(sum_vect), 5) hist(sum_vect, freq=FALSE, breaks = 200, main = "Distribution of Significant Samplings in Breast Cancer Genes", xlab = "Significant Samplings", col = "orange", xlim=c(0,1000), ylim = c(0, 0.020)) # to visually inspect to determine point threshold of significance # `sum_sig` is assigned the numeric output of the boolean of `i>180` sum_sig <- as.numeric(sum_vect>180) # (5) Creating confusion matrix # ======================================================= first_sample <- as.factor(boot_mat_2[,1]) # actual sum_sig <- as.factor(sum_sig) # observation # install.packages("caret") library(caret) # for confusion matrix function confusionMatrix(sum_sig, first_sample) # Confusion Matrix and Statistics # Reference # Prediction 0 1 # 0 9025 (TP) 324 (FP) # 1 546 (FN) 99 (TN) # # Accuracy : 0.9129 # 95% CI : (0.9072, 0.9184) # No Information Rate : 0.9577 # P-Value [Acc > NIR] : 1 # # Kappa : 0.1415 # # Mcnemar's Test P-Value : 6.752e-14 # # Sensitivity : 0.9430 # Specificity : 0.2340 # Pos Pred Value : 0.9653 # Neg Pred Value : 0.1535 # Prevalence : 0.9577 # Detection Rate : 0.9030 # Detection Prevalence : 0.9355 # Balanced Accuracy : 0.5885 # # 'Positive' Class : 0 conf_mat <- (confusionMatrix(sum_sig, first_sample))$table # (6) Calculating metrics: Precision, Recall, F-Score # ======================================================================== # Precision: TP/(TP+FP): precision <- conf_mat[1,1]/sum(conf_mat[1,1:2]) precision # [1] 0.9653439 # Recall: TP/(TP+FN): recall <- conf_mat[1,1]/sum(conf_mat[1:2,1]) recall # [1] 0.9429527 # F-Score: 2 * precision * recall /(precision + recall): f_score <- 2 * precision * recall / (precision + recall) # [1] 0.9540169 # Metrics # Precision: 0.9653439 # Recall: 0.9429527 # F-score: 0.9540169 # Visualising the Confusion Matrix set.seed(1234) cm <-confusionMatrix(sum_sig, first_sample) # ?confusionMatrix draw_confusion_matrix <- function(cm) { layout(matrix(c(1,1,2))) par(mar=c(2,2,2,2)) plot(c(100, 345), c(300, 450), type = "n", xlab="", ylab="", xaxt='n', yaxt='n') title('CONFUSION MATRIX', cex.main=2.5) # create the matrix rect(150, 430, 240, 370, col='#3F97D0') text(195, 438, 'Positive', cex=2) rect(250, 430, 340, 370, col='#F7AD50') text(295, 438, 'Negative', cex=2) text(125, 370, 'Predicted', cex=2, srt=90, font=2) text(245, 450, 'Actual', cex=2, font=2) rect(150, 305, 240, 365, col='#F7AD50') rect(250, 305, 340, 365, col='#3F97D0') text(143, 400, 'Positive', cex=2, srt=90) text(143, 335, 'Negative', cex=2, srt=90) # add in the cm results res <- as.numeric(cm$table) text(195, 400, res[1], cex=4, font=2, col='black') text(195, 335, res[2], cex=4, font=2, col='black') text(295, 400, res[3], cex=4, font=2, col='black') text(295, 335, res[4], cex=4, font=2, col='black') # add in the specifics plot(c(100, 0), c(100, 0), type = "n", xlab="", ylab="", main = "DETAILS", xaxt='n', yaxt='n') text(10, 85, names(cm$byClass[1]), cex=1.2, font=2) text(10, 70, round(as.numeric(cm$byClass[1]), 3), cex=1.2) text(30, 85, names(cm$byClass[2]), cex=1.2, font=2) text(30, 70, round(as.numeric(cm$byClass[2]), 3), cex=1.2) text(50, 85, names(cm$byClass[5]), cex=1.2, font=2) text(50, 70, round(as.numeric(cm$byClass[5]), 3), cex=1.2) text(70, 85, names(cm$byClass[6]), cex=1.2, font=2) text(70, 70, round(as.numeric(cm$byClass[6]), 3), cex=1.2) text(90, 85, names(cm$byClass[7]), cex=1.2, font=2) text(90, 70, round(as.numeric(cm$byClass[7]), 3), cex=1.2) # add in the accuracy information text(30, 35, names(cm$overall[1]), cex=1.5, font=2) text(30, 20, round(as.numeric(cm$overall[1]), 3), cex=1.4) text(70, 35, names(cm$overall[2]), cex=1.5, font=2) text(70, 20, round(as.numeric(cm$overall[2]), 3), cex=1.4) } draw_confusion_matrix(cm) # (7) Create user-defined function that calculates jaccard coefficient (intersection over union) # ========================================================================= jaccard_fun <- function (x,y) { M.11 = sum(x == 1 & y == 1) M.10 = sum(x == 1 & y == 0) M.01 = sum(x == 0 & y == 1) return (M.11 / (M.11 + M.10 + M.01)) } # Initialising dataframe for imputation jaccard_df <- as.data.frame(matrix(NA,nrow = 1000, ncol = 1000)) names(jaccard_df) <- paste0('S', 1:1000) rownames(jaccard_df) <- paste0('S', 1:1000) library(progress) pb <- progress_bar$new(total = 1000) # for loop that will produce the distance heatmap/ for (r in 1:1000) { for (c in 1:1000) { if (c == r) { # if rows iteration is the same as column iteration, jaccard_df[r,c] = 1 # assign as 1 } else if (c > r) { # if not then when columns is more than rows, add the variables of rows and jaccard_df[r,c] <- jaccard_fun(boot_mat_2[,r], boot_mat_2[,c]) # replace with list from above } } pb$tick() # for progress bar Sys.sleep(1 / 1000) # for progress bar } write.csv(boot_mat_2, file = "D:/Code/RE/My R scripts/boot_mat_2.csv", row.names = T) write.csv(jaccard_df, file = "D:/Code/RE/My R scripts/jaccard_df.csv", row.names = T)
04a4d26728b3ad230536941168e6750d5f018ec8
cb4b8d511a14f1655120bb8737266296c5e46059
/R/birds/Density_stuff/species_density.R
2db88f5f2b324b5609ea3b48b77826a9a62997a4
[]
no_license
Josh-Lee1/JL_honours
40361e2f8b78fac9676ff32a8e0ce7a0603f6152
db6792a039d824fdb518f9e06c3cc27ecca6da8a
refs/heads/master
2023-03-29T22:28:19.500012
2021-04-15T04:40:20
2021-04-15T04:40:20
295,877,409
0
0
null
2021-03-16T06:17:06
2020-09-16T00:02:18
HTML
UTF-8
R
false
false
2,535
r
species_density.R
library(tidyverse) library(Distance) library(mrds) library(lme4) library(sjPlot) library(sjmisc) birds <- read.csv("Data/Raw/Birds.csv") birds$Treatment<- with(birds, paste0(Formation, Fire)) birds <- birds %>% group_by(Site) %>% mutate(species_richness = n_distinct(Species)) %>% rename(distance = Distance) %>% rename(Region.Label = Site) %>% as.data.frame() birds$Area <- '628' birds$Effort <- '1' birds$Sample.Label <- '1' birds$Area <- as.numeric(birds$Area) birds$Effort <- as.numeric(birds$Effort) #Fitting detection function birds_hr_loc <- ds(birds, truncation = 400, key = "hr", formula = ~ Location) #getting species lists for habitats birds2 <- birds %>% mutate(habitat = ifelse(Formation == "Rainforest", 1, 2)) %>% select(Species, habitat) %>% distinct() %>% group_by(Species) %>% summarise_all(sum) %>% mutate(rfonly = ifelse(habitat == 1, 1, 0), dsonly = ifelse(habitat == 2, 1, 0), bothhab = ifelse(habitat == 3, 1, 0)) #Stratafying results by species species_level_dht2 <- dht2(birds_hr_loc, flatfile = birds, stratification = "object", strat_formula = ~Species) species_densities <- species_level_dht2 %>% left_join(birds2, by = "Species") %>% select(Species, Abundance, Abundance_se, habitat:bothhab) %>% filter(Species != "Total") %>% arrange(Abundance) %>% mutate(Species=factor(Species, levels=Species)) species_densities$habitat <- as.character(species_densities$habitat) #make a first trial plot ggplot(data = species_densities, aes(Species, Abundance, ymax = Abundance+Abundance_se, ymin = Abundance-Abundance_se, colour = habitat)) + geom_point() + geom_pointrange() + coord_flip() #try splitting by habitat rfonly<- filter(species_densities, habitat == "1") dsonly<- filter(species_densities, habitat == "2") both<- filter(species_densities, habitat == "3") ggplot(data = rfonly, aes(Species, Abundance, ymax = Abundance+Abundance_se, ymin = Abundance-Abundance_se)) + geom_point() + geom_pointrange() + coord_flip() ggplot(data = dsonly, aes(Species, Abundance, ymax = Abundance+Abundance_se, ymin = Abundance-Abundance_se)) + geom_point() + geom_pointrange() + coord_flip() ggplot(data = both, aes(Species, Abundance, ymax = Abundance+Abundance_se, ymin = Abundance-Abundance_se)) + geom_point() + geom_pointrange() + coord_flip()
bbb4666d4f79f89a569434d303a011e9115e34d3
c1b66b5db23476c16ddd62b1afbcda48d4bde719
/cluster_analysis/opt_clust.R
0012fe32eb0bd6e0511b89a6e58e28fee4066b79
[]
no_license
venice-juanillas/eib-tools
38e19a67864fc70b8db29199db173f082c15cca1
4a946819ca1676c8947c3ac4ee92e71e0259fbaa
refs/heads/master
2020-03-18T06:17:22.384260
2018-05-22T09:08:26
2018-05-22T09:08:26
134,386,147
0
0
null
null
null
null
UTF-8
R
false
false
4,045
r
opt_clust.R
####################################################################### # Umesh Rosyara, April 10, 2018 # CIMMYT # optimum QTL: This function is used to do find optimum number of QTLs ###################################################################### rm(list = objects()); ls() # CLEAR 'WorkSpace' (R environment) library(optparse) option_list = list( make_option(c("-f", "--file"), type="character", default=NULL, help="dataset file name", metavar="input_file"), make_option(c("-m", "--method"), type="character", default="silhouette", help="the method to be used for estimating the optimal number of clusters", metavar="method "), make_option(c("-k", "--maxclust"), type="integer", default=2, help=" the maximum number of clusters to consider, must be at least 2", metavar="num of clusters "), make_option(c("-b", "--nboot"), type="integer", default=200, help="number of Monte Carlo (bootstrap) samples", metavar="num of groups "), make_option(c("-c", "--clusterfile"), type="character", default="cluster_file.txt", help="Cluster membership file[default= %default]", metavar="membership_file"), make_option(c("-g", "--graph"), type="character", default="graph.html", help="Graph File [default= %default]", metavar="graph_file") ); opt_parser = OptionParser(option_list=option_list); opt = parse_args(opt_parser); if (is.null(opt$file)){ print_help(opt_parser) stop("At least one argument must be supplied (input file).\n", call.=FALSE) } data1 <- read.csv(file = opt$file, header = TRUE, stringsAsFactors = FALSE) #data1 <- t(data) data1c <- data1[,-1] # PCA /cluster analysis works on numeric variables, so we need to code the AA=1, AB=0, BB=-1 or similar numerical encoding # imputation of missing values # this example is just imputing with mean, but the final should have better imputing algorithm # I think that was already in place at IRRI hackathan #impute with population mean data1i <- apply(data1c[,-1],1,function(x){ix <- which(is.na(x)); x[ix] <- mean(x,na.rm=T); return(x)}) # data with no missing value data2 <- t(data1i) rownames(data2) <- data1[,1] ################################################################## # Finding optimum number of clusters #Determining Optimal Clusters library(tidyverse) # data manipulation library(cluster) # clustering algorithms library(factoextra) # clustering algorithms & visualization set.seed(1234) # we need to wrap the function fviz_nbclust #fviz_nbclust(): Dertemines and visualize the optimal number of clusters using different methods: within cluster sums of squares, average silhouette and gap statistics. #fviz_nbclust(x, FUNcluster = NULL, method = c("silhouette", "wss","gap_stat"), diss = NULL, k.max = 10, nboot = 100, # verbose = interactive(), barfill = "steelblue", barcolor = "steelblue", # linecolor = "steelblue", print.summary = TRUE, ...) #User needs to choose the following options # x - data set # FUNcluster - allowed values: kmeans, cluster::pam, cluster::clara, cluster::fanny, hcut # method - the method to be used for estimating the optimal number of clusters. Possible values are "silhouette" (for average silhouette width), "wss" (for total within sum of square) and "gap_stat" (for gap statistics # k.max - the maximum number of clusters to consider, must be at least 2 # nboot - integer, number of Monte Carlo ("bootstrap") samples. Used only for determining the number of clusters using gap statistic. # Usage three different methods pdf(opt$graph) if(opt$method == "silhouette"){ output1 <- fviz_nbclust(data2, FUNcluster=kmeans, method = "silhouette", k.max = opt$maxclust) }else if(opt$method == "gap_stat"){ output1 <- fviz_nbclust(data2, FUNcluster=kmeans, method = "gap_stat",k.max = opt$maxclust, nboot = opt$nboot) }else if(opt$method == "wss"){ output1 <- fviz_nbclust(data2, FUNcluster=kmeans, method ="wss", k.max = opt$maxclust) } print(output1) dev.off()
1b525f2b1e8ee1b277560c8243d3e03d2ca9e29c
ffdea92d4315e4363dd4ae673a1a6adf82a761b5
/data/genthat_extracted_code/NISTunits/examples/NISTsqrFtTOsqrMeter.Rd.R
aa6f91ddb02690cd2f0f2657af0cb1be8592f16a
[]
no_license
surayaaramli/typeRrh
d257ac8905c49123f4ccd4e377ee3dfc84d1636c
66e6996f31961bc8b9aafe1a6a6098327b66bf71
refs/heads/master
2023-05-05T04:05:31.617869
2019-04-25T22:10:06
2019-04-25T22:10:06
null
0
0
null
null
null
null
UTF-8
R
false
false
202
r
NISTsqrFtTOsqrMeter.Rd.R
library(NISTunits) ### Name: NISTsqrFtTOsqrMeter ### Title: Convert square foot to square meter ### Aliases: NISTsqrFtTOsqrMeter ### Keywords: programming ### ** Examples NISTsqrFtTOsqrMeter(10)
2be2268a6b800ca061515b7b087704183f09dd22
949041354ceeea0eaf534ef0f108c43382279a23
/landscape.R
318198236ec0b5e8055ca6e92619b9deb546d4ed
[]
no_license
cbig/dsexplained
9b87a9647494b702771044be764e6555520a8f56
6e55e7862e351e746dac7aa7f04227ab2882079b
refs/heads/master
2021-01-10T13:33:47.587174
2015-10-12T12:45:59
2015-10-12T12:45:59
44,098,321
0
0
null
null
null
null
UTF-8
R
false
false
2,368
r
landscape.R
# Name: simulate_landscape.R # # Author: jlehtoma ############################################################################### ## Function create.landscape can be used to create landscapes of varying ## complexity. ## Params: ## x - matrix of coordinates, or vector of x coordinates ## y - vector of y coordinates ## z - vector of z coordinates ## model - string; describes the landscape model in ## c("simple", "random", "GaussRF") ## patches - logical; indicates whether distinct patches are created ## [NOT IMPLEMENTED] batch.create.landscape <- function(n, ...) { landscapes <- list() for (i in 1:n) { landscapes[[paste("feat", i, sep="")]] = create.landscape(...) } return(landscapes) } # Generic wrapper for calling different landscape models create.landscape <- function(x, y, z, ftype, patches=FALSE, ...) { ftypes <- c("simple", "random", "GaussRF") # Check the input data if (!is.vector(x) | !is.vector(y)) { msg = paste("Both x (", typeof(x), ") and y (", typeof(y), ") need to be vectors.", sep="") stop(msg) } # Check the supported types if (!ftype %in% ftypes){ msg <- paste("Type ", ftype, " not suitable. Use one of: ", ftypes) stop(msg) } switch(ftype, simple = create.simple.landscape(x, y, z, patches), random = create.random.landscape(x, y, z, patches), GaussRF = create.GaussRF.landscape(x, y, z, patches, ...)) } create.simple.landscape <- function(x, y, z, patches) { return("Simple") } create.random.landscape <- function(x, y, z, patches) { return("Random") } ## Create a landscape using Gaussian random field' ## Params: ## x - vector of x coordinates ## y - vector of y coordinates ## z - matrix of z values ... create.GaussRF.landscape <- function(x, y, z=NULL, patches, seed=0, model="stable", mean=0, variance=10, nugget=1, scale=10, alpha=1.0, positive=TRUE) { if (!require(RandomFields)) { stop("Package RandomFields must be installed in order to proceed.") } # If a seed is provided, use that to always provide similar landscape if (seed) { set.seed(seed) } #browser() # Parameters for GaussRF, see ?GaussRF for more details f <- GaussRF(x=x, y=y, model=model, grid=TRUE, param=c(mean, variance, nugget, scale, alpha)) # Get only positive values by adding minimun value to all elements if (positive) { f <- f + abs(min(f)) } return(f) }
fb2d27438f912c91e1b59f9b8ebad22b10144050
19e11f1eee51bf74e3c903490c1f8f962387e765
/tests/viterbi_test.R
dafb4c65c784ff764fa48ef49a5754de18f8fb60
[]
no_license
Una95Singo/MarketStates
8630040e7cfed3cc9b5e28d9f2ae235c849e0229
d7e4ba80f0f42a797e0b9fc8387ea1e735d068e9
refs/heads/master
2022-02-18T08:31:55.124928
2022-02-06T17:00:48
2022-02-06T17:00:48
235,183,871
0
0
null
null
null
null
UTF-8
R
false
false
4,442
r
viterbi_test.R
# Test script for the viterbi algorithm # una singo, SNGUNA003 # 9 January 2020 # import R functions ------------ source("R/viterbi.R") # libraries --------------------- library('tidyverse') library(readxl) # Test Case 1 ------------------- data = read_excel("data/Test/viterbiDataset.xlsx") vit = viterbi(D=data[, 2:5], K=4, gamma=400) vit # Test Case 2 ------------------- # Viterbi Algorithm using true estimates ----------------------------- data = read_excel("~/Desktop/viterbiDataset.xlsx",sheet = 'Sheet2') state1.distance = data$`True Distances`[1:10] state2.distance = data$`True Distances`[11:20] # Input D = cbind(state1.distance, state2.distance) gamma = 1 Time = nrow(D) K = 2 # initialize PrevCost = rep(0,K) CurrentCost = rep(0, K) FinalMinVal = NA FinalPath = NA PrevPath = list () PrevPath[[1]] = NA PrevPath[[2]] = NA CurrentPath = list() CurrentPath[[1]] = NA CurrentPath[[2]] = NA #PrevCost = D[1,] #PrevPath[[1]] = 1 #PrevPath[[2]] = 2 # looper for ( t in 1:Time){ for (k in 1:K){ MinVal = which(PrevCost == min(PrevCost))[1] if((PrevCost[MinVal]+gamma) > PrevCost[k]){ CurrentCost[k] = PrevCost[k] + D[t,k] CurrentCost = unlist(CurrentCost) CurrentPath[[k]] = c(PrevPath[[k]], k) } else{ CurrentCost[k] = PrevCost[MinVal] + gamma + D[t,k] CurrentCost = unlist(CurrentCost) CurrentPath[[k]] = c(PrevPath[[MinVal]], k) } } #update after iterating throuh the states. the paper updates before the state ends. PrevCost = CurrentCost PrevPath = CurrentPath } CurrentCost FinalMinVal = which(CurrentCost == min(CurrentCost))[1] FinalPath = CurrentPath[[FinalMinVal]] FinalPath = na.omit(FinalPath) FinalPath # Viterbi Algorithm using true estimates ----------------------------- data = read_excel("~/Desktop/viterbiDataset.xlsx",sheet = 'Sheet2') K = 2 # number of states Time = length(data$Observation) States = sample(c(1,2), size =Time, replace = T) ExpectationMaximisation = 1 State.history = matrix(nrow = ExpectationMaximisation, ncol = Time) Cost.history = c() for (EM in 1:ExpectationMaximisation) { States = sample(c(1,2), size =Time, replace = T) # state index state1.index = which(States==1) state2.index = which(States==2) # state returns state1.return = data$Observation[state1.index] state2.return = data$Observation[state2.index] # State sample statistics state1.mu = mean(state1.return) state2.mu = mean(state2.return) state1.sd = sd(state1.return) state2.sd = sd(state2.return) # Mahalanobis distance --------------------------------- state1.distance = ((data$Observation - state1.mu)^2/state1.sd^2) state2.distance = ((data$Observation - state2.mu)^2/state2.sd^2) # Input D = cbind(state1.distance, state2.distance) gamma = 1 Time = nrow(D) K = 2 # initialize PrevCost = rep(0,K) CurrentCost = rep(0, K) FinalMinVal = NA FinalPath = NA PrevPath = list () PrevPath[[1]] = NA PrevPath[[2]] = NA CurrentPath = list() CurrentPath[[1]] = NA CurrentPath[[2]] = NA #PrevCost = D[1,] #PrevPath[[1]] = 1 #PrevPath[[2]] = 2 # looper for ( t in 1:Time){ for (k in 1:K){ MinVal = which(PrevCost == min(PrevCost))[1] if((PrevCost[MinVal]+gamma) > PrevCost[k]){ CurrentCost[k] = PrevCost[k] + D[t,k] CurrentCost = unlist(CurrentCost) CurrentPath[[k]] = c(PrevPath[[k]], k) } else{ CurrentCost[k] = PrevCost[MinVal] + gamma + D[t,k] CurrentCost = unlist(CurrentCost) CurrentPath[[k]] = c(PrevPath[[MinVal]], k) } } #update after iterating throuh the states. the paper updates before the state ends. PrevCost = CurrentCost PrevPath = CurrentPath } CurrentCost FinalMinVal = which(CurrentCost == min(CurrentCost))[1] FinalPath = CurrentPath[[FinalMinVal]] FinalPath = na.omit(FinalPath) Cost.history = c(Cost.history, min(CurrentCost)) State.history[EM,] = unlist(FinalPath) } (state1.mu - state2.mu)^2 FinalPath state1.mu state2.mu # get mode getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] } hist(Cost.history) Final = which(Cost.history ==getmode(Cost.history)) State.history[Final,] apply(State.history,2, getmode) State.history[1:10,] # Test Case 3 -------------------
1c9eb611fab72ff2af9433c921ec39be52f131de
e6f1fbb059464a6e6580c13bfb12daddc6b45374
/MakeZipGraphOnNPI.R
a7175691520aa3579f3d5e5235a79895eb854bbc
[]
no_license
thuhale/AHClustering
f98e6ea47dab761dc5ea036ae6cfe8c7c9863e8e
3501799b71ad1d4e5cdd5e63ad8b000447ece007
refs/heads/master
2021-01-18T22:16:24.077827
2017-02-07T05:52:57
2017-02-07T05:52:57
72,385,602
0
0
null
null
null
null
UTF-8
R
false
false
1,853
r
MakeZipGraphOnNPI.R
rm(list = ls()) library(readr) library(Matrix) library(sparseAHC) library(zipcode) data(zipcode) library(geosphere) library(igraph) ##CUSTOM FUNCTION # reorganize the clus reorganize = function(df, clus){ col = which(colnames(df) == clus) unique_label = sort(unique(df[,col])) ind = c(1:length(unique(df[,col]))) mapping = data.frame(unique_label,ind) for(i in 1:length(mapping$unique_label)){ df[,col][df[,col] == mapping$unique_label[i]] = mapping$ind[i] } return(df) } makeMemMatrix = function(clus){ m = matrix(0, nrow = length(clus), ncol = length(unique(clus))) for (i in 1:length(unique(clus))){ m[,i][clus==i] = 1 } return(m) } makeMemList = function(m){ clus = apply(m, 1, function(x) which(x>0)) return(clus) } agg = read.csv("Data/CoreZip_clus.csv", colClasses = "character") hrr = read.csv("Data/ZipHsaHrr14.csv") hrr = hrr[, c("zipcode14", "hrrnum")] colnames(hrr) = c("zip", "hrr") hrr$zip = clean.zipcodes(hrr$zip) agg = merge(agg, hrr, by = "zip", all.x = T) #agg = agg[!is.na(agg$hrr),] agg = reorganize(agg, "hrr") ## label of agg needs from 1:k ##MAKE ZIP GRAPH short = read.csv("Data/NPI_zip.csv") ref = read_csv(file = "Data/physician-shared-patient-patterns-2014-days180.txt", col_names = F,col_types = "cciii") colnames(ref) = c("NPI", "NPI2", "Ties", "Unique", "Sameday") ref = ref[ref$NPI %in% short$NPI & ref$NPI2 %in% short$NPI,] ref = merge(ref, short, by = "NPI", all.x = T) ref = merge(ref, short, by.x = "NPI2", by.y = "NPI", all.x = T) colnames(ref)[6:7] = c("zip", "zip2") ref = ref[, c(2,1,3,4,5,6,7)] ref$zip = clean.zipcodes(ref$zip) ref$zip2 = clean.zipcodes(ref$zip2) tmp = ref[ref$zip %in% agg$zip & ref$zip2 %in% agg$zip, ] ref = tmp #make the graph g = graph.edgelist(as.matrix(ref[,6:7]), directed = F) E(g)$weight = ref$Unique g = simplify(g) save(g, file = "Data/Zip_Cluster.RData")
5a8f86881bdaa88e56d9d954040fbc8377933ada
55fe7eeb9397100fcd544c2b8bcecfcbcabdbb06
/REPSI_Tool_02.00_Mesaurement_Data/Query_99999_YYYY-MM-DD_HH-MI-SS.HS.R/Query_81002_2007-01-21_11-22-19.96.R
e0ccc80f76a90b047d608086f83ae78e43286b63
[ "Apache-2.0" ]
permissive
walter-weinmann/repsi-tool
d5e7b71838dc92d61c1a06a2c7f2541a0c807b32
5677cdf1db38672eff7f1abcf6dca677eb93a89c
refs/heads/master
2021-01-10T01:34:55.746282
2016-01-26T05:31:17
2016-01-26T05:31:17
49,252,156
0
0
null
null
null
null
UTF-8
R
false
false
1,458
r
Query_81002_2007-01-21_11-22-19.96.R
if (exists("A_A")) remove("A_A") if (exists("A_U")) remove("A_U") if (exists("C_A")) remove("C_A") if (exists("C_U")) remove("C_U") A_U<-c(3878102,3863925,3953180,3779476,4356739,3983607,3931598,3958639,3835372,4538178,4005537,3990393,3967956,3912965,3948423,4173723,4004452,4097618,5126453,3787584,3937871,3864664,3789573,4127359,3919709,3824347,3778638,3723743,3710992,3792414,3733278,3867896,3695111,3795197,3730392,3674430,3832837,3796981,4857877,3671992,3803738,3714972,3673536,3686582,3675477,3678518,4638083,3632263,4156708,3743290) A_A<-c(4243610,4485317,5651563,4010158,4075925,4270333,4262124,4180031,4765163,4250753,4237512,4883776,4409779,4211027,4131655,4146415,4395734,4102529,4565201,4391890,4065061,3976891,4016386,4877000,4056289,4117407,4040150,4252690,3989492,4056056,3961274,4343522,3937625,3936817,4125323,4154398,4000738,3963088,4062487,4508145,3911219,3920344,3908535,4163975,3876892,3912886,3973520,4202091,4097141,4244374) if (exists("A_U")) boxplot.stats(A_U) if (exists("A_A")) boxplot.stats(A_A) if (exists("C_U")) boxplot.stats(C_U) if (exists("C_A")) boxplot.stats(C_A) if (exists("A_U")) summary(A_U) if (exists("A_A")) summary(A_A) if (exists("C_U")) summary(C_U) if (exists("C_A")) summary(C_A) if (exists("A_U")) boxplot(A_A,A_U,col="lightblue",horizontal=TRUE,match=TRUE,names=c("(A_A)","(A_U)"),notch=TRUE) if (exists("C_U")) boxplot(C_A,C_U,col="lightblue",horizontal=TRUE,match=TRUE,names=c("(C_A)","(C_U)"),notch=TRUE)
7419854581469ee2d763e740d7760c3ee95111be
497153f9a15f53b5b2b4ce0d375ea7f9848d75bb
/src/06-CORUM_Shuffle_Results.R
fe92c61b5ab19e988d6a99710962b26c71f58189
[]
no_license
joshbiology/pan-meyers-et-al
b43b4299e56ff979fe4bce751574e7bbca8244d8
2d72ea626e2c8f4422cc5413bbd835f462a20a62
refs/heads/master
2022-01-07T00:16:14.916776
2018-05-18T19:26:57
2018-05-18T19:26:57
null
0
0
null
null
null
null
UTF-8
R
false
false
6,895
r
06-CORUM_Shuffle_Results.R
library(igraph) library(ggridges) library(ProjectTemplate) load.project(override.config = list(munging=F, cache_loading=F)) if (config$threads > 1) { library(doMC) registerDoMC(cores=config$threads) do_parallel <- T } else { do_parallel <- F } out_dir <- file.path("./output/empirical_shuffle", Sys.Date()) dir.create(out_dir, recursive=T, showWarnings=F) load("./cache/corum_list.RData") load("./cache/avana_dep_corr.RData") load("./cache/avana_2017_dep_corr.RData") load("./cache/gecko_dep_corr.RData") load("./cache/coxpres_db.RData") load("./cache/rnai_dep_corr.RData") load("./cache/wang_dep_corr.RData") corum_avana_shuffle <- readRDS("./data/interim/shuffle_corum_avana_10k.rds") corum_avana_2017_shuffle <- readRDS("./data/interim/shuffle_corum_avana_2017_10k.rds") corum_rnai_shuffle <- readRDS("./data/interim/shuffle_corum_rnai_10k.rds") corum_gecko_shuffle <- readRDS("./data/interim/shuffle_corum_gecko_10k.rds") corum_wang_shuffle <- readRDS("./data/interim/shuffle_corum_wang_10k.rds") corum_coxpr_shuffle <- readRDS("./data/interim/shuffle_corum_coxpr_10k.rds") corum_avana_dat <- prepare_dataset(avana_dep_corr, corum_list) corum_avana_2017_dat <- prepare_dataset(avana_2017_dep_corr, corum_list) corum_rnai_dat <- prepare_dataset(rnai_dep_corr, corum_list) corum_gecko_dat <- prepare_dataset(gecko_dep_corr, corum_list) corum_wang_dat <- prepare_dataset(wang_dep_corr, corum_list) corum_coxpr_dat <- prepare_dataset(coxpres_db, corum_list) rank_thresholds <- 2^(0:13) corum_avana_true <- run_int_ext_true(corum_avana_dat$edgelist, corum_avana_dat$genesets, rank_thresholds) corum_avana_true %>% edgedens_true_gg(title="CORUM mapped onto Avana Similarity Network") + ggsave(file.path(out_dir, "edgedens_true_corum_avana.pdf"), width=6, height=4) corum_avana_2017_true <- run_int_ext_true(corum_avana_2017_dat$edgelist, corum_avana_2017_dat$genesets, rank_thresholds) corum_avana_2017_true %>% edgedens_true_gg(title="CORUM mapped onto Avana2017 Similarity Network") + ggsave(file.path(out_dir, "edgedens_true_corum_avana_2017.pdf"), width=6, height=4) corum_rnai_true <- run_int_ext_true(corum_rnai_dat$edgelist, corum_rnai_dat$genesets, rank_thresholds) corum_rnai_true %>% edgedens_true_gg(title="CORUM mapped onto RNAi Similarity Network") + ggsave(file.path(out_dir, "edgedens_true_corum_rnai.pdf"), width=6, height=4) corum_coxpr_true <- run_int_ext_true(corum_coxpr_dat$edgelist, corum_coxpr_dat$genesets, rank_thresholds) corum_coxpr_true %>% edgedens_true_gg(title="CORUM mapped onto COXPRESdb Similarity Network") + ggsave(file.path(out_dir, "edgedens_true_corum_coexpressdb.pdf"), width=6, height=4) corum_gecko_true <- run_int_ext_true(corum_gecko_dat$edgelist, corum_gecko_dat$genesets, rank_thresholds) corum_gecko_true %>% edgedens_true_gg(title="CORUM mapped onto GeCKOv2 Similarity Network") + ggsave(file.path(out_dir, "edgedens_true_corum_gecko.pdf"), width=6, height=4) corum_wang_true <- run_int_ext_true(corum_wang_dat$edgelist, corum_wang_dat$genesets, rank_thresholds) corum_wang_true %>% edgedens_true_gg(title="CORUM mapped onto Wang2017 Similarity Network") + ggsave(file.path(out_dir, "edgedens_true_corum_wang.pdf"), width=6, height=4) corum_true <- bind_rows( corum_avana_true %>% mutate(Network="Avana"), corum_avana_2017_true %>% mutate(Network="Avana 2017"), corum_rnai_true %>% mutate(Network="RNAi"), corum_coxpr_true %>% mutate(Network="COXPRESdb"), corum_gecko_true %>% mutate(Network="GeCKOv2"), corum_wang_true %>% mutate(Network="Wang 2017") ) corum_shuffle <- bind_rows( corum_avana_shuffle %>% mutate(Network="Avana"), corum_avana_2017_shuffle %>% mutate(Network="Avana 2017"), corum_rnai_shuffle %>% mutate(Network="RNAi"), corum_coxpr_shuffle %>% mutate(Network="COXPRESdb"), corum_gecko_shuffle %>% mutate(Network="GeCKOv2"), corum_wang_shuffle %>% mutate(Network="Wang 2017") ) empirical_shuffle_results <- inner_join(corum_true, corum_shuffle) %>% group_by(Network, Rank, Geneset) %>% mutate(IntExtTrue = ifelse(is.nan(IntExtTrue), 0, IntExtTrue)) %>% summarise(N_Above = sum(ifelse(is.nan(unlist(IntExtShuffle)), 0 >= IntExtTrue, unlist(IntExtShuffle) >= IntExtTrue)), Total = length(unlist(IntExtShuffle))) %>% mutate(EmpiricalP = (N_Above+1)/(Total+1)) %>% group_by(Network) %>% mutate(FDR = p.adjust(EmpiricalP, method='fdr')) rank_fdrs <- empirical_shuffle_results %>% group_by(Network, Geneset) %>% summarise(BestFDR = min(FDR, na.rm=T), BestRank = Rank[FDR == BestFDR][1], FirstRank = min(Rank[FDR < 0.05], na.rm=T)) %>% group_by(Network) %>% arrange(FirstRank) %>% mutate(Recall = cumsum(BestFDR < 0.05)/length(corum_list)) write_tsv(rank_fdrs, ".data/interim/corum_shuffle_10k_results.tsv") rank_fdrs %>% filter(BestFDR < 0.05) %>% select(Network, Geneset) %>% write_tsv(".data/interim/corum_shuffle_10k_sig_genesets.tsv") ggplot(rank_fdrs, aes(FirstRank, Recall, color=Network)) + geom_hline(aes(yintercept=RecallFinal, color=Network), linetype=2, data=rank_fdrs %>% group_by(Network) %>% summarize(RecallFinal = sum(BestFDR<0.05) / length(corum_list))) + geom_line() + scale_y_continuous(limits=c(0, 0.5), expand=c(0, 0)) + scale_x_continuous(trans="log2", breaks=rank_thresholds) + labs(x="Rank Threshold", y="Recall of Complexes", title="CORUM mapped onto Similarity Networks") + ggsave(file.path(out_dir, "rank_recall_corum.pdf"), width=6, height=4) rank_fdrs %>% group_by(Network) %>% arrange(BestFDR) %>% mutate(Recall = cumsum(BestFDR < 1)/length(corum_list)) %>% ggplot(aes(Recall, 1-BestFDR, color=Network)) + geom_hline(yintercept=0.95, linetype=2) + geom_vline(aes(xintercept=RecallFinal, color=Network), linetype=2, data=rank_fdrs %>% group_by(Network) %>% summarize(RecallFinal = sum(BestFDR<0.05) / length(corum_list))) + geom_line() + scale_y_continuous(limits=c(0.5, 1.02), expand=c(0, 0)) + scale_x_continuous(expand=c(0, 0)) + labs(y="Precision", x="Recall", title="CORUM Precision-Recall in Similarity Networks") + ggsave(file.path(out_dir, "precision_recall_corum.pdf"), width=6, height=4)
4bbcc027882a9dc7f77b73de3a6cecac607871bd
eff63f358252d5fe474e215fd11c17bdf5e5f716
/man/tune_and_update.Rd
9449468d73c3e35cac9f7d37aad9b0683cd32845
[]
no_license
gabrielcrepeault/xgbmr
0fc50af27f93a2e469f4d50e770bb285641f9df9
50701662bf9900b6d1fc6fb631a9f887f92958fd
refs/heads/master
2020-09-13T13:45:34.814325
2019-12-21T11:50:08
2019-12-21T11:50:36
222,803,677
4
1
null
null
null
null
UTF-8
R
false
true
1,104
rd
tune_and_update.Rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tune_and_update.R \name{tune_and_update} \alias{tune_and_update} \title{tune_and_update} \usage{ tune_and_update(learner, task, param_set, plot = T, show.info = T, root) } \arguments{ \item{learner}{Un objet R de classe "Learner"} \item{task}{Un objet R de class "Task"} \item{param_set}{Un objet R de classe "ParamSet"} \item{plot}{indicateur pour indiquer si on veut produire un graphique résumé de la procédure CV5} \item{export}{indicateur pour indiquer si on veut sauvegarder dans un fichier .rda l'objet TuneResult (lorsque c'est long à rouler, c'est intéressant de sauvegarder des résultats intermédiaires.} } \value{ Une liste contenant un graphique, l'objet TuneResult, le data.frame ayant permi de créer le graphique et le nouvel objet Learner mis à jour avec la valeur optimale du paramètre. } \description{ Fonction pour wrapper la fonction tuneParams de mlr avec les différents paramètres à fixer. Ça réduit le code dans le fichier principal de tuning. } \author{ Gabriel Crépeault-Cauchon }
0bca72f3bbd87fcebf9f6eb00cbbaed89a726b80
c89182ec5149c2959bd2ec41e4bcdf754c10e3fb
/cashematrixexample.R
a60f9c8320bb2793002976bacc725d24f10b6542
[]
no_license
DmitryFesenko/ProgrammingAssignment2
b576222bb3b8fa6c04f599d79558074f04d853a0
7f944a2392368a71b8afcf339b3d7e7fa4bc538b
refs/heads/master
2021-01-12T06:38:48.246118
2017-01-01T20:18:08
2017-01-01T20:18:08
77,404,305
0
0
null
2016-12-26T20:01:31
2016-12-26T20:01:31
null
UTF-8
R
false
false
934
r
cashematrixexample.R
makeVector <- function(x = numeric()) { m <- NULL #begins by setting the mean to NULL as a placeholder for a future value set <- function(y) { x <<- y #defines a function to set the vector, x, to a new vector, y, m <<- NULL #and resets the mean, m, to NULL } get <- function() x #returns the vector, x setmean <- function(mean) m <<- mean #sets the mean, m, to mean getmean <- function() m #returns the mean, m list(set = set, get = get, #returns the 'special vector' containing all of the functions just defined setmean = setmean, getmean = getmean) } cachemean <- function(x, ...) { m <- x$getmean() if(!is.null(m)) { message("getting cached data") return(m) } data <- x$get() m <- mean(data, ...) x$setmean(m) m }
96c34bf6648fe5652ce1bf025bea1f2dfae892b2
1fa56b40529a4b720d6e3a5b4720d3e2e47e5c8d
/test.R
f02f5306bfbb944334009499a0a366134ce54c3f
[ "MIT" ]
permissive
elserch/findYourWine
f0364aa945efa73f06773fc1e50da50f52674d0f
0a551bd64aea4b1747421b61495d3dfa3b6ce2d2
refs/heads/master
2020-03-22T15:19:20.005615
2018-09-16T20:22:19
2018-09-16T20:22:19
140,243,832
0
0
null
null
null
null
UTF-8
R
false
false
3,153
r
test.R
install.packages("dplyr", dependencies = TRUE) install.packages("ggplot2") install.packages("forcats") install.packages("DT") install.packages("ggformula") #install.packages("ddply") library(ggplot2) library(dplyr) library(ggformula) # load file wine_reviews <- read.csv("/Users/christianelser/github/findYourWine/winemag-data_first150k.csv") # filter all out without price value all_with_price <- select(filter(wine_reviews, trimws(price) !=""), c(country, points, price, variety)) # add column ratio all_with_price <- transform(all_with_price, price_points_ratio = price / points) View(all_with_price) # get average points per country average_points_country <- all_with_price %>% group_by(country) %>% summarise(mean_points = mean(points)) View(average_points_country) average_points_country_variety <- all_with_price %>% group_by(.dots=c("country", "variety")) %>% summarize(mean_points = mean(points)) View(average_points_country_variety) average_price_points_ratio_country_variety <- all_with_price %>% group_by(.dots=c("country", "variety")) %>% summarize(mean_price_points_ratio = mean(price_points_ratio )) View(average_points_country_variety) all_countries <- unique(all_with_price$country) View(all_countries) all_countries_count <- table(all_with_price$country) View(all_countries_count) all_countries_list <- as.list(as.data.frame(t(all_countries))) View(all_countries_list) all_with_price_sorted <- all_with_price[order(price_points_ratio),] all_with_price_output <- select(filter(all_with_price, trimws(points) < 91), c(country, points, price, price_points_ratio, variety)) View(all_with_price_output) SnZ <- aggregate(crime, by = list(Straftat = crime$Straftat, Zeit = crime$time.tag), FUN = length) names(SnZ) <- c("Straftat", "Zeit", "Count") ggplot(SnZ, aes(x= Straftat , y= factor(Zeit))) + geom_tile(aes(fill= Count)) + scale_x_discrete("Straftat", expand = c(0,0)) + scale_y_discrete("Zeitraum", expand = c(0,-2)) + scale_fill_gradient("Anzahl Straftaten", low = "gray", high = "red") + theme_bw() + ggtitle("Straftaten nach Tageszeit") + theme(panel.grid.major = element_line(colour = NA), panel.grid.minor = element_line (colour = NA)) library(ggplot2) #------------------ # CREATE DATA FRAME #------------------ df.team_data <- expand.grid(teams = c("Team A", "Team B", "Team C", "Team D") ,metrics = c("Metric 1", "Metric 2", "Metric 3", "Metric 4", "Metric 5") ) # add variable: performance set.seed(41) df.team_data$performance <- rnorm(nrow(df.team_data)) #inspect head(df.team_data) #--------------------------- # PLOT: heatmap # - here, we use geom_tile() #--------------------------- ggplot(data = df.team_data, aes(x = metrics, y = teams)) + geom_tile(aes(fill = performance)) p + theme_grey(base_size = base_size) + labs(x = "", y = "") + scale_x_discrete(expand = c(0, 0)) + scale_y_discrete(expand = c(0, 0)) + opts(legend.position = "none", axis.ticks = theme_blank(), axis.text.x = theme_text(size = base_size * 0.8, angle = 330, hjust = 0, colour = "grey50")) plot <- gf_point(price ~ points, data = all_with_price) View(plot)
d36cc90bf9ed7ed95fb9291f2b655b148ab868a5
be66c01c8da7d84562f54195ffedc26488362db0
/TwitterAnalysis.r
017fa71c5d2d951ada1e67682f5571a12fadc037
[]
no_license
ashwin-srinivas7/Twitter-Flu-Trends
2035d2c2d410a543959e4864f21d01abd6c30d1a
b75740e6551b94bbf4f1392151879ecccf954d9b
refs/heads/master
2020-12-09T14:40:08.855719
2020-01-14T06:39:29
2020-01-14T06:39:29
233,336,731
0
0
null
null
null
null
UTF-8
R
false
false
6,401
r
TwitterAnalysis.r
setwd("D:/Study Material/Projects/Twitter Flu Analysis/Outputs") # ------------ Install and load all libraries if (!requireNamespace("devtools", quietly = TRUE)) { install.packages("devtools") } devtools::install_github("mkearney/rtweet") #install dev version of rtweet install.packages("httpuv") install.packages("stringi") # for using stri_enc_toutf8() to encode the string library(stringi) library(rtweet) library(ggmap) library(RJSONIO) library(ggplot2) library(maps) # --------- Create the twitter token using create_token() for accessing twitter data ## Before doing that, set the callback URL for the application in dev.twitter.com as http://127.0.0.1:1410 appname <- "Ash_Lab1" key <- "XGrXBWBAL5HnqdlDm9LNTiN6C" secret <- "BQaArLP6Lsc7RGDNQa7QhTWx8tN0c7xGxhz5lDppfX9ZVmqHrU" twitter_token <- create_token( app = appname, consumer_key = key, consumer_secret = secret) ## ---------- Test code to extract tweets with #seattle #rt <- data.frame(search_tweets( # "#seattle", n = 180, include_rts = FALSE #)) #rt <- apply(rt,2,as.character) #include this line to avoid error while exporting to csv #write.csv(rt,file="rt.csv") #head(rt) #class(rt) #--------------------------------------------------------- #come up with keywords for twitter searches about flu t_keys <- cbind("flu sick", "flu vaccine", "flu virus", "flu ill", "flu doctor", "flu symptom", "fly doctor", "flu season", "flu outbreak", "flu cases", "flu areas", "flu foods", "flu effects", "flu fever", "flu cough", "flu catch", "flu feeling", "flu hospital", "flu type", "flu influenza", "flu contagious", "flu sucks") for(i in 1:22) { tweet_info <- search_tweets(t_keys[,i], geocode = lookup_coords("usa"), retryonratelimit = TRUE,include_rts = FALSE, n=10000) user_info <- users_data(tweet_info) ai <- paste("A", i, sep = "") bi <- paste("B", i, sep = "") assign(ai, tweet_info) assign(bi, user_info) } twitter_data <- rbind(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16,A17,A18,A19,A20,A21,A22) twitter_data<- apply(twitter_data,2,as.character) twitter_data <- data.frame(twitter_data) save_as_csv(twitter_data,"twitter_data.csv") user_data <- rbind(B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22) user_data<- apply(user_data,2,as.character) user_data <- data.frame(user_data) user_data$location = tolower(user_data$location) #convert locations to lowercase save_as_csv(user_data,"finalUser_data.csv") userData_locations <- user_data$location ##store the locations in a different vector userData_locations <- userData_locations[userData_locations!=""] #remove blank values from this vector head(userData_locations) write.csv(userData_locations,"userlocations.csv") #cleaned data - removed special characters manually on Excel register_google(key="AIzaSyAreX0LejrXWQqZqYQbFMfCmxFLVI6zFPE") #register with google before using geocode to get latitude and longitude latlon_locations <- c() head(latlon_locations) userData_locations <- read.csv(file.choose()) # userlocations.csv - manually clean this file. remove special ASCII characers from location head(userData_locations) userData_locations <- apply(userData_locations,2,as.character) userData_locations <- userData_locations[userData_locations!=""] latlon_locations <- geocode(userData_locations) ##get latitude and longitude using google API head(latlon_locations) latlon_locations <- apply(latlon_locations,2,as.character) write.csv(latlon_locations,"coordinatesOfTweets.csv") ## ----------------------- REVERSE GEOCODING (convert lat lon coordinates into states) latlon_locations <- read.csv(file.choose()) #choose "coordinatesOfTweets.csv. Did this as my global environment was cleared. latlon_locations <- latlon_locations[complete.cases(latlon_locations), ] #keep only complete cases i.e. remove NA rows # latlon_locations[1,] ## drop the first column drops <- c("X") latlon_locations <- latlon_locations[ , !(names(latlon_locations) %in% drops)] ## swap the latitude and longitutes as the API takes latitude and longitude temp <- latlon_locations$lon latlon_locations$lon <- latlon_locations$lat latlon_locations$lat <- temp ## Note that the column labels will not change. only the values will be swapped. nrow(latlon_locations) data.json <- c() i<-0 for(i in 1:23503){ #replace the spaces with %20 and append the lat lon string. This is going to be appended to the URL below to obtain the political area data latlngStr <- gsub(' ','%20', paste(latlon_locations[i,], collapse=",")) #collapse the commas as it is a csv #when the lat lon string is appended to this URL, the API will obtain data in the JSON format connectStr <- paste("http://www.datasciencetoolkit.org/coordinates2politics/",latlngStr, sep="") con <- url(connectStr) data.json[i] <- fromJSON(paste(readLines(con), collapse="")) close(con) } data.json1 <- data.json d <- unlist(data.json1) i <- 0 j <- c() for(i in 1:length(d)){ if(d[i] == "state"){ j <- rbind(j,d[i+1]) ## Bind all the states together into vector j from the JSON object } } write.table(j,"FinalLocationsList.csv") j1 <- read.csv(file.choose()) ##Closed workspace so choose the file "FinalLocationsList.csv head(j1) j1$count <- rep(1,nrow(j1)) # make new column called "count" and give value 1 to each row to count agg_j1 <- aggregate(newcol ~ politics.name, data = j1, FUN = function(x)sum(x, na.rm = TRUE)) head(agg_j1) nrow(agg_j1) head(j1) write.csv(agg_j1,"FinalCountOfStates.csv") states <- map_data("state") agg_j1$region <- tolower(agg_j1$State) map.df <- merge(states,agg_j1, by="region", all.x=T) ## Merge the states obtaines from JSON to the "state" object by region head(map.df) map.df <- map.df[order(map.df$order),] # ----------- Plot the heatmap map1 <- ggplot(map.df, aes(x = long, y = lat, group = group))+ geom_polygon(aes(fill=count))+ coord_map()+ggtitle("2018-19 Influenza Season Twitter Data")+ theme(plot.title = element_text(hjust = 0.5))+ guides(fill=guide_legend(title="Activity Level")) map1
363b9c28b8610515135c921c3734b3bac79a9db6
df28d71337c2d4551fdb0e1b02c4d7e26ad5c58e
/ARIMA_Aviation.R
ad8a5851dc93a9f718511cb3859c20acea1d040c
[]
no_license
AkshayChopade07/R-Codes
891242066d95cbfd7724975b3ea3344a8bff8f72
6d8a2737ce6a6ae139846458677453ee390f6a15
refs/heads/master
2023-04-29T12:41:19.215814
2021-05-20T06:47:49
2021-05-20T06:47:49
263,832,190
0
0
null
null
null
null
UTF-8
R
false
false
894
r
ARIMA_Aviation.R
install.packages(c("forecast","fpp","smooth","tseries")) library(forecast) library(fpp) library(smooth) library(tseries) # Converting data into time series object # Loading Aviation Data aviation<-read.csv("C:/Users/Immortal/Documents/R/Aviation.CSV") # Aviation.csv View(aviation) amts<-ts(aviation$Sales,frequency = 4,start=c(86)) View(amts) plot(amts) #dividing entire data into training and testing data train<-amts[1:38] test<-amts[39:42] # Considering only 4 Quarters of data for testing because data itself is Quarterly # seasonal data # converting time series object train<-ts(train,frequency = 4) test<-ts(test,frequency = 4) plot(train) acf(train) pacf(train) # Auto.Arima model on the price agg data library(forecast) model_AA <- auto.arima(train) model_AA acf(model_AA$residuals) windows() plot(forecast(model_AA,h=4),xaxt="n") #xaxt- x axis text
2de6c17f68cecd0527a79290a4899dc642c30665
dbe8b293b4654cac8ab2f1be4febd54eef4a45a9
/R/spCdfplot.R
f2aa4291acb5f6c52ddc78aa5145462fbbfb78f8
[]
no_license
cran/simPopulation
2555bda823b1e2190a7a76881fa3254d350a8ea2
fcd172cf8c91d1b23ee29fa4e52a111ed08fb72b
refs/heads/master
2021-01-19T14:58:56.505267
2013-12-10T00:00:00
2013-12-10T00:00:00
17,699,673
0
1
null
null
null
null
UTF-8
R
false
false
7,126
r
spCdfplot.R
# --------------------------------------- # Author: Andreas Alfons # Vienna University of Technology # --------------------------------------- spCdfplot <- function(x, ...) UseMethod("spCdfplot") spCdfplot.default <- function(x, weights = NULL, cond = NULL, dataS, dataP = NULL, approx = NULL, n = 10000, bounds = TRUE, ...) { ## initializations if(!is.character(x) || length(x) == 0) { stop("'x' must be a character vector of positive length") } if(!is.null(weights) && (!is.character(weights) || length(weights) > 1)) { stop("'weights' must be a single character string or NULL") } if(!is.null(cond) && !is.character(cond)) { stop("'cond' must be a character vector or NULL") } if(!inherits(dataS, "data.frame")) stop("'dataS' must be a data.frame") # check if 'dataP' is valid if(!is.null(dataP) && !inherits(dataP, "data.frame")) { if(ok <- inherits(dataP, "list")) { if(length(dataP)) ok <- all(sapply(dataP, inherits, "data.frame")) else dataP <- NULL } if(!ok) stop("'data' must be a data.frame or a list of data.frames") } nP <- if(inherits(dataP, "data.frame")) 2 else 1+length(dataP) # check 'approx' if(is.null(approx)) approx <- !is.null(dataP) else if(!is.logical(approx) || length(approx) == 0) approx <- FALSE if(is.null(dataP)) { if(length(approx) > 1) approx <- isTRUE(approx[1]) } else { if(length(approx) == 1) { approx <- c(FALSE, rep.int(isTRUE(approx), nP-1)) } else approx <- c(isTRUE(approx[1]), rep.int(isTRUE(approx[2]), nP-1)) } # check 'n' if(any(approx) && (!is.numeric(n) || length(n) == 0)) { stop("'n' is not numeric or does not have positive length") } if(is.null(dataP)) { if(length(n) > 1) n <- if(approx) n[1] else NA } else { if(length(n) == 1) n <- ifelse(approx, n, NA) else n <- c(if(approx[1]) n[1] else NA, ifelse(approx[-1], n[2], NA)) } # check 'bounds' bounds <- isTRUE(bounds) # define labels for grouping variable if(is.null(dataP)) lab <- "" else { pop <- "Population" if(!inherits(dataP, "data.frame")) { nam <- names(dataP) if(is.null(nam)) pop <- paste(pop, 1:(nP-1)) else { replace <- which(nchar(nam) == 0) nam[replace] <- paste(pop, replace) pop <- nam } } lab <- c("Sample", pop) } ## construct objects for 'xyplot' # from sample tmp <- getCdf(x, weights, cond, dataS, approx=approx[1], n=n[1], name=lab[1]) values <- tmp$values app <- t(tmp$approx) # from population(s) if(!is.null(dataP)) { if(inherits(dataP, "data.frame")) { tmp <- getCdf(x, NULL, cond, dataP, approx=approx[2], n=n[2], name=lab[2]) values <- rbind(values, tmp$values) app <- rbind(app, tmp$approx) } else { tmp <- mapply(function(dP, approx, n, l) { getCdf(x, NULL, cond, dP, approx=approx, n=n, name=l) }, dataP, approx[-1], n[-1], lab[-1], SIMPLIFY=FALSE, USE.NAMES=FALSE) values <- rbind(values, do.call(rbind, lapply(tmp, function(x) x$values))) app <- rbind(app, do.call(rbind, lapply(tmp, function(x) x$approx))) } } ## construct formula for 'xyplot' form <- ".y~.x" # basic formula if(length(x) > 1) cond <- c(".var", cond) if(!is.null(cond)) { cond <- paste(cond, collapse = " + ") # conditioning variabels form <- paste(form, cond, sep=" | ") # add conditioning to formula } ## define local version of 'xyplot' localXyplot <- function(form, values, xlab = NULL, ylab = NULL, auto.key = TRUE, ..., # these arguments are defined so that they aren't supplied twice: x, data, allow.multiple, outer, panel, prepanel, groups) { # prepare legend if(isTRUE(auto.key)) auto.key <- list(points=FALSE, lines=TRUE) else if(is.list(auto.key)) { if(is.null(auto.key$points)) auto.key$points <- FALSE if(is.null(auto.key$lines)) auto.key$lines <- TRUE } # this produces a 'NOTE' during 'R CMD check': # xyplot(form, data=values, groups=if(nP == 1) NULL else .name, # panel=panelSpCdfplot, prepanel=prepanelSpCdfplot, # xlab=xlab, ylab=ylab, auto.key=auto.key, ...) command <- paste("xyplot(form, data=values,", "groups=if(nP == 1) NULL else .name,", "panel=panelSpCdfplot, prepanel=prepanelSpCdfplot,", "xlab=xlab, ylab=ylab, auto.key=auto.key, ...)") eval(parse(text=command)) } ## call 'xyplot' localXyplot(as.formula(form), values, approx=app, bounds=bounds, ...) } ## panel function panelSpCdfplot <- function(x, y, approx, bounds = TRUE, ...) { if(isTRUE(bounds)) { panel.refline(h=0, ...) panel.refline(h=1, ...) } localPanelXyplot <- function(..., approx, type, distribute.type) { i <- packet.number() type <- ifelse(approx[,i], "l", "s") panel.xyplot(..., type=type, distribute.type=TRUE) } localPanelXyplot(x, y, approx=approx, ...) } ## prepanel function prepanelSpCdfplot <- function(x, y, ...) list(ylim=c(0,1)) ## internal utility functions # get data.frame and logical indicating approximation getCdf <- function(x, weights = NULL, cond = NULL, data, ..., name = "") { if(is.null(cond)) { x <- data[, x] w <- if(length(weights) == 0) NULL else data[, weights] prepCdf(x, w, ..., name=name) } else { tmp <- tapply(1:nrow(data), data[, cond, drop=FALSE], function(i) { x <- data[i, x] w <- if(length(weights) == 0) NULL else data[i, weights] g <- unique(data[i, cond, drop=FALSE]) res <- prepCdf(x, w, ..., name=name) res$values <- cbind(res$values, g[rep.int(1, nrow(res$values)), , drop=FALSE]) res }) values <- do.call(rbind, lapply(tmp, function(x) x$values)) approx <- as.vector(sapply(tmp, function(x) x$approx)) list(values=values, approx=approx) } } # prepare one or more variables prepCdf <- function(x, w, ..., name = "") UseMethod("prepCdf") prepCdf.data.frame <- function(x, w, ..., name = "") { tmp <- lapply(x, prepCdf, w, ..., name=name) values <- mapply(function(x, v) cbind(x$values, .var=v), tmp, names(x), SIMPLIFY=FALSE, USE.NAMES=FALSE) values <- do.call(rbind, values) approx <- sapply(tmp, function(x) x$approx) list(values=values, approx=approx) } prepCdf.default <- function(x, w, ..., name = "") { tmp <- spCdf(x, w, ...) values <- data.frame(.x=c(tmp$x[1], tmp$x), .y=c(0, tmp$y), .name=name) list(values=values, approx=tmp$approx) }