UNPKG

@senx/discovery-code

Version:

Discovery Code Editor

1 lines 3.65 kB
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?i(e.value):r(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{b as bootstrapLazy}from"./index-3732ead9.js";export{s as setNonce}from"./index-3732ead9.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var defineCustomElements=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(typeof window==="undefined")return[2,undefined];return[4,globalScripts()];case 1:e.sent();return[2,bootstrapLazy([["discovery-code-editor_8",[[4,"discovery-code-editor",{url:[1],bootstrap:[1],language:[1],existingComments:[1,"existing-comments"],debug:[4],useBootstrap:[4,"use-bootstrap"],showDataviz:[4,"show-dataviz"],showExecute:[4,"show-execute"],showResult:[4,"show-result"],displayMessages:[4,"display-messages"],imageTab:[4,"image-tab"],widthPx:[2,"width-px"],heightPx:[2,"height-px"],heightLine:[2,"height-line"],theme:[1],code:[1],config:[1],initialSize:[16],selectedResultTab:[32],result:[32],status:[32],error:[32],innerConfig:[32],execute:[64],abort:[64],setBreakpointsReadOnly:[64],addInlineMarker:[64],removeInlineMarker:[64],addBreakpoints:[64],removeBreakpoints:[64],unHighlight:[64],highlight:[64],resize:[64]},[[0,"document:resize","onResized"],[0,"resized","onResized"]],{debug:["setDebug"],theme:["updateTheme"],code:["updateCode"],config:["configUpdate"]}],[1,"discovery-code-image-result",{theme:[1],config:[1],debug:[4],result:[1],loading:[32],imageList:[32],innerResult:[32],innerTheme:[32],innerConfig:[32]},null,{debug:["setDebug"],theme:["setTheme"],result:["setResult"]}],[1,"discovery-code-raw-result",{theme:[1],config:[1],debug:[4],result:[1]},null,{debug:["setDebug"],config:["setConfig"],theme:["updateTheme"],result:["setResult"]}],[0,"discovery-code-result",{theme:[1],config:[1],debug:[4],result:[1]},null,{debug:["setDebug"],result:["setResult"]}],[1,"wc-split",{items:[1],direction:[1],debug:[4],minHeight:[2,"min-height"]}],[1,"wc-tabs",{selection:[2]},[[0,"tabSelect","onSelectedTab"]],{selection:["onExternalSelection"]}],[4,"wc-tabs-content",{name:[1],responsive:[4],isSelected:[32],getChild:[64]}],[1,"wc-tabs-header",{name:[1],disabled:[4],isSelected:[32],getChild:[64]}]]]],t)]}}))}))};export{defineCustomElements};