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