diff --git a/nglview/static/35d57320d9df28ec0d0d8bd1b5c75983.png b/nglview/static/35d57320d9df28ec0d0d8bd1b5c75983.png new file mode 100644 index 00000000..bbb422fe Binary files /dev/null and b/nglview/static/35d57320d9df28ec0d0d8bd1b5c75983.png differ diff --git a/nglview/static/5cbbd560bcf30acb95dd3b0b0d61645a.png b/nglview/static/5cbbd560bcf30acb95dd3b0b0d61645a.png new file mode 100644 index 00000000..89201939 Binary files /dev/null and b/nglview/static/5cbbd560bcf30acb95dd3b0b0d61645a.png differ diff --git a/nglview/static/92bef7e45fed3caba8dc9348edef4df2.png b/nglview/static/92bef7e45fed3caba8dc9348edef4df2.png new file mode 100644 index 00000000..1cba4313 Binary files /dev/null and b/nglview/static/92bef7e45fed3caba8dc9348edef4df2.png differ diff --git a/nglview/static/d1b818587c3bc65058fe43800e4a191c.png b/nglview/static/d1b818587c3bc65058fe43800e4a191c.png new file mode 100644 index 00000000..df4e3737 Binary files /dev/null and b/nglview/static/d1b818587c3bc65058fe43800e4a191c.png differ diff --git a/nglview/static/extension.js b/nglview/static/extension.js new file mode 100644 index 00000000..fd01ea49 --- /dev/null +++ b/nglview/static/extension.js @@ -0,0 +1 @@ +define((()=>{return e={252:e=>{window.require&&window.require.config({map:{"*":{"nglview-js-widgets":"nbextensions/nglview-js-widgets/index"}}}),e.exports={load_ipython_extension:function(){}}}},n={},function i(r){var o=n[r];if(void 0!==o)return o.exports;var t=n[r]={exports:{}};return e[r](t,t.exports,i),t.exports}(252);var e,n})); \ No newline at end of file diff --git a/nglview/static/f423048bf942a7a33b33b1b982ecdb51.png b/nglview/static/f423048bf942a7a33b33b1b982ecdb51.png new file mode 100644 index 00000000..ee49e9e5 Binary files /dev/null and b/nglview/static/f423048bf942a7a33b33b1b982ecdb51.png differ diff --git a/nglview/static/f5d5fce2f36b5776eab8b314efc2dfd8.png b/nglview/static/f5d5fce2f36b5776eab8b314efc2dfd8.png new file mode 100644 index 00000000..b01ff3de Binary files /dev/null and b/nglview/static/f5d5fce2f36b5776eab8b314efc2dfd8.png differ diff --git a/nglview/static/index.js b/nglview/static/index.js new file mode 100644 index 00000000..4e14e73a --- /dev/null +++ b/nglview/static/index.js @@ -0,0 +1,3 @@ +/*! For license information please see index.js.LICENSE.txt */ +define(["@jupyter-widgets/base"],(__WEBPACK_EXTERNAL_MODULE__2055__=>(()=>{var __webpack_modules__={2555:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseView=void 0;const widgets=__webpack_require__(2055);var NGL=__webpack_require__(485);class BaseView extends widgets.DOMWidgetView{render(){this.isEmbeded()||(this.handleMessage(),this.displayed.then((()=>{this.model.set("_ready",!0),this.touch()})))}executeCode(code){eval(code)}handleMessage(){this.model.on("msg:custom",function(e){this.on_msg(e)}.bind(this))}on_msg(e){"callMethod"==e.type&&(console.log("from BaseView",e),this[e.methodName].apply(this,e.args,e.kwargs))}isEmbeded(){return null==this.model.comm}}exports.BaseView=BaseView},5211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColormakerRegistryView=t.ColormakerRegistryModel=void 0;const i=n(431),r=n(485),s=n(2555),o=n(2055);class a extends o.DOMWidgetModel{defaults(){return i.extend(o.DOMWidgetModel.prototype.defaults(),{_model_name:"ColormakerRegistryModel",_model_module:"nglview-js-widgets",_model_module_version:n(8330).version,_view_name:"ColormakerRegistryView",_view_module:"nglview-js-widgets",_view_module_version:n(8330).version})}}t.ColormakerRegistryModel=a;class l extends s.BaseView{render(){super.render(),this.isEmbeded()&&(console.log("Embed mode for ColormakerRegistryView"),this.handleEmbed())}handleEmbed(){this.model.get("_msg_ar").forEach((e=>{this.on_msg(e)}))}addSelectionScheme(e,t){var n=r.ColormakerRegistry.addSelectionScheme(t,e);this._updateId(n,e)}addSelectionSchemeOriginal(e,t){var n=r.ColormakerRegistry.addSelectionScheme(t,e),i=r.ColormakerRegistry.userSchemes[n];r.ColormakerRegistry.removeScheme(n),r.ColormakerRegistry.add(e,i)}addScheme(e,t){var n=Function("return "+t)(),i=r.ColormakerRegistry.addScheme((function(e){this.atomColor=n}));this._updateId(i,e)}_updateId(e,t){var n=r.ColormakerRegistry.userSchemes[e];r.ColormakerRegistry.add(t,n),r.ColormakerRegistry.removeScheme(e)}}t.ColormakerRegistryView=l},6219:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FullscreenView=exports.ABC=exports.FullscreenModel=void 0;const widgets=__webpack_require__(2055),NGL=__webpack_require__(485),base_1=__webpack_require__(2555);class FullscreenModel extends widgets.DOMWidgetModel{defaults(){return Object.assign(Object.assign({},super.defaults()),{_model_name:"FullscreenModel",_model_module:"nglview-js-widgets",_model_module_version:__webpack_require__(8330).version,_view_name:"FullscreenView",_view_module:"nglview-js-widgets",_view_module_version:__webpack_require__(8330).version})}}exports.FullscreenModel=FullscreenModel;class ABC{}exports.ABC=ABC;class FullscreenView extends base_1.BaseView{render(){this.stage=new NGL.Stage(null,null);var e=this;this.model.on("msg:custom",(function(t){e.on_msg(t)})),this.handleSignals()}fullscreen(e){var t=this;this.model.widget_manager.get_model(e).then((e=>{var n=Object.keys(e.views)[0];e.views[n].then((e=>{t.stage.toggleFullscreen(e.el)}))}))}handleSignals(){var e=this;this.stage.signals.fullscreenChanged.add((function(t){e.model.set("_is_fullscreen",t),e.touch()}))}executeCode(code){eval(code)}on_msg(e){"executeCode"in e&&this.executeCode(e.executeCode)}}exports.FullscreenView=FullscreenView},5587:(e,t,n)=>{var i,r=n(485),s=n(4197).UI,o=n(1147);HTMLElement.prototype.getBoundingClientRect=(i=HTMLElement.prototype.getBoundingClientRect,function(){try{return i.apply(this,arguments)}catch(e){return{top:0,left:0,width:this.width,height:this.height}}}),r.Widget=function(){},r.Widget.prototype={constructor:r.Widget},r.createParameterInput=function(e,t){if(e){var n,i=void 0===t?e.value:t;return"number"===e.type?n=new s.Number(0).setRange(e.min,e.max).setPrecision(e.precision).setValue(parseFloat(i)):"integer"===e.type?n=new s.Integer(parseInt(i)).setRange(e.min,e.max):"range"===e.type?n=new s.Range(e.min,e.max,i,e.step).setValue(parseFloat(i)):"boolean"===e.type?n=new s.Checkbox(i):"text"===e.type?n=new s.Input(i):"select"===e.type?n=(new s.Select).setWidth("").setOptions(e.options).setValue(i):"color"===e.type?n=new s.ColorPopupMenu(e.label).setValue(i):"vector3"===e.type?n=new s.Vector3(i).setPrecision(e.precision):"hidden"===e.type||console.warn("NGL.createParameterInput: unknown parameter type '"+e.type+"'"),n}},r.Preferences=function(e,t){this.signals={keyChanged:new o.Signal},this.id=e||"ngl-gui";var n=Object.assign({},t);for(var i in this.storage={impostor:!0,quality:"auto",sampleLevel:0,theme:"dark",backgroundColor:"black",overview:!1,rotateSpeed:2,zoomSpeed:1.2,panSpeed:.8,clipNear:0,clipFar:100,clipDist:10,fogNear:50,fogFar:100,cameraFov:40,cameraType:"perspective",lightColor:14540253,lightIntensity:1,ambientColor:14540253,ambientIntensity:.2,hoverTimeout:0},this.storage)void 0!==n[i]&&(this.storage[i]=n[i])},r.Preferences.prototype={constructor:r.Preferences,getKey:function(e){return this.storage[e]},setKey:function(e,t){this.storage[e]=t,this.signals.keyChanged.dispatch(e,t)}},r.ViewportWidget=function(e){var t=e.viewer,n=(t.renderer,new s.Panel);n.dom=t.container,n.setPosition("absolute");var i=r.flatten([r.ParserRegistry.getStructureExtensions(),r.ParserRegistry.getVolumeExtensions(),r.ParserRegistry.getSurfaceExtensions(),r.DecompressorRegistry.names]);return n.dom.addEventListener("dragover",(function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy"}),!1),n.dom.addEventListener("drop",(function(t){t.stopPropagation(),t.preventDefault(),new r.Queue((function(t,n){var s=t.name.split(".").pop().toLowerCase();r.ScriptExtensions.includes(s)?e.loadScript(t).then(n):i.includes(s)?e.loadFile(t,{defaultRepresentation:!0}).then(n):(console.error("unknown filetype: "+s),n())}),t.dataTransfer.files)}),!1),n},r.ToolbarWidget=function(e){var t=new s.Panel,n=new s.Text,i=(new s.Panel).setDisplay("inline").setFloat("left").add(n),o=new s.Text,a=(new s.Panel).setDisplay("inline").setFloat("right").add(o);return e.signals.clicked.add((function(e){n.setValue(e?e.getLabel():"nothing")})),e.viewer.stats.signals.updated.add((function(){r.Debug?o.setValue(e.viewer.stats.lastDuration.toFixed(2)+" ms | "+e.viewer.stats.lastFps+" fps"):o.setValue("")})),t.add(i,a),t},r.MenubarWidget=function(e,t){var n=new s.Panel;return n.add(new r.MenubarFileWidget(e)),n.add(new r.MenubarViewWidget(e,t)),r.examplesListUrl&&r.examplesScriptUrl&&n.add(new r.MenubarExamplesWidget(e)),n.add(new r.MenubarHelpWidget(e,t)),n.add((new s.Panel).setClass("menu").setFloat("right").add(new s.Text("NGL Viewer "+r.Version).setClass("title"))),n},r.MenubarFileWidget=function(e){var t=r.flatten([r.ParserRegistry.getStructureExtensions(),r.ParserRegistry.getVolumeExtensions(),r.ParserRegistry.getSurfaceExtensions(),r.DecompressorRegistry.names,r.ScriptExtensions]),n=document.createElement("input");n.type="file",n.multiple=!0,n.style.display="none",n.accept="."+t.join(",."),n.addEventListener("change",(function(n){new r.Queue((function(n,i){var s=n.name.split(".").pop().toLowerCase();r.ScriptExtensions.includes(s)?e.loadScript(n).then(i):t.includes(s)?e.loadFile(n,{defaultRepresentation:!0}).then(i):(console.error("unknown filetype: "+s),i())}),n.target.files)}),!1);var i=new r.ExportImageWidget(e).setDisplay("none").attach(e.viewer.container.parentElement),o=s.MenubarHelper.createOption,a=s.MenubarHelper.createInput,l=s.MenubarHelper.createCheckbox,c=s.MenubarHelper.createDivider,u=[o("Open...",(function(){n.click()})),a("PDB",(function(t){13===t.keyCode&&(e.loadFile("rcsb://"+t.target.value.trim(),{defaultRepresentation:!0}),t.target.value="")})),l("firstModelOnly",!1,(function(t){e.defaultFileParams.firstModelOnly=t.target.checked})),l("cAlphaOnly",!1,(function(t){e.defaultFileParams.cAlphaOnly=t.target.checked})),c(),o("Screenshot",(function(){e.makeImage({factor:1,antialias:!0,trim:!1,transparent:!1}).then((function(e){r.download(e,"screenshot.png")}))}),"camera"),o("Export image...",(function(){i.setOpacity("0.9").setLeft("50px").setTop("80px").setDisplay("block")}))];r.ListingDatasource&&u.splice(1,0,o("Import...",(function(){var n;(n=new r.DirectoryListingWidget(r.ListingDatasource,e,"Import file",t,(function(i){var s=i.path.split(".").pop().toLowerCase();r.ScriptExtensions.includes(s)?(e.loadScript(r.ListingDatasource.getUrl(i.path)),n.dispose()):t.includes(s)?(e.loadFile(r.ListingDatasource.getUrl(i.path),{defaultRepresentation:!0}),n.dispose()):console.error("unknown filetype: "+s)}))).setOpacity("0.9").setLeft("50px").setTop("80px").attach()})));var h=s.MenubarHelper.createOptionsPanel(u);return h.dom.appendChild(n),s.MenubarHelper.createMenuContainer("File",h)},r.MenubarViewWidget=function(e,t){e.signals.fullscreenChanged.add((function(e){var t=r[4].children[0];e?t.switchClass("compress","expand"):t.switchClass("expand","compress")}));var n=s.MenubarHelper.createOption,i=s.MenubarHelper.createDivider,r=[n("Perspective",(function(){e.setParameters({cameraType:"perspective"})})),n("Orthographic",(function(){e.setParameters({cameraType:"orthographic"})})),n("Stereo",(function(){e.setParameters({cameraType:"stereo"})})),i(),n("Full screen",(function(){e.toggleFullscreen(e.viewer.container.parentElement)}),"expand"),n("Center",(function(){e.autoView(1e3)}),"bullseye"),i(),n("Toggle spin",(function(){e.toggleSpin()})),n("Toggle rock",(function(){e.toggleRock()}))],o=s.MenubarHelper.createOptionsPanel(r);return s.MenubarHelper.createMenuContainer("View",o)},r.MenubarExamplesWidget=function(e){var t=s.MenubarHelper.createOption,n=s.MenubarHelper.createOptionsPanel([]);n.setWidth("300px");var i=new XMLHttpRequest;return i.open("GET",r.examplesListUrl),i.responseType="json",i.onload=function(i){var s=this.response;"string"==typeof s&&(s=JSON.parse(s)),s.sort().forEach((function(i){var s=t(i,(function(){e.loadScript(r.examplesScriptUrl+i+".js")}));n.add(s)}))},i.send(),s.MenubarHelper.createMenuContainer("Examples",n)},r.MenubarHelpWidget=function(e,t){function n(){o.setOpacity("0.9").setDisplay("block").setWidgetPosition(50,80)}var i=new r.PreferencesWidget(e,t).setDisplay("none").attach(e.viewer.container.parentElement),o=new r.OverviewWidget(e,t).setDisplay("none").attach(e.viewer.container.parentElement);t.getKey("overview")&&n();var a=s.MenubarHelper.createOption,l=(s.MenubarHelper.createDivider,[a("Overview",n),a("Preferences",(function(){i.setOpacity("0.9").setDisplay("block").setWidgetPosition(50,80)}),"sliders")]),c=s.MenubarHelper.createOptionsPanel(l);return s.MenubarHelper.createMenuContainer("Help",c)},r.OverviewWidget=function(e,t){var n=new s.OverlayPanel,i=0,o=0,a=0,l=0;function c(e){0===a&&(a=e.clientX,l=e.clientY),i-=a-e.clientX,o-=l-e.clientY,a=e.clientX,l=e.clientY,n.dom.style.top=o+"px",n.dom.style.left=i+"px"}n.setWidgetPosition=function(e,t){i=e,o=t,a=0,l=0,n.dom.style.top=o+"px",n.dom.style.left=i+"px"};var u=(new s.Panel).setBorderBottom("1px solid #555").setHeight("25px").setCursor("move").onMouseDown((function(e){1===e.which&&document.addEventListener("mousemove",c),document.addEventListener("mouseup",(function(e){document.removeEventListener("mousemove",c)}))})),h=(new s.Panel).setMarginTop("10px").setMinHeight("100px").setMaxHeight("500px").setMaxWidth("600px").setOverflow("auto");function d(e,t){var n=new s.Panel,i=new s.Icon(e).setWidth("20px").setFloat("left"),r=new s.Text(t).setDisplay("inline").setMarginLeft("5px");n.setMarginLeft("20px").add(i,r),h.add(n)}u.add(new s.Text("NGL Viewer").setFontStyle("italic"),new s.Html(" — Overview")),u.add(new s.Icon("times").setCursor("pointer").setMarginLeft("20px").setFloat("right").onClick((function(){n.setDisplay("none")}))),n.add(u),n.add(h),h.add((new s.Panel).add(new s.Html("To load a new structure use the File menu in the top left via drag'n'drop."))).add(new s.Break),h.add((new s.Panel).add(new s.Text("A number of clickable icons provide common actions. Most icons can be clicked on, just try it or hover the mouse pointer over it to see a tooltip."))).add(new s.Break),d("eye","Controls the visibility of a component."),d("trash-o","Deletes a component. Note that a second click is required to confirm the action."),d("bullseye","Centers a component."),d("bars","Opens a menu with further options."),d("square","Opens a menu with coloring options."),d("filter","Indicates atom-selection input fields."),h.add(new s.Text("Mouse controls")).add(new s.Html("")),h.add((new s.Panel).add(new s.Html("For more information please visit the documentation pages.")));var p=t.getKey("overview"),f=new s.Checkbox(p).onClick((function(){t.setKey("overview",f.getValue())}));return h.add((new s.HorizontalRule).setBorderTop("1px solid #555").setMarginTop("15px")).add((new s.Panel).add(f,new s.Text("Show on startup. Always available from Menu > Help > Overview.").setMarginLeft("5px"))),n},r.PreferencesWidget=function(e,t){var n=new s.OverlayPanel,i=0,o=0,a=0,l=0;function c(e){0===a&&(a=e.clientX,l=e.clientY),i-=a-e.clientX,o-=l-e.clientY,a=e.clientX,l=e.clientY,n.dom.style.top=o+"px",n.dom.style.left=i+"px"}n.setWidgetPosition=function(e,t){i=e,o=t,a=0,l=0,n.dom.style.top=o+"px",n.dom.style.left=i+"px"};var u=(new s.Panel).setBorderBottom("1px solid #555").setHeight("25px").setCursor("move").onMouseDown((function(e){1===e.which&&document.addEventListener("mousemove",c),document.addEventListener("mouseup",(function(e){document.removeEventListener("mousemove",c)}))})),h=(new s.Panel).setMarginTop("10px").setMinHeight("100px").setMaxHeight("500px").setOverflow("auto");return u.add(new s.Text("Preferences")),u.add(new s.Icon("times").setCursor("pointer").setMarginLeft("20px").setFloat("right").onClick((function(){n.setDisplay("none")}))),n.add(u),n.add(h),Object.keys(r.UIStageParameters).forEach((function(n){var i=r.UIStageParameters[n];void 0===i.label&&(i.label=n);var o=r.createParameterInput(i,e.parameters[n]);if(o){t.signals.keyChanged.add((function(e,t){e===n&&o.setValue(t)}));var a=navigator.userAgent;"range"!==i.type||/Trident/.test(a)||/MSIE/.test(a)?o.onChange(l):o.onInput(l),h.add(new s.Text(n).setWidth("120px")).add(o).add(new s.Break)}function l(){var e={};e[n]=o.getValue(),t.setKey(n,e[n])}})),n},r.ExportImageWidget=function(e){var t=new s.OverlayPanel,n=(new s.Panel).setBorderBottom("1px solid #555").setHeight("25px"),i=(new s.Panel).setMarginTop("10px").setMinHeight("100px").setMaxHeight("500px").setOverflow("auto");n.add(new s.Text("Image export")),n.add(new s.Icon("times").setCursor("pointer").setMarginLeft("20px").setFloat("right").onClick((function(){t.setDisplay("none")}))),t.add(n),t.add(i);var o=(new s.Select).setOptions({1:"1x",2:"2x",3:"3x",4:"4x",5:"5x",6:"6x",7:"7x",8:"8x",9:"9x",10:"10x"}).setValue("4"),a=(new s.Checkbox).setValue(!0),l=(new s.Checkbox).setValue(!1),c=(new s.Checkbox).setValue(!1),u=(new s.Progress).setDisplay("none"),h=new s.Button("export").onClick((function(){function t(e,t,n){1===e&&u.setMax(t),e>=t?u.setIndeterminate():u.setValue(e),n&&(u.setDisplay("none"),h.setDisplay("inline-block"))}h.setDisplay("none"),u.setDisplay("inline-block"),setTimeout((function(){e.makeImage({factor:parseInt(o.getValue()),antialias:a.getValue(),trim:l.getValue(),transparent:c.getValue(),onProgress:t}).then((function(e){r.download(e,"screenshot.png")}))}),50)}));function d(e,t){i.add(new s.Text(e).setWidth("80px")).add(t||new s.Panel).add(new s.Break)}return d("scale",o),d("antialias",a),d("trim",l),d("transparent",c),i.add(new s.Break,h,u),t},r.SidebarWidget=function(e,t=void 0){var n=e.signals,i=new s.Panel;i.view=t;var o=(new s.Panel).setClass("Content"),a=[],l=[];function c(t){var n;switch(t.type){case"structure":n=new r.StructureComponentWidget(t,e);break;case"surface":n=new r.SurfaceComponentWidget(t,e);break;case"volume":n=new r.VolumeComponentWidget(t,e);break;case"shape":n=new r.ShapeComponentWidget(t,e);break;default:return void console.warn("NGL.SidebarWidget: component type unknown",t)}o.add(n),a.push(t),l.push(n)}e.compList.forEach((function(e){c(e)})),n.componentAdded.add(c),n.componentRemoved.add((function(e){var t=a.indexOf(e);-1!==t&&(l[t].dispose(),a.splice(t,1),l.splice(t,1))}));var u=new s.Icon("plus-square").setTitle("expand all").setCursor("pointer").onClick((function(){l.forEach((function(e){e.expand()}))})),h=new s.Icon("minus-square").setTitle("collapse all").setCursor("pointer").setMarginLeft("10px").onClick((function(){l.forEach((function(e){e.collapse()}))})),d=new s.Icon("bullseye").setTitle("center all").setCursor("pointer").setMarginLeft("10px").onClick((function(){e.autoView(1e3)})),p=(new s.DisposeIcon).setMarginLeft("10px").setDisposeFunction((function(){e.removeAllComponents()})),f=new s.Icon("superpowers").setTitle("sync representation").setCursor("pointer").setMarginLeft("10px").onClick((function(){t&&t.syncReprWithMe()})),m=new s.PopupMenu("cogs","Settings","window").setIconTitle("settings").setMarginLeft("10px");m.entryLabelWidth="120px";var g=(new s.Panel).setDisplay("inline").add(new s.Icon("spinner").addClass("spin").setMarginLeft("45px"));e.tasks.signals.countChanged.add((function(e,t){if(t>0)_.add(g);else try{_.remove(g)}catch(e){}})),["clipNear","clipFar","clipDist","fogNear","fogFar","lightColor","lightIntensity","ambientColor","ambientIntensity"].forEach((function(t){var n=r.UIStageParameters[t];void 0===n.label&&(n.label=t);var i=r.createParameterInput(n,e.parameters[t]);if(i){e.signals.parametersChanged.add((function(e){i.setValue(e[t])}));var s=navigator.userAgent;"range"!==n.type||/Trident/.test(s)||/MSIE/.test(s)?i.onChange(o):i.onInput(o),m.addEntry(t,i)}function o(){var n={};n[t]=i.getValue(),e.setParameters(n)}}));var _=(new s.Panel).setClass("Panel Sticky").add(u,h,d,p,f,m);return i.add(_,o),i},r.StructureComponentWidget=function(e,t){var n=e.signals,i=new s.CollapsibleIconPanel("minus-square","plus-square"),o=new s.Panel,a=new s.Panel;function l(n){o.add(new r.RepresentationElementWidget(n,t,e))}e.reprList.forEach((function(e){l(e)})),n.representationAdded.add(l),n.trajectoryAdded.add((function(e){a.add(new r.TrajectoryElementWidget(e,t))})),n.defaultAssemblyChanged.add((function(){f.setValue(e.parameters.defaultAssembly)})),i.add(new s.SelectionPanel(e.selection).setMarginLeft("20px").setInputWidth("214px"));var c,u,h,d=new s.Button("export").onClick((function(){new r.PdbWriter(e.structure).download("structure"),D.setMenuDisplay("none")})),p=(new s.Select).setColor("#444").setOptions((c={"":"[ add ]"},r.RepresentationRegistry.names.forEach((function(e){c[e]=e})),c)).onChange((function(){e.addRepresentation(p.getValue()),p.setValue(""),D.setMenuDisplay("none")})),f=(new s.Select).setColor("#444").setOptions((u=e.structure.biomolDict,h={"":e.structure.unitcell?"AU":"FULL"},Object.keys(u).forEach((function(e){h[e]=e})),h)).setValue(e.parameters.defaultAssembly).onChange((function(){e.setDefaultAssembly(f.getValue()),D.setMenuDisplay("none")})),m=[];r.ParserRegistry.getTrajectoryExtensions().forEach((function(e){m.push("."+e,"."+e+".gz")}));var g=document.createElement("input");g.type="file",g.multiple=!0,g.style.display="none",g.accept=m.join(","),g.addEventListener("change",(function(t){new r.Queue((function(t,n){r.autoLoad(t).then((function(t){e.addTrajectory(t),n()}))}),t.target.files),t.target.value=""}),!1);var _=new s.Button("open").onClick((function(){g.click(),D.setMenuDisplay("none")})),v=new s.Button("import").onClick((function(){D.setMenuDisplay("none");var n,i=["xtc","trr","netcdf","dcd","ncdf","nc","gro","pdb","lammpstrj","xyz","mdcrd","gz","binpos","h5","dtr","arc","tng","trj","trz"];(n=new r.DirectoryListingWidget(r.ListingDatasource,t,"Import trajectory",i,(function(t){var s=t.path.split(".").pop().toLowerCase();-1!==i.indexOf(s)?(e.addTrajectory(t.path+"?struc="+e.structure.path),n.dispose()):r.log("unknown trajectory type: "+s)}))).setOpacity("0.9").setLeft("50px").setTop("80px").attach()}));function y(){var n={"":"[ structure ]"};t.eachComponent((function(t,i){t!==e&&(n[i]=t.name)}),r.StructureComponent),b.setOptions(n)}t.signals.componentAdded.add(y),t.signals.componentRemoved.add(y);var b=(new s.Select).setColor("#444").onChange((function(){e.superpose(t.compList[b.getValue()],!0),e.autoView(1e3),b.setValue(""),D.setMenuDisplay("none")}));y();var x=new s.Button("align").onClick((function(){var n=e.structure.getPrincipalAxes().getRotationQuaternion();n.multiply(e.quaternion.clone().inverse()),t.animationControls.rotate(n),t.animationControls.move(e.getCenter())})),w=new s.Button("remove").onClick((function(){e.removeAllMeasurements()})),S=new s.Button("show").onClick((function(){e.annotationList.forEach((function(e){e.setVisibility(!0)}))})),A=new s.Button("hide").onClick((function(){e.annotationList.forEach((function(e){e.setVisibility(!1)}))})),M=(new s.Panel).setDisplay("inline-block").add(S,A),C=document.createElement("input");C.type="file",C.style.display="none",C.accept=".xml",C.addEventListener("change",(function(t){new r.Queue((function(t,n){r.autoLoad(t,{ext:"validation"}).then((function(t){e.structure.validation=t,n()}))}),t.target.files)}),!1);var T=new s.Button("open").onClick((function(){C.click(),D.setMenuDisplay("none")})),E=(new s.Vector3).onChange((function(){e.setPosition(E.getValue())})),P=new r.Quaternion,I=new r.Euler,k=(new s.Vector3).setRange(-6.28,6.28).onChange((function(){I.setFromVector3(k.getValue()),P.setFromEuler(I),e.setRotation(P)})),R=new s.Number(1).setRange(.01,100).onChange((function(){e.setScale(R.getValue())}));n.matrixChanged.add((function(){E.setValue(e.position),k.setValue(I.setFromQuaternion(e.quaternion)),R.setValue(e.scale.x)}));var D=new s.ComponentPanel(e).setDisplay("inline-block").setMargin("0px").addMenuEntry("PDB file",d).addMenuEntry("Representation",p).addMenuEntry("Assembly",f).addMenuEntry("Superpose",b).addMenuEntry("File",new s.Text(e.structure.path).setMaxWidth("100px").setOverflow("auto")).addMenuEntry("Trajectory",_).addMenuEntry("Principal axes",x).addMenuEntry("Measurements",w).addMenuEntry("Annotations",M).addMenuEntry("Validation",T).addMenuEntry("Position",E).addMenuEntry("Rotation",k).addMenuEntry("Scale",R);return r.ListingDatasource&&r.TrajectoryDatasource&&D.addMenuEntry("Remote trajectory",v),i.addStatic(D).add(a).add(o),i},r.SurfaceComponentWidget=function(e,t){var n=e.signals,i=new s.CollapsibleIconPanel("minus-square","plus-square"),o=new s.Panel;n.representationAdded.add((function(e){o.add(new r.RepresentationElementWidget(e,t))}));var a=(new s.Select).setColor("#444").setOptions({"":"[ add ]",surface:"surface",dot:"dot"}).onChange((function(){e.addRepresentation(a.getValue()),a.setValue(""),p.setMenuDisplay("none")})),l=(new s.Vector3).onChange((function(){e.setPosition(l.getValue())})),c=new r.Quaternion,u=new r.Euler,h=(new s.Vector3).setRange(-6.28,6.28).onChange((function(){u.setFromVector3(h.getValue()),c.setFromEuler(u),e.setRotation(c)})),d=new s.Number(1).setRange(.01,100).onChange((function(){e.setScale(d.getValue())}));n.matrixChanged.add((function(){l.setValue(e.position),h.setValue(u.setFromQuaternion(e.quaternion)),d.setValue(e.scale.x)}));var p=new s.ComponentPanel(e).setDisplay("inline-block").setMargin("0px").addMenuEntry("Representation",a).addMenuEntry("File",new s.Text(e.surface.path).setMaxWidth("100px").setWordWrap("break-word")).addMenuEntry("Position",l).addMenuEntry("Rotation",h).addMenuEntry("Scale",d);return i.addStatic(p).add(o),i},r.VolumeComponentWidget=function(e,t){var n=e.signals,i=new s.CollapsibleIconPanel("minus-square","plus-square"),o=new s.Panel;n.representationAdded.add((function(e){o.add(new r.RepresentationElementWidget(e,t))}));var a=(new s.Select).setColor("#444").setOptions({"":"[ add ]",surface:"surface",dot:"dot",slice:"slice"}).onChange((function(){e.addRepresentation(a.getValue()),a.setValue(""),p.setMenuDisplay("none")})),l=(new s.Vector3).onChange((function(){e.setPosition(l.getValue())})),c=new r.Quaternion,u=new r.Euler,h=(new s.Vector3).setRange(-6.28,6.28).onChange((function(){u.setFromVector3(h.getValue()),c.setFromEuler(u),e.setRotation(c)})),d=new s.Number(1).setRange(.01,100).onChange((function(){e.setScale(d.getValue())}));n.matrixChanged.add((function(){l.setValue(e.position),h.setValue(u.setFromQuaternion(e.quaternion)),d.setValue(e.scale.x)}));var p=new s.ComponentPanel(e).setDisplay("inline-block").setMargin("0px").addMenuEntry("Representation",a).addMenuEntry("File",new s.Text(e.volume.path).setMaxWidth("100px").setWordWrap("break-word")).addMenuEntry("Position",l).addMenuEntry("Rotation",h).addMenuEntry("Scale",d);return i.addStatic(p).add(o),i},r.ShapeComponentWidget=function(e,t){var n=e.signals,i=new s.CollapsibleIconPanel("minus-square","plus-square"),o=new s.Panel;n.representationAdded.add((function(e){o.add(new r.RepresentationElementWidget(e,t))}));var a=(new s.Select).setColor("#444").setOptions({"":"[ add ]",buffer:"buffer"}).onChange((function(){e.addRepresentation(a.getValue()),a.setValue(""),p.setMenuDisplay("none")})),l=(new s.Vector3).onChange((function(){e.setPosition(l.getValue())})),c=new r.Quaternion,u=new r.Euler,h=(new s.Vector3).setRange(-6.28,6.28).onChange((function(){u.setFromVector3(h.getValue()),c.setFromEuler(u),e.setRotation(c)})),d=new s.Number(1).setRange(.01,100).onChange((function(){e.setScale(d.getValue())}));n.matrixChanged.add((function(){l.setValue(e.position),h.setValue(u.setFromQuaternion(e.quaternion)),d.setValue(e.scale.x)}));var p=new s.ComponentPanel(e).setDisplay("inline-block").setMargin("0px").addMenuEntry("Representation",a).addMenuEntry("File",new s.Text(e.shape.path).setMaxWidth("100px").setWordWrap("break-word")).addMenuEntry("Position",l).addMenuEntry("Rotation",h).addMenuEntry("Scale",d);return i.addStatic(p).add(o),i},r.RepresentationElementWidget=function(e,t,n=void 0){var i=e.signals,o=new s.CollapsibleIconPanel("minus-square","plus-square").setMarginLeft("20px");i.visibilityChanged.add((function(e){l.setValue(e)})),i.nameChanged.add((function(e){a.setValue(e)})),i.disposed.add((function(){h.dispose(),o.dispose()}));var a=new s.EllipsisText(e.name).setWidth("103px"),l=new s.ToggleIcon(e.visible,"eye","eye-slash").setTitle("hide/show").setCursor("pointer").setMarginLeft("25px").onClick((function(){e.setVisibility(!e.visible)})),c=new s.Icon("bullseye").setTitle("center").setCursor("pointer").setMarginLeft("10px").onClick((function(){n.autoView(e.repr.selection.string,1e3)})),u=(new s.DisposeIcon).setMarginLeft("10px").setDisposeFunction((function(){e.dispose()}));n?o.addStatic(a).addStatic(l).addStatic(c).addStatic(u):o.addStatic(a).addStatic(l).addStatic(u),"structure"!==e.parent.type&&"trajectory"!==e.parent.type||!e.repr.selection||"selection"!==e.repr.selection.type||o.add(new s.SelectionPanel(e.repr.selection).setMarginLeft("20px").setInputWidth("194px"));var h=new s.PopupMenu("bars","Representation").setMarginLeft("45px").setEntryLabelWidth("190px");h.addEntry("type",new s.Text(e.repr.type));var d=e.repr,p=d.getParameters();return Object.keys(d.parameters).forEach((function(n){if(d.parameters[n]){var s=Object.assign({},d.parameters[n]);s.value=p[n],void 0===s.label&&(s.label=n);var o=r.createParameterInput(s);if(o){i.parametersChanged.add((function(e){"function"==typeof o.setValue&&o.setValue(e[n])}));var a=navigator.userAgent;"range"!==s.type||/Trident/.test(a)||/MSIE/.test(a)?o.onChange(l):o.onInput(l),h.addEntry(n,o)}}function l(){var i={};i[n]=o.getValue(),e.setParameters(i),t.viewer.requestRender()}})),o.addStatic(h),o},r.TrajectoryElementWidget=function(e,t){var n=e.signals,i=e.trajectory,o=new s.CollapsibleIconPanel("minus-square","plus-square").setMarginLeft("20px");n.disposed.add((function(){k.dispose(),o.dispose()}));var a=(new s.Panel).setDisplay("inline").add(new s.Icon("spinner").addClass("spin").setMarginRight("99px")),l=(new s.Panel).setMarginLeft("5px").setDisplay("inline");function c(e){if(d.setValue(e),i.deltaTime&&e>=0){var t=i.getFrameTime(e)/1e3;p.setValue(t.toFixed(9).replace(/\.?0+$/g,"")+"ns")}else p.setValue("");g.setValue(e),a.clear().add(d.setWidth("40px")),l.clear().add(p.setWidth("90px"))}function u(t){d.setRange(-1,t-1),g.setRange(-1,t-1),c(i.currentFrame),void 0!==e.parameters.defaultStep?f.setValue(e.parameters.defaultStep):f.setValue(Math.ceil((t+1)/100)),w.setParameters({step:f.getValue()}),w.setParameters({end:t-1})}n.countChanged.add(u),n.frameChanged.add(c);var h=new s.EllipsisText(e.parameters.name).setWidth("103px");n.nameChanged.add((function(e){h.setValue(e)})),o.addStatic(h),o.addStatic(l);var d=new s.Integer(-1).setWidth("40px").setTextAlign("right").setMarginLeft("5px").setRange(-1,-1).onChange((function(e){i.setFrame(d.getValue()),k.setMenuDisplay("none")})),p=(new s.Text).setTextAlign("right").setWidth("90px"),f=new s.Integer(1).setWidth("50px").setRange(1,1e4).onChange((function(){w.setParameters({step:f.getValue()})})),m=new s.Panel,g=new s.Range(-1,-1,-1,1).setWidth("147px").setMargin("0px").setPadding("0px").setBorder("0px").onInput((function(e){var t=g.getValue();t!==i.currentFrame&&(i.player&&i.player.isRunning?(i.setPlayer(),i.setFrame(t)):i.inProgress||i.setFrame(t))})),_=(new s.Select).setColor("#444").setOptions({"":"none",linear:"linear",spline:"spline"}).setValue(e.parameters.defaultInterpolateType).onChange((function(){w.setParameters({interpolateType:_.getValue()})})),v=new s.Integer(e.parameters.defaultInterpolateStep).setWidth("30px").setRange(1,50).onChange((function(){w.setParameters({interpolateStep:v.getValue()})})),y=(new s.Select).setColor("#444").setOptions({forward:"forward",backward:"backward",bounce:"bounce"}).setValue(e.parameters.defaultDirection).onChange((function(){w.setParameters({direction:y.getValue()})})),b=(new s.Select).setColor("#444").setOptions({loop:"loop",once:"once"}).setValue(e.parameters.defaultMode).onChange((function(){w.setParameters({mode:b.getValue()})})),x=new s.Integer(e.parameters.defaultTimeout).setWidth("30px").setRange(10,1e3).onChange((function(){w.setParameters({timeout:x.getValue()})})),w=new r.TrajectoryPlayer(i,{step:f.getValue(),timeout:x.getValue(),start:0,end:i.frameCount-1,interpolateType:_.getValue(),interpolateStep:v.getValue(),direction:y.getValue(),mode:b.getValue()});i.setPlayer(w);var S=new s.ToggleIcon(!0,"play","pause").setMarginRight("10px").setMarginLeft("20px").setCursor("pointer").setWidth("12px").setTitle("play").onClick((function(){w.toggle()}));w.signals.startedRunning.add((function(){S.setTitle("pause").setValue(!1)})),w.signals.haltedRunning.add((function(){S.setTitle("play").setValue(!0)})),m.add(S,g,a),o.add(new s.SelectionPanel(i.selection).setMarginLeft("20px").setInputWidth("194px"));var A=new s.Checkbox(i.centerPbc).onChange((function(){e.setParameters({centerPbc:A.getValue()})})),M=new s.Checkbox(i.removePeriodicity).onChange((function(){e.setParameters({removePeriodicity:M.getValue()})})),C=new s.Checkbox(i.removePbc).onChange((function(){e.setParameters({removePbc:C.getValue()})})),T=new s.Checkbox(i.superpose).onChange((function(){e.setParameters({superpose:T.getValue()})})),E=new s.Number(i.deltaTime).setWidth("55px").setRange(0,1e6).onChange((function(){e.setParameters({deltaTime:E.getValue()})})),P=new s.Number(i.timeOffset).setWidth("55px").setRange(0,1e9).onChange((function(){e.setParameters({timeOffset:P.getValue()})}));n.parametersChanged.add((function(e){A.setValue(i.centerPbc),M.setValue(i.removePeriodicity),C.setValue(i.removePbc),T.setValue(i.superpose),E.setValue(i.deltaTime),P.setValue(i.timeOffset),i.setFrame(d.getValue())}));var I=(new s.DisposeIcon).setDisposeFunction((function(){e.parent.removeTrajectory(e)}));i.frameCount&&u(i.frameCount);var k=new s.PopupMenu("bars","Trajectory").setMarginLeft("10px").setEntryLabelWidth("130px").addEntry("Center",A).addEntry("Remove Periodicity",M).addEntry("Remove PBC",C).addEntry("Superpose",T).addEntry("Step size",f).addEntry("Interpolation type",_).addEntry("Interpolation steps",v).addEntry("Play timeout",x).addEntry("Play direction",y).addEntry("Play mode",b).addEntry("Delta time [ps]",E).addEntry("Time offset [ps]",P).addEntry("File",new s.Text(i.trajPath).setMaxWidth("100px").setWordWrap("break-word")).addEntry("Dispose",I);return o.addStatic(k),o.add(m),o},r.DirectoryListingWidget=function(e,t,n,i,o){function a(e){var t={"":""},n=[];return(e=e||"").split("/").forEach((function(e){n.push(e),t[n.join("/")]=e})),t}var l=new s.OverlayPanel,c=(new s.Panel).setBorderBottom("1px solid #555").setHeight("30px"),u=(new s.Panel).setMarginTop("10px").setMinHeight("100px").setMaxHeight("500px").setPaddingRight("15px").setOverflow("auto"),h=(new s.Select).setColor("#444").setMarginLeft("20px").setWidth("").setMaxWidth("200px").setOptions(a()).onChange((function(){e.getListing(h.getValue()).then(d)}));function d(t){var n=t.path,l=t.data;r.lastUsedDirectory=n,u.clear(),h.setOptions(a(n)).setValue(n),l.forEach((function(t){var n=t.path.split(".").pop().toLowerCase();if(!i||t.dir||-1!==i.indexOf(n)){var r,a,l,c,h,p;t.dir?(r="folder-o",a=t.name):(r="file-o",a=t.name+String.fromCharCode(160)+"("+(l=t.size,(c=Math,h=c.log,p=h(l)/h(1e3)|0,l/c.pow(1e3,p)).toFixed(2)+String.fromCharCode(160)+(p?"kMGTPEZY"[--p]+"B":"Bytes")+")"));var f=(new s.Panel).setDisplay("block").setWhiteSpace("nowrap").add(new s.Icon(r).setWidth("20px")).add(new s.Text(a)).onClick((function(){t.dir?e.getListing(t.path).then(d):o(t)}));t.restricted&&f.add(new s.Icon("lock").setMarginLeft("5px")),u.add(f)}}))}return n=n||"Directoy listing",c.add(new s.Text(n)),c.add(h),c.add(new s.Icon("times").setCursor("pointer").setMarginLeft("20px").setFloat("right").onClick((function(){l.dispose()}))),l.add(c),l.add(u),e.getListing(r.lastUsedDirectory).then(d),l},e.exports={StageWidget:class{constructor(e){var t,n=e.stage,i=new s.Panel;t=e.options.parent?e.el.parentElement:e.el,i.setPosition("absolute"),i.dom=n.viewer.container,this.el=t,this.widgetList=[];var o=new r.Preferences("ngl-stage-widget",n.getParameters()),a={};for(var l in o.storage)a[l]=o.getKey(l);n.setParameters(a),o.signals.keyChanged.add((function(e,t){var i={};i[e]=t,n.setParameters(i)}),this);var c=document.createElement("link");c.rel="stylesheet",c.id="theme",t.appendChild(c);var u=new r.ToolbarWidget(n).setId("toolbar_ngl");t.appendChild(u.dom);var h=new r.MenubarWidget(n,o).setId("menubar_ngl");t.appendChild(h.dom);var d=new r.SidebarWidget(n).setId("sidebar_ngl");t.appendChild(d.dom),this.widgetList.push(u),this.widgetList.push(h),this.widgetList.push(d),t.style.touchAction="none",n.handleResize(),setTimeout((function(){n.handleResize()}),500);var p=!1,f=!1,m=!1,g=function(e){e>=50&&e<=window.innerWidth-10&&(d.setWidth(window.innerWidth-e+"px"),i.setWidth(e+"px"),u.setWidth(e+"px"),n.handleResize());var t=d.dom.getBoundingClientRect().width;if(void 0===e){var r=window.innerWidth-t;i.setWidth(r+"px"),u.setWidth(r+"px"),n.handleResize()}m=t<=10,_()};g=r.throttle(g,50,{leading:!0,trailing:!0});var _=function(){var e=d.dom.getBoundingClientRect().width,i=t.getBoundingClientRect().width;i==e&&(e=i/4);var r=i-e+"px";n.viewer.container.style.width=r,n.handleResize()},v=(new s.Panel).setClass("ResizeLeft").onMouseDown((function(){p=!0,f=!1})).onClick((function(){m?g(window.innerWidth-300):p||f||g(window.innerWidth-10)}));d.add(v),this.viewport=i,this.toolbar=u,this.menubar=h,this.sidebar=d,_(),n.signals.fullscreenChanged.add((function(t){const i=n.viewer.container.parentElement.getBoundingClientRect();n.setSize(i.width+"px",t?i.height+"px":"300px"),e.handleResize()})),window.addEventListener("mousemove",(function(e){p&&(document.body.style.cursor="col-resize",f=!0,g(e.clientX))}),!1),window.addEventListener("mouseup",(function(e){p=!1,document.body.style.cursor=""}),!1),window.addEventListener("resize",(function(e){g()}),!1),document.addEventListener("dragover",(function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="none"}),!1),document.addEventListener("drop",(function(e){e.stopPropagation(),e.preventDefault()}),!1)}dispose(){for(var e in this.widgetList)this.widgetList[e].dispose()}}}},9012:(e,t,n)=>{e.exports={};var i=[n(7412)];for(var r in i)if(i&&Object.prototype.hasOwnProperty.call(i,r)){var s=i[r];for(var o in s)s&&Object.prototype.hasOwnProperty.call(s,o)&&(e.exports[o]=s[o])}e.exports.version=n(8330).version},3199:()=>{"function"!=typeof importScripts&&function(e,t,n){function i(e,t){var n=t.getBoundingClientRect();return{x:Math.max(Math.min(e.clientX-n.left,t.clientWidth),0),y:Math.max(Math.min(e.clientY-n.top,t.clientHeight),0)}}function r(e,n,i){for(var r in e=t.createElementNS("http://www.w3.org/2000/svg",e),n)e.setAttribute(r,n[r]);for(Array.isArray(i)||(i=[i]),n=0,r=i[0]&&i.length||0;n
',this.slideElement=e.getElementsByClassName("slide")[0],this.pickerElement=e.getElementsByClassName("picker")[0],this.slideIndicator=e.getElementsByClassName("slide-indicator")[0],this.pickerIndicator=e.getElementsByClassName("picker-indicator")[0],a.positionIndicators(this.slideIndicator,this.pickerIndicator,{x:0,y:0},{x:0,y:0}),this.callback=function(e,n,i,r,s){a.positionIndicators(this.slideIndicator,this.pickerIndicator,s,r),t(e,n,i)}),this.slide_listener=function(e,t,r){return function(o){o=i(o,t),e.h=o.y/t.offsetHeight*360;var a=s({h:e.h,s:1,v:1}),l=s({h:e.h,s:e.s,v:e.v});r.style.backgroundColor=a.hex,e.callback&&e.callback(l.hex,{h:e.h,s:e.s,v:e.v},{r:l.r,g:l.g,b:l.b},n,o)}}(this,this.slideElement,this.pickerElement),this.picker_listener=function(e,t){return function(n){n=i(n,t);var r=t.offsetHeight;e.s=n.x/t.offsetWidth,e.v=(r-n.y)/r,r=s(e),e.callback&&e.callback(r.hex,{h:e.h,s:e.s,v:e.v},{r:r.r,g:r.g,b:r.b},n)}}(this,this.pickerElement),r||this.fixIndicators(this.slideIndicator,this.pickerIndicator),e=h.cloneNode(!0),r=u.cloneNode(!0);var o=e.getElementsByTagName("defs")[0].firstChild,c=e.getElementsByTagName("rect")[0];o.id="gradient-hsv-"+p,c.setAttribute("fill","url(#"+o.id+")"),o=[(o=r.getElementsByTagName("defs")[0]).firstChild,o.lastChild],c=r.getElementsByTagName("rect"),o[0].id="gradient-black-"+p,o[1].id="gradient-white-"+p,c[0].setAttribute("fill","url(#"+o[1].id+")"),c[1].setAttribute("fill","url(#"+o[0].id+")"),this.slideElement.appendChild(e),this.pickerElement.appendChild(r),p++,l(this.slideElement,this.slide_listener),l(this.pickerElement,this.picker_listener)}function l(e,n){function i(e){s&&n(e)}function r(e){i(e),s=!1,t.removeEventListener("mouseup",r,!1),t.removeEventListener("mousemove",i,!1)}var s=!1;e.addEventListener("mousedown",(function(e){s=!0,e.preventDefault(),t.addEventListener("mouseup",r,!0),t.addEventListener("mousemove",i,!1)}),!1)}function c(e,t,n,i){e.h=t.h%360,e.s=t.s,e.v=t.v,t=s(e);var r={y:e.h*e.slideElement.offsetHeight/360,x:0},o=e.pickerElement.offsetHeight;return o={x:e.s*e.pickerElement.offsetWidth,y:o-e.v*o},e.pickerElement.style.backgroundColor=s({h:e.h,s:1,v:1}).hex,e.callback&&e.callback(i||t.hex,{h:e.h,s:e.s,v:e.v},n||{r:t.r,g:t.g,b:t.b},o,r),e}var u,h,d={xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"};h=r("svg",d,[r("defs",{},r("linearGradient",{id:"gradient-hsv",x1:"0%",y1:"100%",x2:"0%",y2:"0%"},[r("stop",{offset:"0%","stop-color":"#FF0000","stop-opacity":"1"}),r("stop",{offset:"13%","stop-color":"#FF00FF","stop-opacity":"1"}),r("stop",{offset:"25%","stop-color":"#8000FF","stop-opacity":"1"}),r("stop",{offset:"38%","stop-color":"#0040FF","stop-opacity":"1"}),r("stop",{offset:"50%","stop-color":"#00FFFF","stop-opacity":"1"}),r("stop",{offset:"63%","stop-color":"#00FF40","stop-opacity":"1"}),r("stop",{offset:"75%","stop-color":"#0BED00","stop-opacity":"1"}),r("stop",{offset:"88%","stop-color":"#FFFF00","stop-opacity":"1"}),r("stop",{offset:"100%","stop-color":"#FF0000","stop-opacity":"1"})])),r("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#gradient-hsv)"})]),u=r("svg",d,[r("defs",{},[r("linearGradient",{id:"gradient-black",x1:"0%",y1:"100%",x2:"0%",y2:"0%"},[r("stop",{offset:"0%","stop-color":"#000000","stop-opacity":"1"}),r("stop",{offset:"100%","stop-color":"#CC9A81","stop-opacity":"0"})]),r("linearGradient",{id:"gradient-white",x1:"0%",y1:"100%",x2:"100%",y2:"100%"},[r("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"1"}),r("stop",{offset:"100%","stop-color":"#CC9A81","stop-opacity":"0"})])]),r("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#gradient-white)"}),r("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#gradient-black)"})]);var p=0;a.hsv2rgb=function(e){return delete(e=s(e)).hex,e},a.hsv2hex=function(e){return s(e).hex},a.rgb2hsv=o,a.rgb2hex=function(e){return s(o(e)).hex},a.hex2hsv=function(e){return o(a.hex2rgb(e))},a.hex2rgb=function(e){return{r:parseInt(e.substr(1,2),16),g:parseInt(e.substr(3,2),16),b:parseInt(e.substr(5,2),16)}},a.prototype.setHsv=function(e){return c(this,e)},a.prototype.setRgb=function(e){return c(this,o(e),e)},a.prototype.setHex=function(e){return c(this,a.hex2hsv(e),n,e)},a.positionIndicators=function(e,t,n,i){n&&(e.style.top=n.y-e.offsetHeight/2+"px"),i&&(t.style.top=i.y-t.offsetHeight/2+"px",t.style.left=i.x-t.offsetWidth/2+"px")},a.prototype.fixIndicators=function(e,t){l(e,this.slide_listener),l(t,this.picker_listener)},e.ColorPicker=a}(window,window.document)},1147:function(e,t,n){var i;!function(){function r(e,t,n,i,r){this._listener=t,this._isOnce=n,this.context=i,this._signal=e,this._priority=r||0}function s(e,t){if("function"!=typeof e)throw Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))}function o(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){o.prototype.dispatch.apply(e,arguments)}}r.prototype={active:!0,params:null,execute:function(e){var t;return this.active&&this._listener&&(e=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,e),this._isOnce&&this.detach()),t},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},o.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(e,t,n,i){var s=this._indexOfListener(e,n);if(-1!==s){if((e=this._bindings[s]).isOnce()!==t)throw Error("You cannot add"+(t?"":"Once")+"() then add"+(t?"Once":"")+"() the same listener without removing the relationship first.")}else e=new r(this,e,t,n,i),this._addBinding(e);return this.memorize&&this._prevParams&&e.execute(this._prevParams),e},_addBinding:function(e){var t=this._bindings.length;do{--t}while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var n,i=this._bindings.length;i--;)if((n=this._bindings[i])._listener===e&&n.context===t)return i;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,n){return s(e,"add"),this._registerListener(e,!1,t,n)},addOnce:function(e,t,n){return s(e,"addOnce"),this._registerListener(e,!0,t,n)},remove:function(e,t){s(e,"remove");var n=this._indexOfListener(e,t);return-1!==n&&(this._bindings[n]._destroy(),this._bindings.splice(n,1)),e},removeAll:function(){for(var e=this._bindings.length;e--;)this._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(e){if(this.active){var t,n=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=n),i){t=this._bindings.slice(),this._shouldPropagate=!0;do{i--}while(t[i]&&this._shouldPropagate&&!1!==t[i].execute(n))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var a=o;a.Signal=o,void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i)}()},5080:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IMessageSchema=void 0;const i=n(6495);t.IMessageSchema=i.object().shape({type:i.string().required(),data:i.mixed(),ID:i.string(),render_params:i.mixed(),methodName:i.string(),target:i.string(),args:i.array(),kwargs:i.object(),component_index:i.number(),repr_index:i.number(),last_child:i.boolean(),reconstruc_color_scheme:i.boolean(),movie_making:i.boolean(),buffers:i.array(),content:i.mixed()})},4649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeManagerView=t.ThemeManagerModel=void 0;const i=n(431),r=n(2555),s=n(2055);class o extends s.DOMWidgetModel{defaults(){return i.extend(s.DOMWidgetModel.prototype.defaults(),{_model_name:"ThemeManagerModel",_model_module:"nglview-js-widgets",_model_module_version:n(8330).version,_view_name:"ThemeManagerView",_view_module:"nglview-js-widgets",_view_module_version:n(8330).version})}}t.ThemeManagerModel=o;class a extends r.BaseView{render(){super.render(),this.displayed.then((()=>this.handleThemeChanged()))}handleThemeChanged(){console.log("ThemeManagerView: handleThemeChanged"),this.setTheme(this.model.get("_theme_css"))}handleEmbed(){this.handleThemeChanged()}setTheme(e){if(null!=e){var t=document.getElementById("nglview_style");t&&document.head.removeChild(t),(t=document.createElement("style")).id="nglview_style",t.appendChild(document.createTextNode(e)),document.head.appendChild(t),this.send({type:"call_method",data:"handle_resize"})}}}t.ThemeManagerView=a},6237:(e,t,n)=>{var i=n(4197).UI;i.Html=function(e){i.Element.call(this);var t=document.createElement("span");return t.className="Html",t.style.cursor="default",t.style.display="inline-block",t.style.verticalAlign="middle",this.dom=t,this.setValue(e),this},i.Html.prototype=Object.create(i.Element.prototype),i.Html.prototype.setValue=function(e){return void 0!==e&&(this.dom.innerHTML=e),this},i.Form=function(){i.Panel.call(this);var e=document.createElement("form");return e.className="Form",e.method="post",e.action="",e.target="_blank",e.enctype="multipart/form-data",this.dom=e,this},i.Form.prototype=Object.create(i.Panel.prototype),i.Form.prototype.setMethod=function(e){return this.dom.method=e,this},i.Form.prototype.setAction=function(e){return this.dom.action=e,this},i.Form.prototype.setTarget=function(e){return this.dom.target=e,this},i.Form.prototype.setEnctype=function(e){return this.dom.enctype=e,this},i.File=function(){return i.Input.call(this),this.dom.className="File",this.dom.type="file",this.dom.multiple=!1,this},i.File.prototype=Object.create(i.Input.prototype),i.File.prototype.setMultiple=function(e){return this.dom.multiple=e,this},i.File.prototype.getFiles=function(e){return this.dom.files},i.Hidden=function(){return i.Input.call(this),this.dom.type="hidden",this},i.Hidden.prototype=Object.create(i.Input.prototype),i.ToggleButton=function(e,t,n,r){i.Button.call(this,t);var s=!0;return this.onClick(function(){s?(s=!1,this.setLabel(e),r()):(s=!0,this.setLabel(t),n())}.bind(this)),this},i.ToggleButton.prototype=Object.create(i.Button.prototype),i.EllipsisText=function(e){return i.Text.call(this,e),this.setWhiteSpace("nowrap"),this.setOverflow("hidden"),this.setTextOverflow("ellipsis"),this},i.EllipsisText.prototype=Object.create(i.Text.prototype),i.EllipsisText.prototype.setValue=function(e){return void 0!==e&&(this.dom.textContent=e,this.setTitle(e)),this},i.EllipsisMultilineText=function(e){i.Element.call(this);var t=document.createElement("span");t.className="EllipsisMultilineText",t.style.cursor="default",t.style.display="inline-block",t.style.verticalAlign="middle";var n=document.createElement("p");return t.appendChild(n),this.dom=t,this.content=n,this.setValue(e),this},i.EllipsisMultilineText.prototype=Object.create(i.Element.prototype),i.EllipsisMultilineText.prototype.setValue=function(e){return void 0!==e&&(this.content.textContent=e,this.setTitle(e)),this},i.OverlayPanel=function(){return i.Panel.call(this),this.dom.className="Panel OverlayPanel",this.dom.tabIndex="-1",this.dom.style.outline="none",this},i.OverlayPanel.prototype=Object.create(i.Panel.prototype),i.OverlayPanel.prototype.attach=function(e){return(e=e||document.body).appendChild(this.dom),this},i.Icon=function(e){i.Panel.call(this);var t=document.createElement("span");return t.className="Icon fa",this.dom=t,e&&this.addClass.apply(this,arguments),this},i.Icon.prototype=Object.create(i.Panel.prototype),i.Icon.prototype.hasClass=function(e){return this.dom.classList.contains("fa-"+e)},i.Icon.prototype.addClass=function(e){for(var t=0;t100)for(var t=p.querySelectorAll('[data-rm="1"]'),n=0,i=t.length;nu){var i=Math.floor(n/t);g(Math.max(0,i-l)),o=n}h=Date.now(),e.preventDefault&&e.preventDefault()})),g(0),this.dom=s,this},i.VirtualList.prototype=Object.create(i.Element.prototype),i.VirtualTable=function(e,t,n,r,s){var o=s||{};i.Panel.call(this);var a=void 0!==o.defaultWidth?o.defaultWidth:30,l=void 0!==o.defaultMargin?o.defaultMargin:5,c=void 0!==o.defaultAlign?o.defaultAlign:"left",u=o.onRowSelect,h=(new i.Panel).setWhiteSpace("nowrap").setDisplay("inline-block").setOverflow("").setWidth("100%"),d=0,p=[],f=function(e,t){return e-t},m=function(e,t){return e.localeCompare(t)},g=function(t,n){var i;return i="string"==typeof e[0][t]?m:f,e.sort((function(e,r){return n?i(r[t],e[t]):i(e[t],r[t])})),v.redraw(),this},_=function(t,n){return p.length=0,u&&u(t,n),void 0!==n&&p.push(e[n][0]),v.redraw(),this};r.forEach((function(e){var t=e.width||a,n=e.margin||l,r=(new i.EllipsisText).setValue(e.name).setWidth(t+"px").setTextAlign(e.align||c).setMarginLeft(n+"px").setMarginRight(n+"px").setCursor("pointer").onClick((function(t){var n="ASC"===e.__sortFlag;g(e.index,n),e.__sortFlag=n?"DESC":"ASC"}));h.add(r),d+=t+2*n}));var v=new i.VirtualList(e,t,n,(function(t){var n=new i.Panel;return r.forEach((function(r){var s=e[t][r.index];r.format&&(s=r.format(s));var o,u=r.width||a,h=r.margin||l;(o="object"==typeof s?s:(new i.Text).setValue(s)).setWidth(u+"px").setTextAlign(r.align||c).setMarginLeft(h+"px").setMarginRight(h+"px").onClick((function(e){"function"==typeof r.onClick&&r.onClick(e,t,s)})).onMouseOver((function(e){"function"==typeof r.onMouseOver&&r.onMouseOver(e,t,s)})).onMouseOut((function(e){"function"==typeof r.onMouseOut&&r.onMouseOut(e,t,s)})),n.add(o)})),n.setCursor("pointer").onClick((function(e){_(e,t)})),-1!==p.indexOf(e[t][0])&&n.dom.classList.add("highlight"),n.dom})).setWidth(d+20+"px");return this.add(h,v),this.header=h,this.list=v,this.sortColumn=g,this.selectRow=function(e){_(void 0,e)},this},i.VirtualTable.prototype=Object.create(i.Panel.prototype),i.PopupMenu=function(e,t,n){n=n||"scrollParent",i.Panel.call(this);var r=new i.Icon(e||"bars"),s=(new i.OverlayPanel).setDisplay("none").attach(this.dom),o=0;function a(e){0===o&&(o=e.clientX,e.clientY),e.clientX,e.clientY,o=e.clientX,e.clientY}var l=(new i.Panel).setBorderBottom("1px solid #555").setMarginBottom("10px").setHeight("25px").setCursor("move").onMouseDown((function(e){1===e.which&&document.addEventListener("mousemove",a),document.addEventListener("mouseup",(function(e){document.removeEventListener("mousemove",a)}))}));return l.add(new i.Icon("times").setFloat("right").setCursor("pointer").onClick(function(){this.setMenuDisplay("none")}.bind(this))).add(new i.Text(t)),s.add(l),r.setTitle("menu"),r.setCursor("pointer"),r.onClick(function(e){"block"!==s.getDisplay()?(s.setMaxHeight(window.innerHeight/1.2+"px"),this.setMenuDisplay("block")):this.setMenuDisplay("none")}.bind(this)),this.add(r),this.setClass("").setDisplay("inline"),this.icon=r,this.panel=s,this.entryLabelWidth="100px",this},i.PopupMenu.prototype=Object.create(i.Panel.prototype),i.PopupMenu.prototype.addEntry=function(e,t){return this.panel.add(new i.Text(e).setWidth(this.entryLabelWidth)).add(t||new i.Panel).add(new i.Break),this},i.PopupMenu.prototype.setEntryLabelWidth=function(e){return this.entryLabelWidth=e,this},i.PopupMenu.prototype.setMenuDisplay=function(e){return this.panel.setDisplay(e),"none"!==e&&this.panel.dom.focus(),this},i.PopupMenu.prototype.setIconTitle=function(e){return this.icon.setTitle(e),this},i.PopupMenu.prototype.dispose=function(){this.panel.dispose(),i.Element.prototype.dispose.call(this)},i.CollapsibleIconPanel=function(e,t){i.Panel.call(this),this.dom.className="Panel CollapsiblePanel",void 0===e&&(e=e||"chevron-down",t=t||"chevron-right"),this.button=new i.Icon(e).setTitle("expand/collapse").setCursor("pointer").setWidth("12px").setMarginRight("6px"),this.addStatic(this.button);var n=this;return this.button.dom.addEventListener("click",(function(e){n.toggle()}),!1),this.content=document.createElement("div"),this.content.className="CollapsibleContent",this.dom.appendChild(this.content),this.isCollapsed=!1,this.iconClass1=e,this.iconClass2=t,this},i.CollapsibleIconPanel.prototype=Object.create(i.CollapsiblePanel.prototype),i.CollapsibleIconPanel.prototype.setCollapsed=function(e){e?(this.dom.classList.add("collapsed"),this.iconClass2?this.button.switchClass(this.iconClass2,this.iconClass1):this.button.addClass("rotate-90")):(this.dom.classList.remove("collapsed"),this.iconClass2?this.button.switchClass(this.iconClass1,this.iconClass2):this.button.removeClass("rotate-90")),this.isCollapsed=e},i.ColorPicker=function(){var e=this;i.Panel.call(this),this.slideWrapper=(new i.Panel).setClass("slide-wrapper"),this.sliderIndicator=(new i.Panel).setClass("slide-indicator"),this.slider=(new i.Panel).setClass("slide").setWidth("25px").setHeight("80px"),this.slideWrapper.add(this.slider,this.sliderIndicator),this.pickerWrapper=(new i.Panel).setClass("picker-wrapper"),this.pickerIndicator=(new i.Panel).setClass("picker-indicator"),this.picker=(new i.Panel).setClass("picker").setWidth("130px").setHeight("80px"),this.pickerWrapper.add(this.picker,this.pickerIndicator);var t=document.createEvent("Event");return t.initEvent("change",!0,!0),this.add(this.pickerWrapper,this.slideWrapper),this.colorPicker=ColorPicker(this.slider.dom,this.picker.dom,(function(n,i,r,s,o){if(!s&&o&&i.s<.05)return i.s=.5,i.v=.7,void e.colorPicker.setHsv(i);ColorPicker.positionIndicators(e.sliderIndicator.dom,e.pickerIndicator.dom,o,s),e.hex=n,e.hsv=i,e.rgb=r,e._settingValue||e.dom.dispatchEvent(t)})),this.colorPicker.fixIndicators(this.sliderIndicator.dom,this.pickerIndicator.dom),this},i.ColorPicker.prototype=Object.create(i.Panel.prototype),i.ColorPicker.prototype.setValue=function(e){return e!==this.hex&&(this._settingValue=!0,this.colorPicker.setHex(e),this._settingValue=!1),this},i.ColorPicker.prototype.getValue=function(){return this.hex},e.exports={UI:i}},4197:e=>{var t={Element:function(){}};t.Element.prototype={setId:function(e){return this.dom.id=e,this},setTitle:function(e){return this.dom.title=e,this},setClass:function(e){return this.dom.className=e,this},setStyle:function(e,t){for(var n=0;n0;)this.dom.removeChild(this.dom.firstChild);for(var n in e){var i=document.createElement("option");i.value=n,i.innerHTML=e[n],this.dom.appendChild(i)}return this.dom.value=t,this},t.Select.prototype.getValue=function(){return this.dom.value},t.Select.prototype.setValue=function(e){return this.dom.value=e,this},t.Select.prototype.setName=function(e){return this.dom.name=e,this},t.FancySelect=function(){t.Element.call(this);var e=this,n=document.createElement("div");n.className="FancySelect",n.tabIndex=0;var i=document.createEvent("HTMLEvents");return i.initEvent("change",!0,!0),n.addEventListener("keydown",(function(e){switch(e.keyCode){case 38:case 40:e.preventDefault(),e.stopPropagation()}}),!1),n.addEventListener("keyup",(function(t){switch(t.keyCode){case 38:case 40:e.selectedIndex+=38==t.keyCode?-1:1,e.selectedIndex>=0&&e.selectedIndex0;)t.dom.removeChild(t.dom.firstChild);t.options=[];for(var i=0;ii?this.dom.scrollTop=i:this.dom.scrollTop{var i,r=n(485),s=n(6237).UI;s.ColorPopupMenu=function(){var e=this;s.Panel.call(this),this.iconText=new s.Text("").setCursor("pointer").setClass("fa-stack-1x").setFontFamily("Arial, sans-serif").setColor("#111"),this.iconSquare=new s.Icon("square","stack-1x"),this.menu=new s.PopupMenu("stack","Color"),this.menu.icon.setTitle("color").setWidth("1em").setHeight("1em").setLineHeight("1em").add(this.iconSquare).add(this.iconText);var t=document.createEvent("Event");return t.initEvent("change",!0,!0),this.colorInput=(new s.Input).onChange((function(){e.setColor(e.colorInput.getValue()),e.dom.dispatchEvent(t)})),this.colorPicker=(new s.ColorPicker).setDisplay("inline-block").onChange((function(n){e.setColor(e.colorPicker.getValue()),e.dom.dispatchEvent(t)})),this.menu.addEntry("Input",this.colorInput).addEntry("Picker",this.colorPicker),this.add(this.menu),this.setClass("").setDisplay("inline"),this},s.ColorPopupMenu.prototype=Object.create(s.Panel.prototype),s.ColorPopupMenu.prototype.setColor=(i=new r.Color,function(e){return i.set(e),e="#"+i.getHexString(),this.colorInput.setBackgroundColor(e).setValue(e),this.colorPicker.setValue(e),this.iconSquare.setColor(e),Math.sqrt(255*i.r*i.r*255*.241+255*i.g*i.g*255*.691+255*i.b*i.b*255*.068)>130?(this.iconText.setColor("#000000"),this.colorInput.setColor("#000000")):(this.iconText.setColor("#FFFFFF"),this.colorInput.setColor("#FFFFFF")),this}),s.ColorPopupMenu.prototype.getColor=function(){return this.colorInput.getValue()},s.ColorPopupMenu.prototype.getValue=function(){return this.getColor()},s.ColorPopupMenu.prototype.setValue=function(e){return this.setColor(e),this},s.ColorPopupMenu.prototype.dispose=function(){this.menu.dispose(),s.Panel.prototype.dispose.call(this)},s.Vector3=function(e){s.Panel.call(this).setDisplay("inline-block"),this.xNumber=new s.Number(0).setWidth("40px"),this.yNumber=new s.Number(0).setWidth("40px"),this.zNumber=new s.Number(0).setWidth("40px"),this.add(this.xNumber,this.yNumber,this.zNumber),this.setValue(e);var t=document.createEvent("Event");return t.initEvent("change",!0,!0),this.xNumber.onChange(function(){this.dom.dispatchEvent(t)}.bind(this)),this.yNumber.onChange(function(){this.dom.dispatchEvent(t)}.bind(this)),this.zNumber.onChange(function(){this.dom.dispatchEvent(t)}.bind(this)),this},s.Vector3.prototype=Object.create(s.Panel.prototype),s.Vector3.prototype.getValue=function(){return{x:this.xNumber.getValue(),y:this.yNumber.getValue(),z:this.zNumber.getValue()}},s.Vector3.prototype.setValue=function(e){return e&&(this.xNumber.setValue(e.x),this.yNumber.setValue(e.y),this.zNumber.setValue(e.z)),this},s.Vector3.prototype.setPrecision=function(e){return this.xNumber.setPrecision(e),this.yNumber.setPrecision(e),this.zNumber.setPrecision(e),this},s.Vector3.prototype.setRange=function(e,t){return this.xNumber.setRange(e,t),this.yNumber.setRange(e,t),this.zNumber.setRange(e,t),this},s.SelectionInput=function(e){if(s.AdaptiveTextArea.call(this),this.setSpellcheck(!1),"selection"!==e.type)return r.error("UI.SelectionInput: not a selection",e),this;this.setValue(e.string),this.selection=e;var t=this;return e.signals.stringChanged.add((function(e){t.setValue(e)})),this.onEnter(),this},s.SelectionInput.prototype=Object.create(s.AdaptiveTextArea.prototype),s.SelectionInput.prototype.setValue=function(e){return s.AdaptiveTextArea.prototype.setValue.call(this,e),this},s.SelectionInput.prototype.onEnter=function(e){var t=this,n=function(e){return!new r.Selection(e).selection.error};return this.onKeyPress((function(i){var r=t.getValue(),s=String.fromCharCode(i.which);13===i.keyCode?(i.preventDefault(),n(r)?("function"==typeof e?e(r):t.selection.setString(r),t.setBackgroundColor("white")):t.setBackgroundColor("tomato")):t.selection.string!==r+s?t.setBackgroundColor("skyblue"):t.setBackgroundColor("white")})),this.onKeyUp((function(e){var i=t.getValue();n(i)?t.selection.string===t.getValue()?t.setBackgroundColor("white"):t.setBackgroundColor("skyblue"):t.setBackgroundColor("tomato")})),this},s.SelectionPanel=function(e){return s.Panel.call(this),this.icon=new s.Icon("filter").setTitle("filter selection").addClass("lg").setMarginRight("10px"),this.input=new s.SelectionInput(e),this.add(this.icon,this.input),this},s.SelectionPanel.prototype=Object.create(s.Panel.prototype),s.SelectionPanel.prototype.setInputWidth=function(e){return this.input.setWidth(e),this},s.ComponentPanel=function(e){s.Panel.call(this);var t=e.stage,n=e.signals;n.nameChanged.add((function(e){i.setValue(e)})),n.visibilityChanged.add((function(e){r.setValue(e)})),n.disposed.add((function(){l.dispose()}));var i=new s.EllipsisText(e.name).setWidth("100px"),r=new s.ToggleIcon(e.visible,"eye","eye-slash").setTitle("hide/show").setCursor("pointer").setMarginLeft("25px").onClick((function(){e.setVisibility(!e.visible)})),o=new s.Icon("bullseye").setTitle("center").setCursor("pointer").setMarginLeft("10px").onClick((function(){e.autoView(1e3)})),a=(new s.DisposeIcon).setMarginLeft("10px").setDisposeFunction((function(){t.removeComponent(e)})),l=new s.PopupMenu("bars",e.type).setMarginLeft("46px").setEntryLabelWidth("110px");return this.add(i,r,o,a,l),this.menu=l,this},s.ComponentPanel.prototype=Object.create(s.Panel.prototype),s.ComponentPanel.prototype.addMenuEntry=function(e,t){return this.menu.addEntry(e,t),this},s.ComponentPanel.prototype.setMenuDisplay=function(e){return this.menu.setMenuDisplay(e),this},e.exports={UI:s}},7412:function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))},Jupyter;Object.defineProperty(exports,"__esModule",{value:!0}),exports.NGLView=exports.NGLModel=void 0;var widgets=__webpack_require__(2055),NGL=__webpack_require__(485),BaseView=__webpack_require__(2555).BaseView;const $=__webpack_require__(1929),_=__webpack_require__(431);__webpack_require__(1147),__webpack_require__(3199),__webpack_require__(4197),__webpack_require__(6237),__webpack_require__(6870),__webpack_require__(4374),__webpack_require__(9446);const gui_1=__webpack_require__(5587),fullscreen_1=__webpack_require__(6219),color_1=__webpack_require__(5211),theme_1=__webpack_require__(4649),messageInterface_1=__webpack_require__(5080);NGL.nglview_debug=!1;const chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),uuid=new Array(36);function generateUUID(){let e,t=0;for(let n=0;n<36;n++)8===n||13===n||18===n||23===n?uuid[n]="-":14===n?uuid[n]="4":(t<=2&&(t=33554432+16777216*Math.random()|0),e=15&t,t>>=4,uuid[n]=chars[19===n?3&e|8:e]);return uuid.join("")}function createView(e,t){return __awaiter(this,void 0,void 0,(function*(){console.log("Creating view for model "+t);var n=e.model.widget_manager,i=e.model.get(t).replace("IPY_MODEL_","");return yield n.create_view(yield n.get_model(i))}))}class NGLModel extends widgets.DOMWidgetModel{defaults(){return _.extend(widgets.DOMWidgetModel.prototype.defaults(),{_model_name:"NGLModel",_model_module:"nglview-js-widgets",_model_module_version:__webpack_require__(8330).version,_view_name:"NGLView",_view_module:"nglview-js-widgets",_view_module_version:__webpack_require__(8330).version})}}exports.NGLModel=NGLModel;class NGLView extends widgets.DOMWidgetView{render(){this.beforeDisplay(),this.displayed.then(function(){this.createStage(),this.handlePicking(),this.handleSignals(),this.handleMessage(),this.finalizeDisplay()}.bind(this))}beforeDisplay(){this.model.on("change:_parameters",this.parametersChanged,this),this.model.on("change:gui_style",this.GUIStyleChanged,this),this.model.set("_ngl_version",NGL.Version),this._ngl_focused=0,this.uuid=generateUUID(),this.stage_widget=void 0,this.comp_uuids=[],this._synced_model_ids=this.model.get("_synced_model_ids"),this._synced_repr_model_ids=this.model.get("_synced_repr_model_ids"),this.isEmbeded()&&this._handleEmbedBeforeStage()}createStage(){var e=Object.assign({},this.model.get("_ngl_full_stage_parameters"));"backgroundColor"in e||(e.backgroundColor="white"),NGL.useWorker=!1,this.options.parent,this.stage=new NGL.Stage(void 0),this.$container=$(this.stage.viewer.container),this.$el.append(this.$container),this.stage.setParameters(e),this.$container=$(this.stage.viewer.container),this.handleResizable(),this.ngl_view_id=this.uuid,this.touch();var t=this.model.get("_view_width")||this.$el.parent().width()+"px",n=this.model.get("_view_height")||"300px";this.setSize(t,n),this.createFullscreenBtn(),this.createIPlayer(),this.GUIStyleChanged(),this.$container.resizable("option","maxWidth",this.$el.parent().width()),this.isEmbeded()?(console.log("Embed mode for NGLView"),this.handleEmbed()):(this.requestUpdateStageParameters(),1==this.model.views.length?this.serialize_camera_orientation():this.set_camera_orientation(this.model.get("_camera_orientation")))}isEmbeded(){return this.model.get("_ngl_serialize")||null==this.model.comm}handleMessage(){this.model.on("msg:custom",(e=>{this.on_msg(e)})),this.model.comm&&this.model.comm.on_msg((e=>{var t=e.buffers,n=e.content.data.content;t.length&&n&&(n.buffers=t),this.model._handle_comm_msg.call(this.model,e)}))}finalizeDisplay(){this.send({type:"request_loaded",data:!0});var e=this.stage.getParameters();this.model.set("_ngl_original_stage_parameters",e),this.touch(),!this.isEmbeded()&&this.stage.compList.lengthn&&(a.stage.removeComponent(a.stage.compList[t]),o=!0)}o&&(console.log("should update backend"),this.send({type:"removeComponent",data:t}))}))}),this),this.stage.signals.parametersChanged.add((function(){this.requestUpdateStageParameters()}),this),this.stage.viewerControls.signals.changed.add(function(){this.serialize_camera_orientation();var e=this.stage.viewerControls.getOrientation();t._synced_model_ids.length>0&&1==t._ngl_focused&&t._synced_model_ids.forEach((function(n){return __awaiter(this,void 0,void 0,(function*(){var i=yield t.model.widget_manager.get_model(n);for(var r in i.views){i.views[r];var s=yield i.views[r];s.uuid!=t.uuid&&s.stage.viewerControls.orient(e)}}))}))}.bind(this))}handlePicking(){this.$pickingInfo=$("
").css("position","absolute").css("top","5%").css("left","3%").css("background-color","white").css("padding","2px 5px 2px 5px").css("opacity","0.7").appendTo(this.$container),this.stage.signals.clicked.add((function(e){if(e){this.model.set("picked",{}),this.touch();var t={},n="";e.atom?(t.atom1=e.atom.toObject(),t.atom1.name=e.atom.qualifiedName(),n="Atom: "+t.atom1.name):e.bond&&(t.bond=e.bond.toObject(),t.atom1=e.bond.atom1.toObject(),t.atom1.name=e.bond.atom1.qualifiedName(),t.atom2=e.bond.atom2.toObject(),t.atom2.name=e.bond.atom2.qualifiedName(),n="Bond: "+t.atom1.name+" - "+t.atom2.name),e.instance&&(t.instance=e.instance);for(var i=this.stage.compList.length,r=0;r0&&(this.stage.viewerControls.orient(e),this.serialize_camera_orientation())}executeCode(code){eval(code)}_handleEmbedBeforeStage(){var e,t=this.model.get("_ngl_color_dict");for(e in t)NGL.ColormakerRegistry.hasScheme(e)||this.addColorScheme(t[e],e)}handleEmbed(){return __awaiter(this,void 0,void 0,(function*(){var e=this,t=e.model.get("_ngl_msg_archive"),n=e.model.get("_ngl_full_stage_parameters");const i=e.model.get("_camera_orientation");if(0!==Object.keys(n).length||0!==i.length){var r=[];if(_.each(t,(function(t){"loadFile"==t.methodName&&(t.kwargs&&t.kwargs.defaultRepresentation&&(t.kwargs.defaultRepresentation=!1),r.push(e._getLoadFilePromise(t)))})),yield Promise.all(r),e.stage.setParameters(n),e.set_camera_orientation(i),e.touch(),void 0===e.model.comm){var s=e.model.get("_ngl_coordinate_resource"),o=s.n_frames||1;e.model.set("max_frame",o-1),e.touch();var a=(yield e.getPlayerModel()).get("children")[0];e.listenTo(a,"change:value",(function(){e.updateCoordinatesFromDict(s,a.get("value"))}))}for(const t of e.model.get("_ngl_msg_archive"))t.fire_embed&&(yield e.on_msg(t));e._set_representation_from_repr_dict(e.model.get("_ngl_repr_dict")),e.handleResize()}else{console.log("No state stored; initializing embedded widget for the first time.");for(const n of t)yield e.on_msg(n)}}))}updateCoordinatesFromDict(e,t){for(var n=Object.keys(e).filter((e=>"n_frames"!==e)),i=0;i0&&this.updateCoordinates(s,r)}}requestFrame(){this.send({type:"request_frame",data:"frame"})}requestUpdateStageParameters(){var e=this.stage.getParameters();this.model.set("_ngl_full_stage_parameters",e),this.touch()}requestReprParameters(e,t){var n=this.stage.compList[e].reprList[t],i=n.repr.getParameters();i&&(i.name=n.name,this.send({type:"repr_parameters",data:i}))}request_repr_dict(){var e=this.getReprDictFrontEnd();this.send({type:"request_repr_dict",data:e});var t=this;t._synced_repr_model_ids.length>0&&t._synced_repr_model_ids.forEach((function(n){return __awaiter(this,void 0,void 0,(function*(){var i=yield t.model.widget_manager.get_model(n);for(var r in i.views){var s=yield i.views[r];s.uuid!=t.uuid&&s._set_representation_from_repr_dict(e)}}))}))}getReprDictFrontEnd(){for(var e={},t=this.stage.compList.length,n=0;n0)for(var n in e){var i=t[n];i.removeAllRepresentations();var r=e[n];for(var s in r){var o=r[s];o&&i.addRepresentation(o.type,o.params)}}}createView(e){return __awaiter(this,void 0,void 0,(function*(){console.log("Creating view for model "+e);var t=this.model.widget_manager,n=this.model.get(e).replace("IPY_MODEL_","");return yield t.create_view(yield t.get_model(n))}))}getPlayerModel(){var e=this.model.get("_iplayer").replace("IPY_MODEL_","");return this.model.widget_manager.get_model(e)}createIPlayer(){return __awaiter(this,void 0,void 0,(function*(){this.player_pview=this.createView("_iplayer");var e=yield this.player_pview,t=e.el;t.style.position="absolute",t.style.zIndex=100,t.style.bottom="5%",t.style.left="10%",t.style.opacity="0.7",this.stage.viewer.container.append(e.el),t.style.display="none"}))}createImageBtn(){return __awaiter(this,void 0,void 0,(function*(){this.image_btn_pview=this.createView("_ibtn_image");var e=yield this.image_btn_pview,t=e.el;t.style.position="absolute",t.style.zIndex=100,t.style.top="5%",t.style.right="10%",t.style.opacity="0.7",t.style.width="35px",this.stage.viewer.container.append(e.el)}))}createFullscreenBtn(){return __awaiter(this,void 0,void 0,(function*(){this.btn_pview_fullscreen=this.createView("_ibtn_fullscreen");var e=yield this.btn_pview_fullscreen,t=this.stage,n=e.el;n.style.position="absolute",n.style.zIndex=100,n.style.top="5%",n.style.right="5%",n.style.opacity="0.7",n.style.width="35px",n.style.background="white",n.style.opacity="0.3",n.style.display="none",n.onclick=function(){this.stage.toggleFullscreen()}.bind(this),t.viewer.container.append(e.el),t.signals.fullscreenChanged.add((function(t){t?e.model.set("icon","compress"):e.model.set("icon","expand")}))}))}createGUI(){return __awaiter(this,void 0,void 0,(function*(){this.pgui_view=this.createView("_igui");var e=yield this.pgui_view,t=e.el;t.style.position="absolute",t.style.zIndex=100,t.style.top="5%",t.style.right="10%",t.style.width="300px",this.stage.viewer.container.append(e.el)}))}createNglGUI(){this.stage_widget=new gui_1.StageWidget(this)}setVisibilityForRepr(e,t,n){var i=this.stage.compList[e].reprList[t];i&&i.setVisibility(n)}removeRepresentation(e,t){var n=this.stage.compList[e],i=n.reprList[t];i&&n.removeRepresentation(i)}removeRepresentationsByName(e,t){var n=this.stage.compList[t];n&&n.reprList.forEach((function(t){t.name==e&&n.removeRepresentation(t)}))}updateRepresentationForComponent(e,t,n){var i=this.stage.compList[t].reprList[e];i&&i.setParameters(n)}updateRepresentationsByName(e,t,n){var i=this.stage.compList[t],r=this;i&&i.reprList.forEach((function(t){t.name==e&&(t.setParameters(n),r.request_repr_dict())}))}setRepresentation(e,t,n,i){var r=this.stage.compList[n],s=r.reprList[i];if(s){t.useWorker=!1;var o=NGL.makeRepresentation(e,r.structure,this.stage.viewer,t);o&&(s.setRepresentation(o),s.name=e,r.reprList[i]=s,this.request_repr_dict())}}setColorByResidue(e,t,n){var i=this.stage.compList[t].reprList[n],r=NGL.ColormakerRegistry.addScheme((function(t){this.atomColor=function(t){return e[t.residueIndex]}}));i.setColor(r)}addShape(e,t){for(var n=new NGL.Shape(e),i={sphere:n.addSphere,ellipsoid:n.addEllipsoid,cylinder:n.addCylinder,cone:n.addCone,mesh:n.addMesh,arrow:n.addArrow,text:n.addText,label:n.addText,tetrahedron:n.addTetrahedron,octahedron:n.addOctahedron,torus:n.addTorus},r=0;r>4,h[c++]=(15&i)<<4|r>>2,h[c++]=(3&r)<<6|63&s;return u}updateCoordinates(e,t){var n=this.stage.compList[t];if(e&&n){var i=new Float32Array(e);n.structure.updatePosition(i),n.updateRepresentations({position:!0})}}handleResizable(){this.$container.resizable({resize:function(e,t){this.setSize(t.size.width+"px",t.size.height+"px")}.bind(this)})}handleResize(){var e=this.$el.width(),t=this.$el.height()+"px";this.stage_widget&&(e-=$(this.stage_widget.sidebar.dom).width()),e+="px",this.setSize(e,t)}setSize(e,t){this.stage.viewer.container.style.width=e,this.stage.viewer.container.style.height=t,this.stage.handleResize()}GUIStyleChanged(){if("ngl"===this.model.get("gui_style"))this.createNglGUI();else if(this.stage_widget){this.stage_widget.dispose(),this.stage_widget=void 0,this.$container.resizable("enable");var e=this.$el.parent().width()+"px",t=this.$el.parent().height()+"px";this.setSize(e,t)}}parametersChanged(){var e=this.model.get("_parameters");this.setParameters(e)}setParameters(e){this.stage.setParameters(e);var t=this.stage.getParameters();this.send({type:"stage_parameters",data:t})}_downloadImage(e,t){return __awaiter(this,void 0,void 0,(function*(){if(this.ngl_view_id==this.get_last_child_id()){var n=yield this.stage.makeImage(t);NGL.download(n,e)}}))}_exportImage(e,t){return __awaiter(this,void 0,void 0,(function*(){if(this.ngl_view_id==this.get_last_child_id()){var n,i=yield this.stage.makeImage(t),r=new FileReader;r.onload=function(){n=r.result.replace("data:image/png;base64,",""),this.send({data:n,type:"image_data",ID:e}),this.send({type:"async_message",data:"ok"})}.bind(this),r.readAsDataURL(i)}}))}handleMovieMaking(e){return __awaiter(this,void 0,void 0,(function*(){if(console.log("handleMovieMaking: render_params",e),this.ngl_view_id==this.get_last_child_id()){var t,n=yield this.stage.makeImage(e),i=new FileReader;i.onload=function(){t=i.result.replace("data:image/png;base64,",""),this.send({data:t,type:"movie_image_data"}),this.send({type:"async_message",data:"ok"})}.bind(this),i.readAsDataURL(n)}}))}_handleLoadFileFinished(){return __awaiter(this,void 0,void 0,(function*(){this.send({type:"async_message",data:"ok"})}))}_getLoadFilePromise(e){var t,n=e.args[0];if("blob"==n.type){var i;if(n.binary){var r=this.decode_base64(n.data);i=new Blob([r],{type:"application/octet-binary"})}else i=new Blob([n.data],{type:"text/plain"});return this.stage.loadFile(i,e.kwargs)}return new File([""],n.data),t=n.data,this.stage.loadFile(t,e.kwargs)}get_last_child_id(){var e=this.model.get("_ngl_view_id");return e[e.length-1]}_handleStageLoadFile(e){return __awaiter(this,void 0,void 0,(function*(){this.ngl_view_id!=this.get_last_child_id()&&e.last_child||(yield this._getLoadFilePromise(e),this._handleLoadFileFinished())}))}addColorScheme(e,t){var n=NGL.ColormakerRegistry.addSelectionScheme(e,t),i=NGL.ColormakerRegistry.userSchemes[n];return NGL.ColormakerRegistry.removeScheme(n),NGL.ColormakerRegistry.add(t,i),t}on_msg(e){return __awaiter(this,void 0,void 0,(function*(){try{yield messageInterface_1.IMessageSchema.validate(e)}catch(e){return void console.error("Invalid message:",e)}switch(e.type){case"call_method":yield this.handleCallMethod(e);break;case"base64_single":this.handleBase64Single(e.data);break;case"binary_single":this.handleBinarySingle(e);break;case"movie_image_data":this.handleMovieMaking(e.render_params);break;case"get":this.handleGetRequest(e.data);break;case"request_frame":this.requestFrame();break;case"updateIDs":this.updateIDs(e.data);break;case"removeComponent":this.removeComponent(e.data);break;case"repr_parameters":this.requestReprParameters(e.component_index,e.repr_index);break;case"request_loaded":this.requestLoaded();break;case"request_repr_dict":this.request_repr_dict();break;case"stage_parameters":this.requestUpdateStageParameters();break;case"async_message":this.sendAsyncMessage(e.data);break;case"image_data":this.handleImageData(e.ID,e.data);break;default:console.log("Unknown message type: "+e.type)}}))}handleCallMethod(e){return __awaiter(this,void 0,void 0,(function*(){var t,n,i=e.args.slice();switch(i.push(e.kwargs),"addRepresentation"===e.methodName&&e.reconstruc_color_scheme&&(e.kwargs.color=this.addColorScheme(e.kwargs.color,e.kwargs.color_label)),"colorVolume"in e.kwargs&&(t=e.kwargs.colorVolume,e.kwargs.colorVolume=this.stage.compList[t].volume),e.target){case"Stage":yield this.handleStageMethod(e,i);break;case"Viewer":this.stage.viewer[e.methodName].apply(this.stage.viewer,i);break;case"viewerControls":this.stage.viewerControls[e.methodName].apply(this.stage.viewerControls,i);break;case"compList":(n=this.stage.compList[e.component_index])[e.methodName].apply(n,i);break;case"Widget":this[e.methodName].apply(this,i);break;case"Representation":var r=(n=this.stage.compList[e.component_index]).reprList[e.repr_index];r[e.methodName].apply(r,i);break;default:console.log("Unknown target: "+e.target)}}))}handleStageMethod(e,t){return __awaiter(this,void 0,void 0,(function*(){var n=this.stage[e.methodName];if("screenshot"===e.methodName)NGL.screenshot(this.stage.viewer,e.kwargs);else if("removeComponent"===e.methodName){var i=this.stage.compList[e.args[0]];this.stage.removeComponent(i)}else"loadFile"===e.methodName?(this.model.views.length>1&&e.kwargs&&e.kwargs.defaultRepresentation&&(e.kwargs.defaultRepresentation=!1),yield this._handleStageLoadFile(e)):n.apply(this.stage,t)}))}handleBase64Single(e){for(var t=Object.keys(e),n=0;n0&&this.updateCoordinates(r,i)}}handleBinarySingle(e){for(var t=e.data,n=Object.keys(t),i=0;i0&&this.updateCoordinates(s,r)}e.movie_making&&this.handleMovieMaking(e.render_params)}handleGetRequest(e){"camera"===e?this.send(JSON.stringify(this.stage.viewer.camera)):"parameters"===e?this.send(JSON.stringify(this.stage.parameters)):(console.log("Number of components",this.stage.compList.length),console.log("ngl_view_id",this.ngl_view_id))}updateIDs(e){var t=this.model.get("_ngl_view_id");t.push(this.ngl_view_id),this.send({type:"updateIDs",data:t})}removeComponent(e){var t=this.stage.compList[e];this.stage.removeComponent(t)}requestLoaded(){this.send({type:"request_loaded",data:!0})}sendAsyncMessage(e){this.send({type:"async_message",data:e})}handleImageData(e,t){this.send({data:t,type:"image_data",ID:e})}}exports.NGLView=NGLView,module.exports={NGLView,NGLModel,NGL,FullscreenModel:fullscreen_1.FullscreenModel,FullscreenView:fullscreen_1.FullscreenView,ColormakerRegistryModel:color_1.ColormakerRegistryModel,ColormakerRegistryView:color_1.ColormakerRegistryView,ThemeManagerModel:theme_1.ThemeManagerModel,ThemeManagerView:theme_1.ThemeManagerView}},9894:function(e,t,n){var i;e=n.nmd(e),function(){var n,r,s,o,a,l,c,u,h,d,p,f,m,g,_,v,y,b,x,w,S,A,M,C,T,E,P,I,k,R,D,L,O,N,F,B,U,z,V,H,$,G,j,W,q,X,Y,K,Z,Q,J,ee,te,ne,ie,re,se,oe,ae,le,ce,ue,he,de,pe,fe,me,ge,_e,ve,ye,be,xe,we,Se,Ae,Me,Ce,Te,Ee,Pe=[].slice;Ae=function(){var e,t,n,i,r;for(e={},i=0,t=(r="Boolean Number String Function Array Date RegExp Undefined Null".split(" ")).length;in&&(e=n),e},Me=function(e){return e.length>=3?Array.prototype.slice.call(e):e[0]},S=function(e){var t,n;for(e._clipped=!1,e._unclipped=e.slice(0),t=n=0;n<3;t=++n)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]<0&&(e[t]=0),e[t]>255&&(e[t]=255)):3===t&&(e[t]<0&&(e[t]=0),e[t]>1&&(e[t]=1));return e._clipped||delete e._unclipped,e},o=Math.PI,ye=Math.round,M=Math.cos,I=Math.floor,ie=Math.pow,K=Math.log,xe=Math.sin,we=Math.sqrt,g=Math.atan2,J=Math.max,m=Math.abs,c=2*o,a=o/3,r=o/180,l=180/o,w=function(){return arguments[0]instanceof n?arguments[0]:function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,arguments,(function(){}))},w.default=w,f=[],null!==e&&null!=e.exports&&(e.exports=w),void 0===(i=function(){return w}.apply(t,[]))||(e.exports=i),w.version="1.4.1",p={},h=[],d=!1,n=function(){function e(){var e,t,n,i,r,s,o,a,l;for(s=this,t=[],a=0,i=arguments.length;a1&&(o=t[t.length-1]),null!=p[o])s._rgb=S(p[o](Me(t.slice(0,-1))));else{for(d||(h=h.sort((function(e,t){return t.p-e.p})),d=!0),l=0,r=h.length;l3?t[3]:1]},Ee=function(e){return 255*(e<=.00304?12.92*e:1.055*ie(e,1/2.4)-.055)},j=function(e){return e>s.t1?e*e*e:s.t2*(e-s.t0)},s={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},he=function(){var e,t,n,i,r,s,o;return n=(i=Me(arguments))[0],t=i[1],e=i[2],s=(r=ge(n,t,e))[0],[116*(o=r[1])-16,500*(s-o),200*(o-r[2])]},_e=function(e){return(e/=255)<=.04045?e/12.92:ie((e+.055)/1.055,2.4)},Te=function(e){return e>s.t3?ie(e,1/3):e/s.t2+s.t0},ge=function(){var e,t,n,i;return n=(i=Me(arguments))[0],t=i[1],e=i[2],n=_e(n),t=_e(t),e=_e(e),[Te((.4124564*n+.3575761*t+.1804375*e)/s.Xn),Te((.2126729*n+.7151522*t+.072175*e)/s.Yn),Te((.0193339*n+.119192*t+.9503041*e)/s.Zn)]},w.lab=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["lab"]),(function(){}))},p.lab=G,n.prototype.lab=function(){return he(this._rgb)},_=function(e){var t,n,i,r,s,o,a,l,c,u,h;return 2===(e=function(){var t,n,i;for(i=[],n=0,t=e.length;n=0&&t[3]<=1?"rgb":void 0}}),p.lrgb=p.rgb,z=function(e,t,i,r){var s,o;return s=e._rgb,o=t._rgb,new n(we(ie(s[0],2)*(1-i)+ie(o[0],2)*i),we(ie(s[1],2)*(1-i)+ie(o[1],2)*i),we(ie(s[2],2)*(1-i)+ie(o[2],2)*i),r)},u=function(e){var t,i,r,s,o;for(t=1/e.length,o=[0,0,0,0],r=0,i=e.length;r1&&(o[3]=1),new n(S(o))},f.push(["lrgb",z]),w.average=function(e,t){var n,i,r,s,a,l,c,h,d,p,f,m,_;if(null==t&&(t="rgb"),d=e.length,e=e.map((function(e){return w(e)})),c=e.splice(0,1)[0],"lrgb"===t)return u(e);for(h in s=[],a=0,l=0,m=c.get(t))m[h]=m[h]||0,s.push(isNaN(m[h])?0:1),"h"!==t.charAt(h)||isNaN(m[h])||(n=m[h]/180*o,a+=M(n),l+=xe(n));for(i=c.alpha(),f=0,p=e.length;f=360;)n-=360;m[h]=n}else m[h]=m[h]/s[h];return w(m,t).alpha(i/d)},R=function(e){var t,n;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[(n=parseInt(e,16))>>16,n>>8&255,255&n,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return 9===e.length&&(e=e.substr(1)),[(n=parseInt(e,16))>>24&255,n>>16&255,n>>8&255,ye((255&n)/255*100)/100];if(null!=p.css&&(t=p.css(e)))return t;throw"unknown color: "+e},ae=function(e,t){var n,i,r,s,o,a;return null==t&&(t="auto"),o=e[0],r=e[1],i=e[2],n=e[3],"auto"===t&&(t=n<1?"rgba":"rgb"),o=Math.round(o),r=Math.round(r),i=Math.round(i),a=(a="000000"+(o<<16|r<<8|i).toString(16)).substr(a.length-6),s=(s="0"+ye(255*n).toString(16)).substr(s.length-2),"#"+function(){switch(t.toLowerCase()){case"rgba":return a+s;case"argb":return s+a;default:return a}}()},p.hex=function(e){return R(e)},w.hex=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["hex"]),(function(){}))},n.prototype.hex=function(e){return null==e&&(e="auto"),ae(this._rgb,e)},h.push({p:4,test:function(e){if(1===arguments.length&&"string"===Ae(e))return"hex"}}),O=function(){var e,t,n,i,r,s,o,a,l,c,u,h,d,p;if(r=(e=Me(arguments))[0],u=e[1],o=e[2],0===u)l=i=t=255*o;else{for(n=[0,0,0],h=2*o-(d=o<.5?o*(1+u):o+u-o*u),(p=[0,0,0])[0]=(r/=360)+1/3,p[1]=r,p[2]=r-1/3,s=a=0;a<=2;s=++a)p[s]<0&&(p[s]+=1),p[s]>1&&(p[s]-=1),6*p[s]<1?n[s]=h+6*(d-h)*p[s]:2*p[s]<1?n[s]=d:3*p[s]<2?n[s]=h+(d-h)*(2/3-p[s])*6:n[s]=h;l=(c=[ye(255*n[0]),ye(255*n[1]),ye(255*n[2])])[0],i=c[1],t=c[2]}return e.length>3?[l,i,t,e[3]]:[l,i,t]},ce=function(e,t,n){var i,r,s,o,a;return void 0!==e&&e.length>=3&&(e=(o=e)[0],t=o[1],n=o[2]),e/=255,t/=255,n/=255,s=Math.min(e,t,n),r=((J=Math.max(e,t,n))+s)/2,J===s?(a=0,i=Number.NaN):a=r<.5?(J-s)/(J+s):(J-s)/(2-J-s),e===J?i=(t-n)/(J-s):t===J?i=2+(n-e)/(J-s):n===J&&(i=4+(e-t)/(J-s)),(i*=60)<0&&(i+=360),[i,a,r]},w.hsl=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["hsl"]),(function(){}))},p.hsl=O,n.prototype.hsl=function(){return ce(this._rgb)},N=function(){var e,t,n,i,r,s,o,a,l,c,u,h,d,p,f,m,g,_;if(r=(e=Me(arguments))[0],m=e[1],_=e[2],_*=255,0===m)l=i=t=_;else switch(360===r&&(r=0),r>360&&(r-=360),r<0&&(r+=360),o=_*(1-m),a=_*(1-m*(n=(r/=60)-(s=I(r)))),g=_*(1-m*(1-n)),s){case 0:l=(c=[_,g,o])[0],i=c[1],t=c[2];break;case 1:l=(u=[a,_,o])[0],i=u[1],t=u[2];break;case 2:l=(h=[o,_,g])[0],i=h[1],t=h[2];break;case 3:l=(d=[o,a,_])[0],i=d[1],t=d[2];break;case 4:l=(p=[g,o,_])[0],i=p[1],t=p[2];break;case 5:l=(f=[_,o,a])[0],i=f[1],t=f[2]}return[l,i,t,e.length>3?e[3]:1]},ue=function(){var e,t,n,i,r,s,o,a,l;return s=(o=Me(arguments))[0],n=o[1],e=o[2],r=Math.min(s,n,e),t=(J=Math.max(s,n,e))-r,l=J/255,0===J?(i=Number.NaN,a=0):(a=t/J,s===J&&(i=(n-e)/t),n===J&&(i=2+(e-s)/t),e===J&&(i=4+(s-n)/t),(i*=60)<0&&(i+=360)),[i,a,l]},w.hsv=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["hsv"]),(function(){}))},p.hsv=N,n.prototype.hsv=function(){return ue(this._rgb)},te=function(e){return"number"===Ae(e)&&e>=0&&e<=16777215?[e>>16,e>>8&255,255&e,1]:(console.warn("unknown num color: "+e),[0,0,0,1])},fe=function(){var e;return((e=Me(arguments))[0]<<16)+(e[1]<<8)+e[2]},w.num=function(e){return new n(e,"num")},n.prototype.num=function(e){return null==e&&(e="rgb"),fe(this._rgb,e)},p.num=te,h.push({p:1,test:function(e){if(1===arguments.length&&"number"===Ae(e)&&e>=0&&e<=16777215)return"num"}}),k=function(){var e,t,n,i,r,s,o,a,l,c,u,h,d,p,f,m,g,_,v,y;if(a=(n=Me(arguments))[0],r=n[1],t=n[2],o=o/100*255,e=255*(r/=100),0===r)h=o=i=t;else switch(360===a&&(a=0),a>360&&(a-=360),a<0&&(a+=360),u=(c=t*(1-r))+e*(1-(s=(a/=60)-(l=I(a)))),v=c+e*s,y=c+e,l){case 0:h=(d=[y,v,c])[0],o=d[1],i=d[2];break;case 1:h=(p=[u,y,c])[0],o=p[1],i=p[2];break;case 2:h=(f=[c,y,v])[0],o=f[1],i=f[2];break;case 3:h=(m=[c,u,y])[0],o=m[1],i=m[2];break;case 4:h=(g=[v,c,y])[0],o=g[1],i=g[2];break;case 5:h=(_=[y,c,u])[0],o=_[1],i=_[2]}return[h,o,i,n.length>3?n[3]:1]},oe=function(){var e,t,n,i,r,s,o,a,l;return a=(l=Me(arguments))[0],r=l[1],t=l[2],o=Math.min(a,r,t),n=100*(i=(J=Math.max(a,r,t))-o)/255,e=o/(255-i)*100,0===i?s=Number.NaN:(a===J&&(s=(r-t)/i),r===J&&(s=2+(t-a)/i),t===J&&(s=4+(a-r)/i),(s*=60)<0&&(s+=360)),[s,n,e]},w.hcg=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["hcg"]),(function(){}))},p.hcg=k,n.prototype.hcg=function(){return oe(this._rgb)},C=function(e){var t,n,i,r,s,o,a,l;if(e=e.toLowerCase(),null!=w.colors&&w.colors[e])return R(w.colors[e]);if(s=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(a=s.slice(1,4),r=o=0;o<=2;r=++o)a[r]=+a[r];a[3]=1}else if(s=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(a=s.slice(1,5),r=l=0;l<=3;r=++l)a[r]=+a[r];else if(s=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(a=s.slice(1,4),r=t=0;t<=2;r=++t)a[r]=ye(2.55*a[r]);a[3]=1}else if(s=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(a=s.slice(1,5),r=n=0;n<=2;r=++n)a[r]=ye(2.55*a[r]);a[3]=+a[3]}else(s=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?((i=s.slice(1,4))[1]*=.01,i[2]*=.01,(a=O(i))[3]=1):(s=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&((i=s.slice(1,4))[1]*=.01,i[2]*=.01,(a=O(i))[3]=+s[4]);return a},se=function(e){var t;return"rgb"==(t=e[3]<1?"rgba":"rgb")?t+"("+e.slice(0,3).map(ye).join(",")+")":"rgba"===t?t+"("+e.slice(0,3).map(ye).join(",")+","+e[3]+")":void 0},ve=function(e){return ye(100*e)/100},L=function(e,t){var n;return n=t<1?"hsla":"hsl",e[0]=ve(e[0]||0),e[1]=ve(100*e[1])+"%",e[2]=ve(100*e[2])+"%","hsla"===n&&(e[3]=t),n+"("+e.join(",")+")"},p.css=function(e){return C(e)},w.css=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["css"]),(function(){}))},n.prototype.css=function(e){return null==e&&(e="rgb"),"rgb"===e.slice(0,3)?se(this._rgb):"hsl"===e.slice(0,3)?L(this.hsl(),this.alpha()):void 0},p.named=function(e){return R(Ce[e])},h.push({p:5,test:function(e){if(1===arguments.length&&null!=Ce[e])return"named"}}),n.prototype.name=function(e){var t,n;for(n in arguments.length&&(Ce[e]&&(this._rgb=R(Ce[e])),this._rgb[3]=1),t=this.hex("rgb"),Ce)if(t===Ce[n])return n;return t},W=function(){var e,t,n,i;return n=(i=Me(arguments))[0],e=i[1],t=i[2],[n,M(t*=r)*e,xe(t)*e]},q=function(){var e,t,n,i,r,s,o,a,l;return o=(n=Me(arguments))[0],r=n[1],s=n[2],e=(a=W(o,r,s))[0],t=a[1],i=a[2],[(l=G(e,t,i))[0],l[1],i=l[2],n.length>3?n[3]:1]},$=function(){var e,t,n,i,r,s;return r=(s=Me(arguments))[0],e=s[1],t=s[2],n=we(e*e+t*t),i=(g(t,e)*l+360)%360,0===ye(1e4*n)&&(i=Number.NaN),[r,n,i]},de=function(){var e,t,n,i,r,s,o;return r=(s=Me(arguments))[0],n=s[1],t=s[2],i=(o=he(r,n,t))[0],e=o[1],t=o[2],$(i,e,t)},w.lch=function(){var e;return e=Me(arguments),new n(e,"lch")},w.hcl=function(){var e;return e=Me(arguments),new n(e,"hcl")},p.lch=q,p.hcl=function(){var e,t,n,i;return t=(i=Me(arguments))[0],e=i[1],n=i[2],q([n,e,t])},n.prototype.lch=function(){return de(this._rgb)},n.prototype.hcl=function(){return de(this._rgb).reverse()},re=function(e){var t,n,i,r,s,o;return null==e&&(e="rgb"),s=(o=Me(arguments))[0],i=o[1],t=o[2],i/=255,t/=255,[(1-(s/=255)-(r=1-Math.max(s,Math.max(i,t))))*(n=r<1?1/(1-r):0),(1-i-r)*n,(1-t-r)*n,r]},A=function(){var e,t,n,i,r,s;return n=(t=Me(arguments))[0],r=t[1],s=t[2],i=t[3],e=t.length>4?t[4]:1,1===i?[0,0,0,e]:[n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),s>=1?0:255*(1-s)*(1-i),e]},p.cmyk=function(){return A(Me(arguments))},w.cmyk=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["cmyk"]),(function(){}))},n.prototype.cmyk=function(){return re(this._rgb)},p.gl=function(){var e,t,n,i,r;for(i=function(){var e,n;for(t in n=[],e=Me(arguments))r=e[t],n.push(r);return n}.apply(this,arguments),e=n=0;n<=2;e=++n)i[e]*=255;return i},w.gl=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["gl"]),(function(){}))},n.prototype.gl=function(){var e;return[(e=this._rgb)[0]/255,e[1]/255,e[2]/255,e[3]]},pe=function(e,t,n){var i;return e=(i=Me(arguments))[0],t=i[1],n=i[2],.2126*(e=Z(e))+.7152*(t=Z(t))+.0722*Z(n)},Z=function(e){return(e/=255)<=.03928?e/12.92:ie((e+.055)/1.055,2.4)},H=function(e,t,i,r){var s,o;return s=e._rgb,o=t._rgb,new n(s[0]+i*(o[0]-s[0]),s[1]+i*(o[1]-s[1]),s[2]+i*(o[2]-s[2]),r)},f.push(["rgb",H]),n.prototype.luminance=function(e,t){var n,i,r,s;return null==t&&(t="rgb"),arguments.length?(r=this._rgb,0===e?r=[0,0,0,this._rgb[3]]:1===e?r=[255,255,255,this[3]]:(n=pe(this._rgb),i=20,s=function(n,r){var o,a;return o=(a=n.interpolate(r,.5,t)).luminance(),Math.abs(e-o)<1e-7||!i--?a:o>e?s(n,a):s(a,r)},r=n>e?s(w("black"),this).rgba():s(this,w("white")).rgba()),w(r).alpha(this.alpha())):pe(this._rgb)},Se=function(e){var t,n,i,r;return(r=e/100)<66?(i=255,n=-155.25485562709179-.44596950469579133*(n=r-2)+104.49216199393888*K(n),t=r<20?0:.8274096064007395*(t=r-10)-254.76935184120902+115.67994401066147*K(t)):(i=351.97690566805693+.114206453784165*(i=r-55)-40.25366309332127*K(i),n=325.4494125711974+.07943456536662342*(n=r-50)-28.0852963507957*K(n),t=255),[i,n,t]},me=function(){var e,t,n,i,r,s,o;for(i=(r=Me(arguments))[0],r[1],e=r[2],n=1e3,t=4e4;t-n>.4;)(s=Se(o=.5*(t+n)))[2]/s[0]>=e/i?t=o:n=o;return ye(o)},w.temperature=w.kelvin=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["temperature"]),(function(){}))},p.temperature=p.kelvin=p.K=Se,n.prototype.temperature=function(){return me(this._rgb)},n.prototype.kelvin=n.prototype.temperature,w.contrast=function(e,t){var i,r,s,o;return"string"!==(s=Ae(e))&&"number"!==s||(e=new n(e)),"string"!==(o=Ae(t))&&"number"!==o||(t=new n(t)),(i=e.luminance())>(r=t.luminance())?(i+.05)/(r+.05):(r+.05)/(i+.05)},w.distance=function(e,t,i){var r,s,o,a,l,c,u;for(s in null==i&&(i="lab"),"string"!==(l=Ae(e))&&"number"!==l||(e=new n(e)),"string"!==(c=Ae(t))&&"number"!==c||(t=new n(t)),o=e.get(i),a=t.get(i),u=0,o)u+=(r=(o[s]||0)-(a[s]||0))*r;return Math.sqrt(u)},w.deltaE=function(e,t,i,r){var s,a,l,c,u,h,d,p,f,_,v,y,b,x,w,S,A,C,T,E,P,I,k,R;for(null==i&&(i=1),null==r&&(r=1),"string"!==(w=Ae(e))&&"number"!==w||(e=new n(e)),"string"!==(S=Ae(t))&&"number"!==S||(t=new n(t)),s=(A=e.lab())[0],l=A[1],u=A[2],a=(C=t.lab())[0],c=C[1],h=C[2],d=we(l*l+u*u),p=we(c*c+h*h),E=s<16?.511:.040975*s/(1+.01765*s),T=.0638*d/(1+.0131*d)+.638,x=d<1e-6?0:180*g(u,l)/o;x<0;)x+=360;for(;x>=360;)x-=360;return P=x>=164&&x<=345?.56+m(.2*M(o*(x+168)/180)):.36+m(.4*M(o*(x+35)/180)),b=we((f=d*d*d*d)/(f+1900)),we((I=(s-a)/(i*E))*I+(k=(y=d-p)/(r*T))*k+((_=l-c)*_+(v=u-h)*v-y*y)/((R=T*(b*P+1-b))*R))},n.prototype.get=function(e){var t,n,i,r,s;return i=(r=e.split("."))[0],t=r[1],s=this[i](),t?(n=i.indexOf(t))>-1?s[n]:console.warn("unknown channel "+t+" in mode "+i):s},n.prototype.set=function(e,t){var n,i,r,s,o;if(r=(s=e.split("."))[0],n=s[1])if(o=this[r](),(i=r.indexOf(n))>-1)if("string"===Ae(t))switch(t.charAt(0)){case"+":case"-":o[i]+=+t;break;case"*":o[i]*=+t.substr(1);break;case"/":o[i]/=+t.substr(1);break;default:o[i]=+t}else o[i]=t;else console.warn("unknown channel "+n+" in mode "+r);else o=t;return w(o,r).alpha(this.alpha())},n.prototype.clipped=function(){return this._rgb._clipped||!1},n.prototype.alpha=function(e){return arguments.length?w.rgb([this._rgb[0],this._rgb[1],this._rgb[2],e]):this._rgb[3]},n.prototype.darken=function(e){var t;return null==e&&(e=1),(t=this.lab())[0]-=s.Kn*e,w.lab(t).alpha(this.alpha())},n.prototype.brighten=function(e){return null==e&&(e=1),this.darken(-e)},n.prototype.darker=n.prototype.darken,n.prototype.brighter=n.prototype.brighten,n.prototype.saturate=function(e){var t;return null==e&&(e=1),(t=this.lch())[1]+=e*s.Kn,t[1]<0&&(t[1]=0),w.lch(t).alpha(this.alpha())},n.prototype.desaturate=function(e){return null==e&&(e=1),this.saturate(-e)},n.prototype.premultiply=function(){var e,t;return t=this.rgb(),e=this.alpha(),w(t[0]*e,t[1]*e,t[2]*e,e)},ee=function(e,t){return e*t/255},T=function(e,t){return e>t?t:e},X=function(e,t){return e>t?e:t},be=function(e,t){return 255*(1-(1-e/255)*(1-t/255))},ne=function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))},x=function(e,t){return 255*(1-(1-t/255)/(e/255))},E=function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e},(v=function(e,t,n){if(!v[n])throw"unknown blend mode "+n;return v[n](e,t)}).normal=(y=function(e){return function(t,n){var i,r;return i=w(n).rgb(),r=w(t).rgb(),w(e(i,r),"rgb")}})((P=function(e){return function(t,n){var i,r,s;for(s=[],i=r=0;r<=3;i=++r)s[i]=e(t[i],n[i]);return s}})((function(e,t){return e}))),v.multiply=y(P(ee)),v.screen=y(P(be)),v.overlay=y(P(ne)),v.darken=y(P(T)),v.lighten=y(P(X)),v.dodge=y(P(E)),v.burn=y(P(x)),w.blend=v,w.analyze=function(e){var t,n,i,r;for(i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},n=0,t=e.length;ni.max&&(i.max=r),i.count+=1);return i.domain=[i.min,i.max],i.limits=function(e,t){return w.limits(i,e,t)},i},w.scale=function(e,t){var n,i,r,s,o,a,l,c,u,h,d,p,f,m,g,_,v,y,b,x,S;return u="rgb",h=w("#ccc"),m=0,o=[0,1],f=[],p=[0,0],n=!1,r=[],d=!1,c=0,l=1,s=!1,i={},g=!0,a=1,x=function(e){var t,n,i,s,o,a;if(null==e&&(e=["#fff","#000"]),null!=e&&"string"===Ae(e)&&null!=w.brewer&&(e=w.brewer[e]||w.brewer[e.toLowerCase()]||e),"array"===Ae(e)){for(1===e.length&&(e=[e[0],e[0]]),t=i=0,s=(e=e.slice(0)).length-1;0<=s?i<=s:i>=s;t=0<=s?++i:--i)n=e[t],"string"===Ae(n)&&(e[t]=w(n));for(f.length=0,t=a=0,o=e.length-1;0<=o?a<=o:a>=o;t=0<=o?++a:--a)f.push(t/(e.length-1))}return b(),r=e},v=function(e){var t,i;if(null!=n){for(i=n.length-1,t=0;t=n[t];)t++;return t-1}return 0},S=function(e){return e},y=function(e,t){var s,o,d,m,_,y,b;if(null==t&&(t=!1),isNaN(e)||null===e)return h;if(b=t?e:n&&n.length>2?v(e)/(n.length-2):l!==c?(e-c)/(l-c):1,t||(b=S(b)),1!==a&&(b=ie(b,a)),b=p[0]+b*(1-p[0]-p[1]),b=Math.min(1,Math.max(0,b)),d=Math.floor(1e4*b),g&&i[d])s=i[d];else{if("array"===Ae(r))for(o=m=0,y=f.length-1;0<=y?m<=y:m>=y;o=0<=y?++m:--m){if(b<=(_=f[o])){s=r[o];break}if(b>=_&&o===f.length-1){s=r[o];break}if(b>_&&b=u;t=0<=u?++h:--h)f.push(t/(i-1));return o=[c,l],_},_.mode=function(e){return arguments.length?(u=e,b(),_):u},_.range=function(e,t){return x(e),_},_.out=function(e){return d=e,_},_.spread=function(e){return arguments.length?(m=e,_):m},_.correctLightness=function(e){return null==e&&(e=!0),s=e,b(),S=s?function(e){var t,n,i,r,s,o,a,l;for(o=(t=y(0,!0).lab()[0])>(n=y(1,!0).lab()[0]),i=y(e,!0).lab()[0]-(r=t+(n-t)*e),a=0,l=1,s=20;Math.abs(i)>.01&&s-- >0;)o&&(i*=-1),i<0?(a=e,e+=.5*(l-e)):(l=e,e+=.5*(a-e)),i=y(e,!0).lab()[0]-r;return e}:function(e){return e},_},_.padding=function(e){return null!=e?("number"===Ae(e)&&(e=[e,e]),p=e,_):p},_.colors=function(t,i){var s,a,l,c,u,h,d,p;if(arguments.length<2&&(i="hex"),u=[],0===arguments.length)u=r.slice(0);else if(1===t)u=[_(.5)];else if(t>1)a=o[0],s=o[1]-a,u=function(){h=[];for(var e=0;0<=t?et;0<=t?e++:e--)h.push(e);return h}.apply(this).map((function(e){return _(a+e/(t-1)*s)}));else{if(e=[],d=[],n&&n.length>2)for(l=p=1,c=n.length;1<=c?pc;l=1<=c?++p:--p)d.push(.5*(n[l-1]+n[l]));else d=o;u=d.map((function(e){return _(e)}))}return w[i]&&(u=u.map((function(e){return e[i]()}))),u},_.cache=function(e){return null!=e?(g=e,_):g},_.gamma=function(e){return null!=e?(a=e,_):a},_.nodata=function(e){return null!=e?(h=w(e),_):h},_},null==w.scales&&(w.scales={}),w.scales.cool=function(){return w.scale([w.hsl(180,1,.9),w.hsl(250,.7,.4)])},w.scales.hot=function(){return w.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},w.analyze=function(e,t,n){var i,r,s,o,a,l;if(a={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==n&&(n=function(){return!0}),i=function(e){null==e||isNaN(e)||(a.values.push(e),a.sum+=e,ea.max&&(a.max=e),a.count+=1)},l=function(e,r){if(n(e,r))return null!=t&&"function"===Ae(t)?i(t(e)):null!=t&&"string"===Ae(t)||"number"===Ae(t)?i(e[t]):i(e)},"array"===Ae(e))for(o=0,s=e.length;o=z;A=1<=z?++N:--N)T.push(P+A/n*(J-P));T.push(J)}else if("l"===t.substr(0,1)){if(P<=0)throw"Logarithmic scales are only possible for values > 0";for(k=Math.LOG10E*K(P),E=Math.LOG10E*K(J),T.push(P),A=ce=1,V=n-1;1<=V?ce<=V:ce>=V;A=1<=V?++ce:--ce)T.push(ie(10,k+A/n*(E-k)));T.push(J)}else if("q"===t.substr(0,1)){for(T.push(P),A=i=1,q=n-1;1<=q?i<=q:i>=q;A=1<=q?++i:--i)F=(le.length-1)*A/n,(B=I(F))===F?T.push(le[B]):(U=F-B,T.push(le[B]*(1-U)+le[B+1]*U));T.push(J)}else if("k"===t.substr(0,1)){for(D=le.length,_=new Array(D),x=new Array(n),re=!0,L=0,y=null,(y=[]).push(P),A=r=1,X=n-1;1<=X?r<=X:r>=X;A=1<=X?++r:--r)y.push(P+A/n*(J-P));for(y.push(J);re;){for(M=s=0,Y=n-1;0<=Y?s<=Y:s>=Y;M=0<=Y?++s:--s)x[M]=0;for(A=o=0,Z=D-1;0<=Z?o<=Z:o>=Z;A=0<=Z?++o:--o){for(ae=le[A],R=Number.MAX_VALUE,M=a=0,Q=n-1;0<=Q?a<=Q:a>=Q;M=0<=Q?++a:--a)(S=m(y[M]-ae))=ee;M=0<=ee?++l:--l)O[M]=null;for(A=c=0,te=D-1;0<=te?c<=te:c>=te;A=0<=te?++c:--c)null===O[b=_[A]]?O[b]=le[A]:O[b]+=le[A];for(M=u=0,ne=n-1;0<=ne?u<=ne:u>=ne;M=0<=ne?++u:--u)O[M]*=1/x[M];for(re=!1,M=h=0,H=n-1;0<=H?h<=H:h>=H;M=0<=H?++h:--h)if(O[M]!==y[A]){re=!0;break}y=O,++L>200&&(re=!1)}for(C={},M=d=0,$=n-1;0<=$?d<=$:d>=$;M=0<=$?++d:--d)C[M]=[];for(A=p=0,G=D-1;0<=G?p<=G:p>=G;A=0<=G?++p:--p)C[b=_[A]].push(le[A]);for(se=[],M=f=0,j=n-1;0<=j?f<=j:f>=j;M=0<=j?++f:--f)se.push(C[M][0]),se.push(C[M][C[M].length-1]);for(se=se.sort((function(e,t){return e-t})),T.push(se[0]),A=g=1,W=se.length-1;g<=W;A=g+=2)oe=se[A],isNaN(oe)||-1!==T.indexOf(oe)||T.push(oe)}return T},D=function(e,t,n){var i,r,s,o;return e=(i=Me(arguments))[0],t=i[1],n=i[2],isNaN(e)&&(e=0),(e/=360)<1/3?s=1-((r=(1-t)/3)+(o=(1+t*M(c*e)/M(a-c*e))/3)):e<2/3?r=1-((o=(1-t)/3)+(s=(1+t*M(c*(e-=1/3))/M(a-c*e))/3)):o=1-((s=(1-t)/3)+(r=(1+t*M(c*(e-=2/3))/M(a-c*e))/3)),[255*(o=Y(n*o*3)),255*(s=Y(n*s*3)),255*(r=Y(n*r*3)),i.length>3?i[3]:1]},le=function(){var e,t,n,i,r,s,o;return r=(s=Me(arguments))[0],t=s[1],e=s[2],c=2*Math.PI,r/=255,t/=255,e/=255,0==(o=1-Math.min(r,t,e)/(i=(r+t+e)/3))?n=0:(n=(r-t+(r-e))/2,n/=Math.sqrt((r-t)*(r-t)+(r-e)*(t-e)),n=Math.acos(n),e>t&&(n=c-n),n/=c),[360*n,o,i]},w.hsi=function(){return function(e,t,n){n.prototype=e.prototype;var i=new n,r=e.apply(i,t);return Object(r)===r?r:i}(n,Pe.call(arguments).concat(["hsi"]),(function(){}))},p.hsi=D,n.prototype.hsi=function(){return le(this._rgb)},B=function(e,t,n,i){var r,s,o,a,l,c,u,h,d,p;return"hsl"===i?(d=e.hsl(),p=t.hsl()):"hsv"===i?(d=e.hsv(),p=t.hsv()):"hcg"===i?(d=e.hcg(),p=t.hcg()):"hsi"===i?(d=e.hsi(),p=t.hsi()):"lch"!==i&&"hcl"!==i||(i="hcl",d=e.hcl(),p=t.hcl()),"h"===i.substr(0,1)&&(s=d[0],u=d[1],a=d[2],o=p[0],h=p[1],l=p[2]),isNaN(s)||isNaN(o)?isNaN(s)?isNaN(o)?r=Number.NaN:(r=o,1!==a&&0!==a||"hsv"===i||(c=h)):(r=s,1!==l&&0!==l||"hsv"===i||(c=u)):r=s+n*(o>s&&o-s>180?o-(s+360):o180?o+360-s:o-s),null==c&&(c=u+n*(h-u)),w[i](r,c,a+n*(l-a))},V=function(e,t,n,i){var r,s;return r=e.num(),s=t.num(),w.num(r+(s-r)*n,"num")},(f=f.concat(function(){var e,t,n,i;for(i=[],t=0,e=(n=["hsv","hsl","hsi","hcl","lch","hcg"]).length;t{e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.extend(e.expr.pseudos,{data:e.expr.createPseudo((function(t){return function(n){return!!e.data(n,t)}}))})})?i.apply(t,r):i)||(e.exports=s)}()},1677:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",(function(e){e.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t})?i.apply(t,r):i)||(e.exports=s)}()},2402:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.ui.focusable=function(t,n){var i,r,s,o,a,l=t.nodeName.toLowerCase();return"area"===l?(r=(i=t.parentNode).name,!(!t.href||!r||"map"!==i.nodeName.toLowerCase())&&(s=e("img[usemap='#"+r+"']")).length>0&&s.is(":visible")):(/^(input|select|textarea|button|object)$/.test(l)?(o=!t.disabled)&&(a=e(t).closest("fieldset")[0])&&(o=!a.disabled):o="a"===l&&t.href||n,o&&e(t).is(":visible")&&"visible"===e(t).css("visibility"))},e.extend(e.expr.pseudos,{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}}),e.ui.focusable})?i.apply(t,r):i)||(e.exports=s)}()},9996:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.ui.formResetMixin={_formResetHandler:function(){var t=e(this);setTimeout((function(){var n=t.data("ui-form-reset-instances");e.each(n,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=e(this.element.prop("form")),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(e.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}}})?i.apply(t,r):i)||(e.exports=s)}()},7584:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?i.apply(t,r):i)||(e.exports=s)}()},4915:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.fn.labels=function(){var e,t,n,i,r;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(i=this.eq(0).parents("label"),(n=this.attr("id"))&&(r=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),t="label[for='"+CSS.escape(n)+"']",i=i.add(r.find(t).addBack(t))),this.pushStack(i)):this.pushStack([])}})?i.apply(t,r):i)||(e.exports=s)}()},9587:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],i=function(e){return e.ui.plugin={add:function(t,n,i){var r,s=e.ui[t].prototype;for(r in i)s.plugins[r]=s.plugins[r]||[],s.plugins[r].push([n,i[r]])},call:function(e,t,n,i){var r,s=e.plugins[t];if(s&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],i=function(e){return function(){var t,n=Math.max,i=Math.abs,r=/left|center|right/,s=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,l=/%$/,c=e.fn.position;function u(e,t,n){return[parseFloat(e[0])*(l.test(e[0])?t/100:1),parseFloat(e[1])*(l.test(e[1])?n/100:1)]}function h(t,n){return parseInt(e.css(t,n),10)||0}function d(e){return null!=e&&e===e.window}e.position={scrollbarWidth:function(){if(void 0!==t)return t;var n,i,r=e("
"),s=r.children()[0];return e("body").append(r),n=s.offsetWidth,r.css("overflow","scroll"),n===(i=s.offsetWidth)&&(i=r[0].clientWidth),r.remove(),t=n-i},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),r="scroll"===n||"auto"===n&&t.width0?"right":"center",vertical:u<0?"top":l>0?"bottom":"middle"};pn(i(l),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)}),o.offset(e.extend(M,{using:s}))}))},e.ui.position={fit:{left:function(e,t){var i,r=t.within,s=r.isWindow?r.scrollLeft:r.offset.left,o=r.width,a=e.left-t.collisionPosition.marginLeft,l=s-a,c=a+t.collisionWidth-o-s;t.collisionWidth>o?l>0&&c<=0?(i=e.left+l+t.collisionWidth-o-s,e.left+=l-i):e.left=c>0&&l<=0?s:l>c?s+o-t.collisionWidth:s:l>0?e.left+=l:c>0?e.left-=c:e.left=n(e.left-a,e.left)},top:function(e,t){var i,r=t.within,s=r.isWindow?r.scrollTop:r.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=s-a,c=a+t.collisionHeight-o-s;t.collisionHeight>o?l>0&&c<=0?(i=e.top+l+t.collisionHeight-o-s,e.top+=l-i):e.top=c>0&&l<=0?s:l>c?s+o-t.collisionHeight:s:l>0?e.top+=l:c>0?e.top-=c:e.top=n(e.top-a,e.top)}},flip:{left:function(e,t){var n,r,s=t.within,o=s.offset.left+s.scrollLeft,a=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,c=e.left-t.collisionPosition.marginLeft,u=c-l,h=c+t.collisionWidth-a-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];u<0?((n=e.left+d+p+f+t.collisionWidth-a-o)<0||n0&&((r=e.left-t.collisionPosition.marginLeft+d+p+f-l)>0||i(r)0&&((n=e.top-t.collisionPosition.marginTop+d+p+f-l)>0||i(n){var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,r=t?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter((function(){var t=e(this);return(!i||"static"!==t.css("position"))&&r.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==n&&s.length?s:e(this[0].ownerDocument||document)}})?i.apply(t,r):i)||(e.exports=s)}()},7819:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642),n(2402)],void 0===(s="function"==typeof(i=function(e){return e.extend(e.expr.pseudos,{tabbable:function(t){var n=e.attr(t,"tabindex"),i=null!=n;return(!i||n>=0)&&e.ui.focusable(t,i)}})})?i.apply(t,r):i)||(e.exports=s)}()},2121:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],void 0===(s="function"==typeof(i=function(e){return e.fn.extend({uniqueId:(t=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++t)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")}))}});var t})?i.apply(t,r):i)||(e.exports=s)}()},1642:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929)],void 0===(s="function"==typeof(i=function(e){return e.ui=e.ui||{},e.ui.version="1.14.1"})?i.apply(t,r):i)||(e.exports=s)}()},2628:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642)],i=function(e){var t,n=0,i=Array.prototype.hasOwnProperty,r=Array.prototype.slice;return e.cleanData=(t=e.cleanData,function(n){var i,r,s;for(s=0;null!=(r=n[s]);s++)(i=e._data(r,"events"))&&i.remove&&e(r).triggerHandler("remove");t(n)}),e.widget=function(t,n,i){var r,s,o,a={},l=t.split(".")[0];if("__proto__"===(t=t.split(".")[1])||"constructor"===t)return e.error("Invalid widget name: "+t);var c=l+"-"+t;return i||(i=n,n=e.Widget),Array.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr.pseudos[c.toLowerCase()]=function(t){return!!e.data(t,c)},e[l]=e[l]||{},r=e[l][t],s=e[l][t]=function(e,t){if(!this||!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t)},e.extend(s,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(o=new n).options=e.widget.extend({},o.options),e.each(i,(function(e,t){a[e]="function"==typeof t?function(){function i(){return n.prototype[e].apply(this,arguments)}function r(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,s=this._superApply;return this._super=i,this._superApply=r,e=t.apply(this,arguments),this._super=n,this._superApply=s,e}}():t})),s.prototype=e.widget.extend(o,{widgetEventPrefix:r&&o.widgetEventPrefix||t},a,{constructor:s,namespace:l,widgetName:t,widgetFullName:c}),r?(e.each(r._childConstructors,(function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,s,n._proto)})),delete r._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var n,s,o=r.call(arguments,1),a=0,l=o.length;a",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,n){t._removeClass(n,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,s,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},i=t.split("."),t=i.shift(),i.length){for(r=o[t]=e.widget.extend({},this.options[t]),s=0;s{var i,r,s;!function(){"use strict";r=[n(1929),n(8958),n(3492),n(7584),n(2628)],i=function(e){var t;return e.widget("ui.button",{version:"1.14.1",defaultElement:"").button({label:e("").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}});var n=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&this.options.uiDialogTitleHeadingLevel>0&&this.options.uiDialogTitleHeadingLevel<=6?"h"+this.options.uiDialogTitleHeadingLevel:"span";t=e("<"+n+">").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=e("
"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("
").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var t=this,n=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(n)||Array.isArray(n)&&!n.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(e.each(n,(function(n,i){var r,s;i="function"==typeof i?{click:i,text:n}:i,i=e.extend({type:"button"},i),r=i.click,s={icon:i.icon,iconPosition:i.iconPosition,showLabel:i.showLabel,icons:i.icons,text:i.text},delete i.click,delete i.icon,delete i.iconPosition,delete i.showLabel,delete i.icons,"boolean"==typeof i.text&&delete i.text,e("",i).button(s).appendTo(t.uiButtonSet).on("click",(function(){r.apply(t.element[0],arguments)}))})),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var t=this,n=this.options;function i(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,r){t._addClass(e(this),"ui-dialog-dragging"),t._blockFrames(),t._trigger("dragStart",n,i(r))},drag:function(e,n){t._trigger("drag",e,i(n))},stop:function(r,s){var o=s.offset.left-t.document.scrollLeft(),a=s.offset.top-t.document.scrollTop();n.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(a>=0?"+":"")+a,of:t.window},t._removeClass(e(this),"ui-dialog-dragging"),t._unblockFrames(),t._trigger("dragStop",r,i(s))}})},_makeResizable:function(){var t=this,n=this.options,i=n.resizable,r=this.uiDialog.css("position"),s="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";function o(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,i){t._addClass(e(this),"ui-dialog-resizing"),t._blockFrames(),t._trigger("resizeStart",n,o(i))},resize:function(e,n){t._trigger("resize",e,o(n))},stop:function(i,r){var s=t.uiDialog.offset(),a=s.left-t.document.scrollLeft(),l=s.top-t.document.scrollTop();n.height=t.uiDialog.height(),n.width=t.uiDialog.width(),n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:t.window},t._removeClass(e(this),"ui-dialog-resizing"),t._unblockFrames(),t._trigger("resizeStop",i,o(r))}}).css("position",r)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),n=e.inArray(this,t);-1!==n&&t.splice(n,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,r={};e.each(t,(function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(i=!0),e in n.resizableRelatedOptions&&(r[e]=t)})),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,n){var i,r,s=this.uiDialog;"disabled"!==t&&(this._super(t,n),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:e("").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!n&&s.draggable("destroy"),!i&&n&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((r=s.is(":data(ui-resizable)"))&&!n&&s.resizable("destroy"),r&&"string"==typeof n&&s.resizable("option","handles",n),r||!1===n||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===t&&s.attr("aria-modal",n?"true":null))},_size:function(){var e,t,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),e=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),t=Math.max(0,i.minHeight-e),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-e):"none","auto"===i.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map((function(){var t=e(this);return e("
").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!e(t.target).closest(".ui-dialog").length||!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay((function(){t=!1})),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(e){if(!t){var n=this._trackingInstances()[0];n._allowInteraction(e)||(e.preventDefault(),n._focusTabbable())}}.bind(this)),this.overlay=e("
").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!0===e.uiBackCompat&&e.widget("ui.dialog",e.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),e.ui.dialog},void 0===(s=i.apply(t,r))||(e.exports=s)}()},4719:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(191),n(2812),n(9587),n(2362),n(1642),n(2628)],void 0===(s="function"==typeof(i=function(e){return e.widget("ui.draggable",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var n=this.options;return!(this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0||(this.handle=this._getHandle(t),!this.handle||(this._blurActiveElement(t),this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),0)))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map((function(){var t=e(this);return e("
").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var n=this.document[0].activeElement;e(t.target).closest(n).length||e(n).trigger("blur")},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===e(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,i=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==n._trigger("stop",t)&&n._clear()})):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var n=this.options,i="function"==typeof n.helper,r=i?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),Array.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,i,r=this.options,s=this.document[0];this.relativeContainer=null,r.containment?"window"!==r.containment?"document"!==r.containment?r.containment.constructor!==Array?("parent"===r.containment&&(r.containment=this.helper[0].parentNode),(i=(n=e(r.containment))[0])&&(t=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n)):this.containment=r.containment:this.containment=[0,0,e(s).width()-this.helperProportions.width-this.margins.left,(e(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,i,r,s,o=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,c=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,e.pageX-this.offset.click.leftn[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),o.grid&&(r=o.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,c=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-o.grid[1]:r+o.grid[1]:r,s=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=n?s-this.offset.click.left>=n[0]||s-this.offset.click.left>n[2]?s:s-this.offset.click.left>=n[0]?s-o.grid[0]:s+o.grid[0]:s),"y"===o.axis&&(l=this.originalPageX),"x"===o.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,n,i){return i=i||this._uiHash(),e.ui.plugin.call(this,t,[n,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n,i){var r=e.extend({},n,{item:i.element});i.sortables=[],e(i.options.connectToSortable).each((function(){var n=e(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",t,r))}))},stop:function(t,n,i){var r=e.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,e.each(i.sortables,(function(){var e=this;e.isOver?(e.isOver=0,i.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,r))}))},drag:function(t,n,i){e.each(i.sortables,(function(){var r=!1,s=this;s.positionAbs=i.positionAbs,s.helperProportions=i.helperProportions,s.offset.click=i.offset.click,s._intersectsWith(s.containerCache)&&(r=!0,e.each(i.sortables,(function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==s&&this._intersectsWith(this.containerCache)&&e.contains(s.element[0],this.element[0])&&(r=!1),r}))),r?(s.isOver||(s.isOver=1,i._parent=n.helper.parent(),s.currentItem=n.helper.appendTo(s.element).data("ui-sortable-item",!0),s.options._helper=s.options.helper,s.options.helper=function(){return n.helper[0]},t.target=s.currentItem[0],s._mouseCapture(t,!0),s._mouseStart(t,!0,!0),s.offset.click.top=i.offset.click.top,s.offset.click.left=i.offset.click.left,s.offset.parent.left-=i.offset.parent.left-s.offset.parent.left,s.offset.parent.top-=i.offset.parent.top-s.offset.parent.top,i._trigger("toSortable",t),i.dropped=s.element,e.each(i.sortables,(function(){this.refreshPositions()})),i.currentItem=i.element,s.fromOutside=i),s.currentItem&&(s._mouseDrag(t),n.position=s.position)):s.isOver&&(s.isOver=0,s.cancelHelperRemoval=!0,s.options._revert=s.options.revert,s.options.revert=!1,s._trigger("out",t,s._uiHash(s)),s._mouseStop(t,!0),s.options.revert=s.options._revert,s.options.helper=s.options._helper,s.placeholder&&s.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(t),n.position=i._generatePosition(t,!0),i._trigger("fromSortable",t),i.dropped=!1,e.each(i.sortables,(function(){this.refreshPositions()})))}))}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n,i){var r=e("body"),s=i.options;r.css("cursor")&&(s._cursor=r.css("cursor")),r.css("cursor",s.cursor)},stop:function(t,n,i){var r=i.options;r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n,i){var r=e(n.helper),s=i.options;r.css("opacity")&&(s._opacity=r.css("opacity")),r.css("opacity",s.opacity)},stop:function(t,n,i){var r=i.options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,n,i){var r=i.options,s=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(r.axis&&"x"===r.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY=0;d--)c=(l=i.snapElements[d].left-i.margins.left)+i.snapElements[d].width,h=(u=i.snapElements[d].top-i.margins.top)+i.snapElements[d].height,_c+m||yh+m||!e.contains(i.snapElements[d].item.ownerDocument,i.snapElements[d].item)?(i.snapElements[d].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(r=Math.abs(u-y)<=m,s=Math.abs(h-v)<=m,o=Math.abs(l-_)<=m,a=Math.abs(c-g)<=m,r&&(n.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),s&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),o&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c}).left)),p=r||s||o||a,"outer"!==f.snapMode&&(r=Math.abs(u-v)<=m,s=Math.abs(h-y)<=m,o=Math.abs(l-g)<=m,a=Math.abs(c-_)<=m,r&&(n.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),s&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),o&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c-i.helperProportions.width}).left)),!i.snapElements[d].snapping&&(r||s||o||a||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,e.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=r||s||o||a||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,n,i){var r,s=i.options,o=e.makeArray(e(s.stack)).sort((function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)}));o.length&&(r=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each((function(t){e(this).css("zIndex",r+t)})),this.css("zIndex",r+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n,i){var r=e(n.helper),s=i.options;r.css("zIndex")&&(s._zIndex=r.css("zIndex")),r.css("zIndex",s.zIndex)},stop:function(t,n,i){var r=i.options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}}),e.ui.draggable})?i.apply(t,r):i)||(e.exports=s)}()},191:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(1642),n(2628)],void 0===(s="function"==typeof(i=function(e){var t=!1;return e(document).on("mouseup",(function(){t=!1})),e.widget("ui.mouse",{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).on("click."+this.widgetName,(function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,r=1===n.which,s="string"==typeof this.options.cancel&&e(n.target).closest(this.options.cancel).length;return!(r&&!s&&this._mouseCapture(n)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,0)))}},_mouseMove:function(e){if(this._mouseMoved&&!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e);return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&e.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,t=!1,n.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?i.apply(t,r):i)||(e.exports=s)}()},3049:(e,t,n)=>{var i,r,s;!function(){"use strict";r=[n(1929),n(191),n(1677),n(9587),n(1642),n(2628)],i=function(e){return e.widget("ui.resizable",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(t,n){var i,r=!1,s=e(t).css("overflow");if("hidden"===s)return!1;if("scroll"===s)return!0;if(t[i=n&&"left"===n?"scrollLeft":"scrollTop"]>0)return!0;try{t[i]=1,r=t[i]>0,t[i]=0}catch(e){}return r},_create:function(){var t,n=this.options,i=this;this._addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("
").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),n.autoHide&&e(this.element).on("mouseenter",(function(){n.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())})).on("mouseleave",(function(){n.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var t,n=function(t){e(t).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!t}},_setupHandles:function(){var t,n,i,r,s,o=this.options,a=this;if(this.handles=o.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this._addedHandles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},n=0;n"),this._addClass(s,"ui-resizable-handle "+r),s.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(s),this._addedHandles=this._addedHandles.add(s));this._renderAxis=function(t){var n,i,r,s;for(n in t=t||this.element,this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=e(this.handles[n]),this._on(this.handles[n],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=e(this.handles[n],this.element),s=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),r=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(r,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){a.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=s&&s[1]?s[1]:"se")})),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var n,i,r=!1;for(n in this.handles)((i=e(this.handles[n])[0])===t.target||e.contains(i,t.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(t){var n,i,r,s,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(n+=e(o.containment).scrollLeft()||0,i+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this._helper||(s=this._calculateAdjustedElementDimensions(a)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width,height:s.height},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:s.width,height:s.height},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var n,i,r=this.originalMousePosition,s=this.axis,o=t.pageX-r.left||0,a=t.pageY-r.top||0,l=this._change[s];return this._updatePrevProperties(),!!l&&(n=l.apply(this,[t,o,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1)},_mouseStop:function(t){this.resizing=!1;var n,i,r,s,o,a,l,c=this.options,u=this;return this._helper&&(r=(i=(n=this._proportionallyResizeElements).length&&/textarea/i.test(n[0].nodeName))&&this._hasScroll(n[0],"left")?0:u.sizeDiff.height,s=i?0:u.sizeDiff.width,o={width:u.helper.width()-s,height:u.helper.height()-r},a=parseFloat(u.element.css("left"))+(u.position.left-u.originalPosition.left)||null,l=parseFloat(u.element.css("top"))+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(e.extend(o,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.helper.css(e),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px",this.helper.width(e.width)),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px",this.helper.height(e.height)),e},_updateVirtualBoundaries:function(e){var t,n,i,r,s,o=this.options;s={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=s.minHeight*this.aspectRatio,i=s.minWidth/this.aspectRatio,n=s.maxHeight*this.aspectRatio,r=s.maxWidth/this.aspectRatio,t>s.minWidth&&(s.minWidth=t),i>s.minHeight&&(s.minHeight=i),ne.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return s&&(e.width=t.minWidth),o&&(e.height=t.minHeight),i&&(e.width=t.maxWidth),r&&(e.height=t.maxHeight),s&&c&&(e.left=a-t.minWidth),i&&c&&(e.left=a-t.maxWidth),o&&u&&(e.top=l-t.minHeight),r&&u&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],r=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(i[t])||0,n[t]+=parseFloat(r[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_calculateAdjustedElementDimensions:function(e){var t,n,i,r=e.get(0);return"content-box"!==e.css("box-sizing")||!this._hasScroll(r)&&!this._hasScroll(r,"left")?{height:parseFloat(e.css("height")),width:parseFloat(e.css("width"))}:(t=parseFloat(r.style.width),n=parseFloat(r.style.height),i=this._getPaddingPlusBorderDimensions(e),t=isNaN(t)?this._getElementTheoreticalSize(e,i,"width"):t,{height:n=isNaN(n)?this._getElementTheoreticalSize(e,i,"height"):n,width:t})},_getElementTheoreticalSize:function(e,t,n){return Math.max(0,Math.ceil(e.get(0)["offset"+n[0].toUpperCase()+n.slice(1)]-t[n]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t
").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var i=this.originalSize;return{top:this.originalPosition.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},sw:function(t,n,i){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,i]))},ne:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,i]))},nw:function(t,n,i){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,i]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).resizable("instance"),i=n.options,r=n._proportionallyResizeElements,s=r.length&&/textarea/i.test(r[0].nodeName),o=s&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,a=s?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-o},c=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,u=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(l,u&&c?{top:u,left:c}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};r&&r.length&&e(r[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,n,i,r,s,o,a,l=e(this).resizable("instance"),c=l.options,u=l.element,h=c.containment,d=h instanceof e?h.get(0):/parent/.test(h)?u.parent().get(0):h;d&&(l.containerElement=e(d),/document/.test(h)||h===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(d),n=[],e(["Top","Right","Left","Bottom"]).each((function(e,i){n[e]=l._num(t.css("padding"+i))})),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-n[3],width:t.innerWidth()-n[1]},i=l.containerOffset,r=l.containerSize.height,s=l.containerSize.width,o=l._hasScroll(d,"left")?d.scrollWidth:s,a=l._hasScroll(d)?d.scrollHeight:r,l.parentData={element:d,left:i.left,top:i.top,width:o,height:a}))},resize:function(t){var n,i,r,s,o=e(this).resizable("instance"),a=o.options,l=o.containerOffset,c=o.position,u=o._aspectRatio||t.shiftKey,h={top:0,left:0},d=o.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),c.left<(o._helper?l.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-l.left:o.position.left-h.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=a.helper?l.left:0),c.top<(o._helper?l.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-l.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?l.top:0),r=o.containerElement.get(0)===o.element.parent().get(0),s=/relative|absolute/.test(o.containerElement.css("position")),r&&s?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),n=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-h.left:o.offset.left-l.left)),i=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-h.top:o.offset.top-l.top)),n+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-n,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),i+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-i,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),n=t.options,i=t.containerOffset,r=t.containerPosition,s=t.containerElement,o=e(t.helper),a=o.offset(),l=o.outerWidth()-t.sizeDiff.width,c=o.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(s.css("position"))&&e(this).css({left:a.left-r.left-i.left,width:l,height:c}),t._helper&&!n.animate&&/static/.test(s.css("position"))&&e(this).css({left:a.left-r.left-i.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),n=t.options;e(n.alsoResize).each((function(){var n=e(this),i=t._calculateAdjustedElementDimensions(n);n.data("ui-resizable-alsoresize",{width:i.width,height:i.height,left:parseFloat(n.css("left")),top:parseFloat(n.css("top"))})}))},resize:function(t,n){var i=e(this).resizable("instance"),r=i.options,s=i.originalSize,o=i.originalPosition,a={height:i.size.height-s.height||0,width:i.size.width-s.width||0,top:i.position.top-o.top||0,left:i.position.left-o.left||0};e(r.alsoResize).each((function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),r={},s=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(s,(function(e,t){var n=(i[t]||0)+(a[t]||0);n&&n>=0&&(r[t]=n||null)})),t.css(r)}))},stop:function(){e(this).removeData("ui-resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!0===e.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,n=e(this).resizable("instance"),i=n.options,r=n.size,s=n.originalSize,o=n.originalPosition,a=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,c=l[0]||1,u=l[1]||1,h=Math.round((r.width-s.width)/c)*c,d=Math.round((r.height-s.height)/u)*u,p=s.width+h,f=s.height+d,m=i.maxWidth&&i.maxWidthp,v=i.minHeight&&i.minHeight>f;i.grid=l,_&&(p+=c),v&&(f+=u),m&&(p-=c),g&&(f-=u),/^(se|s|e)$/.test(a)?(n.size.width=p,n.size.height=f):/^(ne)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.top=o.top-d):/^(sw)$/.test(a)?(n.size.width=p,n.size.height=f,n.position.left=o.left-h):((f-u<=0||p-c<=0)&&(t=n._getPaddingPlusBorderDimensions(this)),f-u>0?(n.size.height=f,n.position.top=o.top-d):(f=u-t.height,n.size.height=f,n.position.top=o.top+s.height-f),p-c>0?(n.size.width=p,n.position.left=o.left-h):(p=c-t.width,n.size.width=p,n.position.left=o.left+s.width-p))}}),e.ui.resizable},void 0===(s=i.apply(t,r))||(e.exports=s)}()},1929:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(i,r){"use strict";var s=[],o=Object.getPrototypeOf,a=s.slice,l=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},c=s.push,u=s.indexOf,h={},d=h.toString,p=h.hasOwnProperty,f=p.toString,m=f.call(Object),g={},_=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},v=function(e){return null!=e&&e===e.window},y=i.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var i,r,s=(n=n||y).createElement("script");if(s.text=e,t)for(i in b)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&s.setAttribute(i,r);n.head.appendChild(s).parentNode.removeChild(s)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[d.call(e)]||"object":typeof e}var S="3.7.1",A=/HTML$/i,M=function(e,t){return new M.fn.init(e,t)};function C(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!_(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}M.fn=M.prototype={jquery:S,constructor:M,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=M.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return M.each(this,e)},map:function(e){return this.pushStack(M.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(M.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(M.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+k+")"+k+"*"),V=new RegExp(k+"|>"),H=new RegExp(F),$=new RegExp("^"+D+"$"),G={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i"),bool:new RegExp("^(?:"+C+")$","i"),needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},j=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Y=new RegExp("\\\\[\\da-fA-F]{1,6}"+k+"?|\\\\([^\\r\\n\\f])","g"),K=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Z=function(){le()},Q=de((function(e){return!0===e.disabled&&T(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(s=a.call(O.childNodes),O.childNodes),s[O.childNodes.length].nodeType}catch(e){m={apply:function(e,t){N.apply(e,a.call(t))},call:function(e){N.apply(e,a.call(arguments,1))}}}function J(e,t,n,i){var r,s,o,a,c,u,p,f=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!i&&(le(t),t=t||l,h)){if(11!==v&&(c=q.exec(e)))if(r=c[1]){if(9===v){if(!(o=t.getElementById(r)))return n;if(o.id===r)return m.call(n,o),n}else if(f&&(o=f.getElementById(r))&&J.contains(t,o)&&o.id===r)return m.call(n,o),n}else{if(c[2])return m.apply(n,t.getElementsByTagName(e)),n;if((r=c[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(r)),n}if(!(S[e+" "]||d&&d.test(e))){if(p=e,f=t,1===v&&(V.test(e)||z.test(e))){for((f=X.test(e)&&ae(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=M.escapeSelector(a):t.setAttribute("id",a=_)),s=(u=ue(e)).length;s--;)u[s]=(a?"#"+a:":scope")+" "+he(u[s]);p=u.join(",")}try{return m.apply(n,f.querySelectorAll(p)),n}catch(t){S(e,!0)}finally{a===_&&t.removeAttribute("id")}}}return ve(e.replace(R,"$1"),t,n,i)}function ee(){var e=[];return function n(i,r){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=r}}function te(e){return e[_]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return T(t,"input")&&t.type===e}}function re(e){return function(t){return(T(t,"input")||T(t,"button"))&&t.type===e}}function se(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Q(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function oe(e){return te((function(t){return t=+t,te((function(n,i){for(var r,s=e([],n.length,t),o=s.length;o--;)n[r=s[o]]&&(n[r]=!(i[r]=n[r]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:O;return i!=l&&9===i.nodeType&&i.documentElement?(c=(l=i).documentElement,h=!M.isXMLDoc(l),f=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&O!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",Z),g.getById=ne((function(e){return c.appendChild(e).id=M.expando,!l.getElementsByName||!l.getElementsByName(M.expando).length})),g.disconnectedMatch=ne((function(e){return f.call(e,"*")})),g.scope=ne((function(){return l.querySelectorAll(":scope")})),g.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),g.getById?(t.filter.ID=function(e){var t=e.replace(Y,K);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(Y,K);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&h){var n,i,r,s=t.getElementById(e);if(s){if((n=s.getAttributeNode("id"))&&n.value===e)return[s];for(r=t.getElementsByName(e),i=0;s=r[i++];)if((n=s.getAttributeNode("id"))&&n.value===e)return[s]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&h)return t.getElementsByClassName(e)},d=[],ne((function(e){var t;c.appendChild(e).innerHTML="
",e.querySelectorAll("[selected]").length||d.push("\\["+k+"*(?:value|"+C+")"),e.querySelectorAll("[id~="+_+"-]").length||d.push("~="),e.querySelectorAll("a#"+_+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+k+"*name"+k+"*="+k+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),A=function(e,t){if(e===t)return o=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==O&&J.contains(O,e)?-1:t===l||t.ownerDocument==O&&J.contains(O,t)?1:r?u.call(r,e)-u.call(r,t):0:4&n?-1:1)},l):l}for(e in J.matches=function(e,t){return J(e,null,null,t)},J.matchesSelector=function(e,t){if(le(e),h&&!S[t+" "]&&(!d||!d.test(t)))try{var n=f.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){S(t,!0)}return J(t,l,null,[e]).length>0},J.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),M.contains(e,t)},J.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],r=i&&p.call(t.attrHandle,n.toLowerCase())?i(e,n,!h):void 0;return void 0!==r?r:e.getAttribute(n)},J.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},M.uniqueSort=function(e){var t,n=[],i=0,s=0;if(o=!g.sortStable,r=!g.sortStable&&a.call(e,0),P.call(e,A),o){for(;t=e[s++];)t===e[s]&&(i=n.push(s));for(;i--;)I.call(e,n[i],1)}return r=null,e},M.fn.uniqueSort=function(){return this.pushStack(M.uniqueSort(a.apply(this)))},t=M.expr={cacheLength:50,createPseudo:te,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,K),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,K),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||J.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&J.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&H.test(n)&&(t=ue(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Y,K).toLowerCase();return"*"===e?function(){return!0}:function(e){return T(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+k+")"+e+"("+k+"|$)"))&&b(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var r=J.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,p,f=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(s){for(;f;){for(h=t;h=h[f];)if(a?T(h,g):1===h.nodeType)return!1;p=f="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?m.firstChild:m.lastChild],o&&y){for(b=(d=(c=(u=m[_]||(m[_]={}))[e]||[])[0]===v&&c[1])&&c[2],h=d&&m.childNodes[d];h=++d&&h&&h[f]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[v,d,b];break}}else if(y&&(b=d=(c=(u=t[_]||(t[_]={}))[e]||[])[0]===v&&c[1]),!1===b)for(;(h=++d&&h&&h[f]||(b=d=0)||p.pop())&&(!(a?T(h,g):1===h.nodeType)||!++b||(y&&((u=h[_]||(h[_]={}))[e]=[v,b]),h!==t)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,n){var i,r=t.pseudos[e]||t.setFilters[e.toLowerCase()]||J.error("unsupported pseudo: "+e);return r[_]?r(n):r.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var i,s=r(e,n),o=s.length;o--;)e[i=u.call(e,s[o])]=!(t[i]=s[o])})):function(e){return r(e,0,i)}):r}},pseudos:{not:te((function(e){var t=[],n=[],i=_e(e.replace(R,"$1"));return i[_]?te((function(e,t,n,r){for(var s,o=i(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))})):function(e,r,s){return t[0]=e,i(t,null,s,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return J(e,t).length>0}})),contains:te((function(e){return e=e.replace(Y,K),function(t){return(t.textContent||M.text(t)).indexOf(e)>-1}})),lang:te((function(e){return $.test(e||"")||J.error("unsupported lang: "+e),e=e.replace(Y,K).toLowerCase(),function(t){var n;do{if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:se(!1),disabled:se(!0),checked:function(e){return T(e,"input")&&!!e.checked||T(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return W.test(e.nodeName)},input:function(e){return j.test(e.nodeName)},button:function(e){return T(e,"input")&&"button"===e.type||T(e,"button")},text:function(e){var t;return T(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:oe((function(){return[0]})),last:oe((function(e,t){return[t-1]})),eq:oe((function(e,t,n){return[n<0?n+t:n]})),even:oe((function(e,t){for(var n=0;nt?t:n;--i>=0;)e.push(i);return e})),gt:oe((function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function fe(e,t,n,i,r){for(var s,o=[],a=0,l=e.length,c=null!=t;a-1&&(s[c]=!(o[c]=d))}}else p=fe(p===o?p.splice(_,p.length):p),r?r(null,o,p,l):m.apply(o,p)}))}function ge(e){for(var i,r,s,o=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,h=de((function(e){return e===i}),l,!0),d=de((function(e){return u.call(i,e)>-1}),l,!0),p=[function(e,t,r){var s=!a&&(r||t!=n)||((i=t).nodeType?h(e,t,r):d(e,t,r));return i=null,s}];c1&&pe(p),c>1&&he(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(R,"$1"),r,c0,s=e.length>0,o=function(o,a,c,u,d){var p,f,g,_=0,y="0",b=o&&[],x=[],w=n,S=o||s&&t.find.TAG("*",d),A=v+=null==w?1:Math.random()||.1,C=S.length;for(d&&(n=a==l||a||d);y!==C&&null!=(p=S[y]);y++){if(s&&p){for(f=0,a||p.ownerDocument==l||(le(p),c=!h);g=e[f++];)if(g(p,a||l,c)){m.call(u,p);break}d&&(v=A)}r&&((p=!g&&p)&&_--,o&&b.push(p))}if(_+=y,r&&y!==_){for(f=0;g=i[f++];)g(b,x,a,c);if(o){if(_>0)for(;y--;)b[y]||x[y]||(x[y]=E.call(u));x=fe(x)}m.apply(u,x),d&&!o&&x.length>0&&_+i.length>1&&M.uniqueSort(u)}return d&&(v=A,n=w),b};return r?te(o):o}(o,s)),a.selector=e}return a}function ve(e,n,i,r){var s,o,a,l,c,u="function"==typeof e&&e,d=!r&&ue(e=u.selector||e);if(i=i||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&h&&t.relative[o[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(Y,K),n)||[])[0]))return i;u&&(n=n.parentNode),e=e.slice(o.shift().value.length)}for(s=G.needsContext.test(e)?0:o.length;s--&&(a=o[s],!t.relative[l=a.type]);)if((c=t.find[l])&&(r=c(a.matches[0].replace(Y,K),X.test(o[0].type)&&ae(n.parentNode)||n))){if(o.splice(s,1),!(e=r.length&&he(o)))return m.apply(i,r),i;break}}return(u||_e(e,d))(r,n,!h,i,!n||X.test(e)&&ae(n.parentNode)||n),i}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,g.sortStable=_.split("").sort(A).join("")===_,le(),g.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),M.find=J,M.expr[":"]=M.expr.pseudos,M.unique=M.uniqueSort,J.compile=_e,J.select=ve,J.setDocument=le,J.tokenize=ue,J.escape=M.escapeSelector,J.getText=M.text,J.isXML=M.isXMLDoc,J.selectors=M.expr,J.support=M.support,J.uniqueSort=M.uniqueSort}();var F=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&M(e).is(n))break;i.push(e)}return i},B=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},U=M.expr.match.needsContext,z=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function V(e,t,n){return _(t)?M.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?M.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?M.grep(e,(function(e){return u.call(t,e)>-1!==n})):M.filter(t,e,n)}M.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?M.find.matchesSelector(i,e)?[i]:[]:M.find.matches(e,M.grep(t,(function(e){return 1===e.nodeType})))},M.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(M(e).filter((function(){for(t=0;t1?M.uniqueSort(n):n},filter:function(e){return this.pushStack(V(this,e||[],!1))},not:function(e){return this.pushStack(V(this,e||[],!0))},is:function(e){return!!V(this,"string"==typeof e&&U.test(e)?M(e):e||[],!1).length}});var H,$=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(M.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:$.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof M?t[0]:t,M.merge(this,M.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),z.test(i[1])&&M.isPlainObject(t))for(i in t)_(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(M):M.makeArray(e,this)}).prototype=M.fn,H=M(y);var G=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function W(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}M.fn.extend({has:function(e){var t=M(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&M.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?M.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?u.call(M(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(M.uniqueSort(M.merge(this.get(),M(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),M.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return F(e,"parentNode")},parentsUntil:function(e,t,n){return F(e,"parentNode",n)},next:function(e){return W(e,"nextSibling")},prev:function(e){return W(e,"previousSibling")},nextAll:function(e){return F(e,"nextSibling")},prevAll:function(e){return F(e,"previousSibling")},nextUntil:function(e,t,n){return F(e,"nextSibling",n)},prevUntil:function(e,t,n){return F(e,"previousSibling",n)},siblings:function(e){return B((e.parentNode||{}).firstChild,e)},children:function(e){return B(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(T(e,"template")&&(e=e.content||e),M.merge([],e.childNodes))}},(function(e,t){M.fn[e]=function(n,i){var r=M.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=M.filter(i,r)),this.length>1&&(j[e]||M.uniqueSort(r),G.test(e)&&r.reverse()),this.pushStack(r)}}));var q=/[^\x20\t\r\n\f]+/g;function X(e){return e}function Y(e){throw e}function K(e,t,n,i){var r;try{e&&_(r=e.promise)?r.call(e).done(t).fail(n):e&&_(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}M.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return M.each(e.match(q)||[],(function(e,n){t[n]=!0})),t}(e):M.extend({},e);var t,n,i,r,s=[],o=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;o.length;a=-1)for(n=o.shift();++a-1;)s.splice(n,1),n<=a&&a--})),this},has:function(e){return e?M.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return r=o=[],n||t||(s=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},M.extend({Deferred:function(e){var t=[["notify","progress",M.Callbacks("memory"),M.Callbacks("memory"),2],["resolve","done",M.Callbacks("once memory"),M.Callbacks("once memory"),0,"resolved"],["reject","fail",M.Callbacks("once memory"),M.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return M.Deferred((function(n){M.each(t,(function(t,i){var r=_(e[i[4]])&&e[i[4]];s[i[1]]((function(){var e=r&&r.apply(this,arguments);e&&_(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,r){var s=0;function o(e,t,n,r){return function(){var a=this,l=arguments,c=function(){var i,c;if(!(e=s&&(n!==Y&&(a=void 0,l=[i]),t.rejectWith(a,l))}};e?u():(M.Deferred.getErrorHook?u.error=M.Deferred.getErrorHook():M.Deferred.getStackHook&&(u.error=M.Deferred.getStackHook()),i.setTimeout(u))}}return M.Deferred((function(i){t[0][3].add(o(0,i,_(r)?r:X,i.notifyWith)),t[1][3].add(o(0,i,_(e)?e:X)),t[2][3].add(o(0,i,_(n)?n:Y))})).promise()},promise:function(e){return null!=e?M.extend(e,r):r}},s={};return M.each(t,(function(e,i){var o=i[2],a=i[5];r[i[1]]=o.add,a&&o.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=o.fireWith})),r.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,n=t,i=Array(n),r=a.call(arguments),s=M.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?a.call(arguments):n,--t||s.resolveWith(i,r)}};if(t<=1&&(K(e,s.done(o(n)).resolve,s.reject,!t),"pending"===s.state()||_(r[n]&&r[n].then)))return s.then();for(;n--;)K(r[n],o(n),s.reject);return s.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;M.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&Z.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},M.readyException=function(e){i.setTimeout((function(){throw e}))};var Q=M.Deferred();function J(){y.removeEventListener("DOMContentLoaded",J),i.removeEventListener("load",J),M.ready()}M.fn.ready=function(e){return Q.then(e).catch((function(e){M.readyException(e)})),this},M.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--M.readyWait:M.isReady)||(M.isReady=!0,!0!==e&&--M.readyWait>0||Q.resolveWith(y,[M]))}}),M.ready.then=Q.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?i.setTimeout(M.ready):(y.addEventListener("DOMContentLoaded",J),i.addEventListener("load",J));var ee=function(e,t,n,i,r,s,o){var a=0,l=e.length,c=null==n;if("object"===w(n))for(a in r=!0,n)ee(e,t,a,n[a],!0,s,o);else if(void 0!==i&&(r=!0,_(i)||(o=!0),c&&(o?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(M(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),M.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ae.get(e,t),n&&(!i||Array.isArray(n)?i=ae.access(e,t,M.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=M.queue(e,t),i=n.length,r=n.shift(),s=M._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,(function(){M.dequeue(e,t)}),s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:M.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),M.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Te=/^$|^module$|\/(?:java|ecma)script/i;Se=y.createDocumentFragment().appendChild(y.createElement("div")),(Ae=y.createElement("input")).setAttribute("type","radio"),Ae.setAttribute("checked","checked"),Ae.setAttribute("name","t"),Se.appendChild(Ae),g.checkClone=Se.cloneNode(!0).cloneNode(!0).lastChild.checked,Se.innerHTML="",g.noCloneChecked=!!Se.cloneNode(!0).lastChild.defaultValue,Se.innerHTML="",g.option=!!Se.lastChild;var Ee={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Pe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T(e,t)?M.merge([e],n):n}function Ie(e,t){for(var n=0,i=e.length;n",""]);var ke=/<|&#?\w+;/;function Re(e,t,n,i,r){for(var s,o,a,l,c,u,h=t.createDocumentFragment(),d=[],p=0,f=e.length;p-1)r&&r.push(s);else if(c=ge(s),o=Pe(h.appendChild(s),"script"),c&&Ie(o),n)for(u=0;s=o[u++];)Te.test(s.type||"")&&n.push(s);return h}var De=/^([^.]*)(?:\.(.+)|)/;function Le(){return!0}function Oe(){return!1}function Ne(e,t,n,i,r,s){var o,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Ne(e,a,n,i,t[a],s);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Oe;else if(!r)return e;return 1===s&&(o=r,r=function(e){return M().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=M.guid++)),e.each((function(){M.event.add(this,t,r,i,n)}))}function Fe(e,t,n){n?(ae.set(e,t,!1),M.event.add(e,t,{namespace:!1,handler:function(e){var n,i=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(M.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=a.call(arguments),ae.set(this,t,i),this[t](),n=ae.get(this,t),ae.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(ae.set(this,t,M.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Le)}})):void 0===ae.get(e,t)&&M.event.add(e,t,Le)}M.event={global:{},add:function(e,t,n,i,r){var s,o,a,l,c,u,h,d,p,f,m,g=ae.get(e);if(se(e))for(n.handler&&(n=(s=n).handler,r=s.selector),r&&M.find.matchesSelector(me,r),n.guid||(n.guid=M.guid++),(l=g.events)||(l=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==M&&M.event.triggered!==t.type?M.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(q)||[""]).length;c--;)p=m=(a=De.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=M.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=M.event.special[p]||{},u=M.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&M.expr.match.needsContext.test(r),namespace:f.join(".")},s),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,f,o)||e.addEventListener&&e.addEventListener(p,o)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),M.event.global[p]=!0)},remove:function(e,t,n,i,r){var s,o,a,l,c,u,h,d,p,f,m,g=ae.hasData(e)&&ae.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(q)||[""]).length;c--;)if(p=m=(a=De.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=M.event.special[p]||{},d=l[p=(i?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)u=d[s],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(s,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));o&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,g.handle)||M.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)M.event.remove(e,p+t[c],n,i,!0);M.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,s,o,a=new Array(arguments.length),l=M.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],u=M.event.special[l.type]||{};for(a[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],o={},n=0;n-1:M.find(r,this,null,[c]).length),o[r]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,l\s*$/g;function Ve(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&M(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function $e(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ge(e,t){var n,i,r,s,o,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(r in ae.remove(t,"handle events"),a)for(n=0,i=a[r].length;n1&&"string"==typeof f&&!g.checkClone&&Ue.test(f))return e.each((function(r){var s=e.eq(r);m&&(t[0]=f.call(this,r,s.html())),We(s,t,n,i)}));if(d&&(s=(r=Re(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=s),s||i)){for(a=(o=M.map(Pe(r,"script"),He)).length;h0&&Ie(o,!l&&Pe(e,"script")),a},cleanData:function(e){for(var t,n,i,r=M.event.special,s=0;void 0!==(n=e[s]);s++)if(se(n)){if(t=n[ae.expando]){if(t.events)for(i in t.events)r[i]?M.event.remove(n,i):M.removeEvent(n,i,t.handle);n[ae.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),M.fn.extend({detach:function(e){return qe(this,e,!0)},remove:function(e){return qe(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?M.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return We(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ve(this,e).appendChild(e)}))},prepend:function(){return We(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ve(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(M.cleanData(Pe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return M.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Be.test(e)&&!Ee[(Ce.exec(e)||["",""])[1].toLowerCase()]){e=M.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-a-.5))||0),l+c}function ut(e,t,n){var i=Ke(e),r=(!g.boxSizingReliable()||n)&&"border-box"===M.css(e,"boxSizing",!1,i),s=r,o=Je(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(Xe.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&T(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===M.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===M.css(e,"boxSizing",!1,i),(s=a in e)&&(o=e[a])),(o=parseFloat(o)||0)+ct(e,t,n||(r?"border":"content"),s,i,o)+"px"}function ht(e,t,n,i,r){return new ht.prototype.init(e,t,n,i,r)}M.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,o,a=re(t),l=Ye.test(t),c=e.style;if(l||(t=rt(a)),o=M.cssHooks[t]||M.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(r=o.get(e,!1,i))?r:c[t];"string"==(s=typeof n)&&(r=pe.exec(n))&&r[1]&&(n=ye(e,t,r),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=r&&r[3]||(M.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,s,o,a=re(t);return Ye.test(t)||(t=rt(a)),(o=M.cssHooks[t]||M.cssHooks[a])&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=Je(e,t,i)),"normal"===r&&t in at&&(r=at[t]),""===n||n?(s=parseFloat(r),!0===n||isFinite(s)?s||0:r):r}}),M.each(["height","width"],(function(e,t){M.cssHooks[t]={get:function(e,n,i){if(n)return!st.test(M.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,i):Ze(e,ot,(function(){return ut(e,t,i)}))},set:function(e,n,i){var r,s=Ke(e),o=!g.scrollboxSize()&&"absolute"===s.position,a=(o||i)&&"border-box"===M.css(e,"boxSizing",!1,s),l=i?ct(e,t,i,a,s):0;return a&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-ct(e,t,"border",!1,s)-.5)),l&&(r=pe.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=M.css(e,t)),lt(0,n,l)}}})),M.cssHooks.marginLeft=et(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),M.each({margin:"",padding:"",border:"Width"},(function(e,t){M.cssHooks[e+t]={expand:function(n){for(var i=0,r={},s="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+fe[i]+t]=s[i]||s[i-2]||s[0];return r}},"margin"!==e&&(M.cssHooks[e+t].set=lt)})),M.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var i,r,s={},o=0;if(Array.isArray(t)){for(i=Ke(e),r=t.length;o1)}}),M.Tween=ht,ht.prototype={constructor:ht,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||M.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(M.cssNumber[n]?"":"px")},cur:function(){var e=ht.propHooks[this.prop];return e&&e.get?e.get(this):ht.propHooks._default.get(this)},run:function(e){var t,n=ht.propHooks[this.prop];return this.options.duration?this.pos=t=M.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ht.propHooks._default.set(this),this}},ht.prototype.init.prototype=ht.prototype,ht.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=M.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){M.fx.step[e.prop]?M.fx.step[e.prop](e):1!==e.elem.nodeType||!M.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:M.style(e.elem,e.prop,e.now+e.unit)}}},ht.propHooks.scrollTop=ht.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},M.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},M.fx=ht.prototype.init,M.fx.step={};var dt,pt,ft=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function gt(){pt&&(!1===y.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(gt):i.setTimeout(gt,M.fx.interval),M.fx.tick())}function _t(){return i.setTimeout((function(){dt=void 0})),dt=Date.now()}function vt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=fe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function yt(e,t,n){for(var i,r=(bt.tweeners[t]||[]).concat(bt.tweeners["*"]),s=0,o=r.length;s1)},removeAttr:function(e){return this.each((function(){M.removeAttr(this,e)}))}}),M.extend({attr:function(e,t,n){var i,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?M.prop(e,t,n):(1===s&&M.isXMLDoc(e)||(r=M.attrHooks[t.toLowerCase()]||(M.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void M.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=M.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(q);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?M.removeAttr(e,n):e.setAttribute(n,n),n}},M.each(M.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=wt[t]||M.find.attr;wt[t]=function(e,t,i){var r,s,o=t.toLowerCase();return i||(s=wt[o],wt[o]=r,r=null!=n(e,t,i)?o:null,wt[o]=s),r}}));var St=/^(?:input|select|textarea|button)$/i,At=/^(?:a|area)$/i;function Mt(e){return(e.match(q)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function Tt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(q)||[]}M.fn.extend({prop:function(e,t){return ee(this,M.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[M.propFix[e]||e]}))}}),M.extend({prop:function(e,t,n){var i,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&M.isXMLDoc(e)||(t=M.propFix[t]||t,r=M.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=M.find.attr(e,"tabindex");return t?parseInt(t,10):St.test(e.nodeName)||At.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(M.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),M.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){M.propFix[this.toLowerCase()]=this})),M.fn.extend({addClass:function(e){var t,n,i,r,s,o;return _(e)?this.each((function(t){M(this).addClass(e.call(this,t,Ct(this)))})):(t=Tt(e)).length?this.each((function(){if(i=Ct(this),n=1===this.nodeType&&" "+Mt(i)+" "){for(s=0;s-1;)n=n.replace(" "+r+" "," ");o=Mt(n),i!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,s,o=typeof e,a="string"===o||Array.isArray(e);return _(e)?this.each((function(n){M(this).toggleClass(e.call(this,n,Ct(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=Tt(e),this.each((function(){if(a)for(s=M(this),r=0;r-1)return!0;return!1}});var Et=/\r/g;M.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=_(e),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,M(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=M.map(r,(function(e){return null==e?"":e+""}))),(t=M.valHooks[this.type]||M.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=M.valHooks[r.type]||M.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Et,""):null==n?"":n:void 0}}),M.extend({valHooks:{option:{get:function(e){var t=M.find.attr(e,"value");return null!=t?t:Mt(M.text(e))}},select:{get:function(e){var t,n,i,r=e.options,s=e.selectedIndex,o="select-one"===e.type,a=o?null:[],l=o?s+1:r.length;for(i=s<0?l:o?s:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),M.each(["radio","checkbox"],(function(){M.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=M.inArray(M(e).val(),t)>-1}},g.checkOn||(M.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Pt=i.location,It={guid:Date.now()},kt=/\?/;M.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||M.error("Invalid XML: "+(n?M.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Rt=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};M.extend(M.event,{trigger:function(e,t,n,r){var s,o,a,l,c,u,h,d,f=[n||y],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(o=d=a=n=n||y,3!==n.nodeType&&8!==n.nodeType&&!Rt.test(m+M.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[M.expando]?e:new M.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:M.makeArray(t,[e]),h=M.event.special[m]||{},r||!h.trigger||!1!==h.trigger.apply(n,t))){if(!r&&!h.noBubble&&!v(n)){for(l=h.delegateType||m,Rt.test(l+m)||(o=o.parentNode);o;o=o.parentNode)f.push(o),a=o;a===(n.ownerDocument||y)&&f.push(a.defaultView||a.parentWindow||i)}for(s=0;(o=f[s++])&&!e.isPropagationStopped();)d=o,e.type=s>1?l:h.bindType||m,(u=(ae.get(o,"events")||Object.create(null))[e.type]&&ae.get(o,"handle"))&&u.apply(o,t),(u=c&&o[c])&&u.apply&&se(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(f.pop(),t)||!se(n)||c&&_(n[m])&&!v(n)&&((a=n[c])&&(n[c]=null),M.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Dt),n[m](),e.isPropagationStopped()&&d.removeEventListener(m,Dt),M.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,n){var i=M.extend(new M.Event,n,{type:e,isSimulated:!0});M.event.trigger(i,null,t)}}),M.fn.extend({trigger:function(e,t){return this.each((function(){M.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return M.event.trigger(e,t,n,!0)}});var Lt=/\[\]$/,Ot=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;function Bt(e,t,n,i){var r;if(Array.isArray(t))M.each(t,(function(t,r){n||Lt.test(e)?i(e,r):Bt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==w(t))i(e,t);else for(r in t)Bt(e+"["+r+"]",t[r],n,i)}M.param=function(e,t){var n,i=[],r=function(e,t){var n=_(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!M.isPlainObject(e))M.each(e,(function(){r(this.name,this.value)}));else for(n in e)Bt(n,e[n],t,r);return i.join("&")},M.fn.extend({serialize:function(){return M.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=M.prop(this,"elements");return e?M.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!M(this).is(":disabled")&&Ft.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!Me.test(e))})).map((function(e,t){var n=M(this).val();return null==n?null:Array.isArray(n)?M.map(n,(function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}})):{name:t.name,value:n.replace(Ot,"\r\n")}})).get()}});var Ut=/%20/g,zt=/#.*$/,Vt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:GET|HEAD)$/,Gt=/^\/\//,jt={},Wt={},qt="*/".concat("*"),Xt=y.createElement("a");function Yt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,s=t.toLowerCase().match(q)||[];if(_(n))for(;i=s[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Kt(e,t,n,i){var r={},s=e===Wt;function o(a){var l;return r[a]=!0,M.each(e[a]||[],(function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)})),l}return o(t.dataTypes[0])||!r["*"]&&o("*")}function Zt(e,t){var n,i,r=M.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&M.extend(!0,e,i),e}Xt.href=Pt.href,M.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Pt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Pt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":M.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,M.ajaxSettings),t):Zt(M.ajaxSettings,e)},ajaxPrefilter:Yt(jt),ajaxTransport:Yt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,s,o,a,l,c,u,h,d,p=M.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?M(f):M.event,g=M.Deferred(),_=M.Callbacks("once memory"),v=p.statusCode||{},b={},x={},w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!o)for(o={};t=Ht.exec(s);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||w;return n&&n.abort(t),A(0,t),this}};if(g.promise(S),p.url=((e||p.url||Pt.href)+"").replace(Gt,Pt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(q)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Xt.protocol+"//"+Xt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=M.param(p.data,p.traditional)),Kt(jt,p,t,S),c)return S;for(h in(u=M.event&&p.global)&&0==M.active++&&M.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!$t.test(p.type),r=p.url.replace(zt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ut,"+")):(d=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(kt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Vt,"$1"),d=(kt.test(r)?"&":"?")+"_="+It.guid+++d),p.url=r+d),p.ifModified&&(M.lastModified[r]&&S.setRequestHeader("If-Modified-Since",M.lastModified[r]),M.etag[r]&&S.setRequestHeader("If-None-Match",M.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,S,p)||c))return S.abort();if(w="abort",_.add(p.complete),S.done(p.success),S.fail(p.error),n=Kt(Wt,p,t,S)){if(S.readyState=1,u&&m.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(a=i.setTimeout((function(){S.abort("timeout")}),p.timeout));try{c=!1,n.send(b,A)}catch(e){if(c)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,o,l){var h,d,y,b,x,w=t;c||(c=!0,a&&i.clearTimeout(a),n=void 0,s=l||"",S.readyState=e>0?4:0,h=e>=200&&e<300||304===e,o&&(b=function(e,t,n){for(var i,r,s,o,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)s=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){s=r;break}o||(o=r)}s=s||o}if(s)return s!==l[0]&&l.unshift(s),n[s]}(p,S,o)),!h&&M.inArray("script",p.dataTypes)>-1&&M.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function(e,t,n,i){var r,s,o,a,l,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(s=u.shift();s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(o=c[l+" "+s]||c["* "+s]))for(r in c)if((a=r.split(" "))[1]===s&&(o=c[l+" "+a[0]]||c["* "+a[0]])){!0===o?o=c[r]:!0!==c[r]&&(s=a[0],u.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(p,b,S,h),h?(p.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(M.lastModified[r]=x),(x=S.getResponseHeader("etag"))&&(M.etag[r]=x)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=b.state,d=b.data,h=!(y=b.error))):(y=w,!e&&w||(w="error",e<0&&(e=0))),S.status=e,S.statusText=(t||w)+"",h?g.resolveWith(f,[d,w,S]):g.rejectWith(f,[S,w,y]),S.statusCode(v),v=void 0,u&&m.trigger(h?"ajaxSuccess":"ajaxError",[S,p,h?d:y]),_.fireWith(f,[S,w]),u&&(m.trigger("ajaxComplete",[S,p]),--M.active||M.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return M.get(e,t,n,"json")},getScript:function(e,t){return M.get(e,void 0,t,"script")}}),M.each(["get","post"],(function(e,t){M[t]=function(e,n,i,r){return _(n)&&(r=r||i,i=n,n=void 0),M.ajax(M.extend({url:e,type:t,dataType:r,data:n,success:i},M.isPlainObject(e)&&e))}})),M.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),M._evalUrl=function(e,t,n){return M.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){M.globalEval(e,t,n)}})},M.fn.extend({wrapAll:function(e){var t;return this[0]&&(_(e)&&(e=e.call(this[0])),t=M(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return _(e)?this.each((function(t){M(this).wrapInner(e.call(this,t))})):this.each((function(){var t=M(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_(e);return this.each((function(n){M(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){M(this).replaceWith(this.childNodes)})),this}}),M.expr.pseudos.hidden=function(e){return!M.expr.pseudos.visible(e)},M.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},M.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Qt={0:200,1223:204},Jt=M.ajaxSettings.xhr();g.cors=!!Jt&&"withCredentials"in Jt,g.ajax=Jt=!!Jt,M.ajaxTransport((function(e){var t,n;if(g.cors||Jt&&!e.crossDomain)return{send:function(r,s){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Qt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),M.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),M.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return M.globalEval(e),e}}}),M.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),M.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=M("