(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Ft,controls_typeLists:()=>vt,lists_zip:()=>Pt,lists_zip_container:()=>Vt,lists_zip_item:()=>yt,unpack_iterable_object:()=>Yt,variables_change:()=>Nt,variables_get:()=>Dt,variables_global:()=>ft,variables_set:()=>Lt});var i={};t.r(i),t.d(i,{base_setup:()=>Xt,controls_delay:()=>Gt,controls_end_program:()=>xt,controls_except:()=>$t,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>Qt,controls_forEach:()=>wt,controls_for_range:()=>jt,controls_if:()=>Ut,controls_if_else:()=>zt,controls_if_elseif:()=>Jt,controls_if_if:()=>qt,controls_lambda:()=>ie,controls_main:()=>kt,controls_pass:()=>ne,controls_range:()=>Ht,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>Bt,datetime_fromtimestamp:()=>_e,do_while:()=>oe,garbage_collection:()=>pe,gene_unique_identifier:()=>re,get_mem_alloc:()=>ue,get_mem_free:()=>ae,get_unique_identifier:()=>le});var n={};t.r(n),t.d(n,{base_map:()=>Pe,generate_cartesian_product:()=>ye,math_arithmetic:()=>me,math_bit:()=>ce,math_constant:()=>Te,math_constant_mp:()=>he,math_constrain:()=>Se,math_dec:()=>Re,math_degree_to_radian:()=>be,math_indexer_number:()=>Le,math_map:()=>De,math_max_min:()=>Ce,math_number:()=>Ie,math_number_base_conversion:()=>Ae,math_radian_to_degree:()=>Ye,math_random:()=>ge,math_random_seed:()=>Ne,math_round:()=>fe,math_selfcalcu:()=>Oe,math_to_int:()=>Ee,math_trig:()=>Me,text_to_number:()=>Fe,text_to_number_skulpt:()=>ve,turn_to_int:()=>Ve});var s={};t.r(s),t.d(s,{ascii_to_char:()=>He,char_to_ascii:()=>we,number_to_text:()=>Be,os_system:()=>hi,text:()=>Xe,text_capital:()=>$e,text_center:()=>ti,text_char:()=>xe,text_char_at:()=>Qe,text_char_at2:()=>Ke,text_char_at3:()=>ri,text_compareTo:()=>_i,text_compare_to:()=>Ze,text_create_with_container:()=>ui,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>ze,text_eval:()=>Ti,text_find:()=>ei,text_format:()=>pi,text_format_noreturn:()=>di,text_join:()=>Ue,text_join_seq:()=>ii,text_length:()=>We,text_random_char:()=>je,text_replace:()=>ni,text_split:()=>si,text_strip:()=>oi,text_substring:()=>Je,text_substring2:()=>qe,text_substring3:()=>li,text_textarea:()=>Ge});var o={};t.r(o),t.d(o,{ENUMERATE:()=>zi,content_in_lists:()=>$i,enumerate:()=>Zi,list_many_input:()=>Xi,list_tolist:()=>Hi,list_tolist2:()=>Ji,list_trig:()=>Yi,lists_2d_get_col_row_data:()=>Ri,lists_2d_get_data_with_col_row:()=>Mi,lists_append_extend:()=>Di,lists_change_to:()=>ki,lists_change_to_general:()=>xi,lists_clear:()=>vi,lists_create_with:()=>Ei,lists_create_with2:()=>wi,lists_create_with_container:()=>Ai,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>Gi,lists_create_with_text:()=>Ci,lists_create_with_text2:()=>Bi,lists_del_general:()=>Ui,lists_find:()=>yi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>Oi,lists_get_random_item:()=>Li,lists_get_random_sublist:()=>Ni,lists_get_sublist:()=>ci,lists_insert_value:()=>fi,lists_insert_value2:()=>ji,lists_pop:()=>Vi,lists_remove_at:()=>Pi,lists_remove_at2:()=>qi,lists_reverse:()=>Fi,lists_setIndex3:()=>Qi,lists_set_index:()=>Si,lists_sort:()=>bi});var p={};t.r(p),t.d(p,{dicts_add_change_del:()=>mn,dicts_add_or_change:()=>an,dicts_clear:()=>rn,dicts_create_with:()=>en,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>Mn,dicts_deldict:()=>hn,dicts_delete:()=>ln,dicts_get:()=>pn,dicts_get_default:()=>un,dicts_items:()=>dn,dicts_keys:()=>on,dicts_length:()=>Tn,dicts_pop:()=>On,dicts_setdefault:()=>cn,dicts_to_json:()=>En,dicts_to_json2:()=>gn,dicts_to_to:()=>An,dicts_todict:()=>Rn,dicts_update:()=>_n,dicts_values:()=>In,json_to_dicts:()=>Cn});var u={};t.r(u),t.d(u,{logic_boolean:()=>Fn,logic_compare:()=>Dn,logic_compare_continous:()=>Ln,logic_is:()=>yn,logic_is_in:()=>Vn,logic_negate:()=>fn,logic_null:()=>vn,logic_operation:()=>Nn,logic_tobool:()=>Yn,logic_true_or_false:()=>Pn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>Bn,storage_change_dir:()=>es,storage_close_file:()=>Kn,storage_delete_file:()=>jn,storage_file_seek:()=>zn,storage_file_tell:()=>Jn,storage_file_write:()=>xn,storage_fileopen:()=>kn,storage_fileopen_new:()=>Xn,storage_fileopen_new_encoding:()=>Gn,storage_get_a_line:()=>wn,storage_get_contents:()=>Hn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>Zn,storage_get_file_size:()=>qn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>Qn,storage_make_dir:()=>$n,storage_open_file_with_os:()=>bn,storage_rename:()=>ts});var l={};t.r(l),t.d(l,{procedures_callnoreturn:()=>ls,procedures_callreturn:()=>_s,procedures_defnoreturn:()=>os,procedures_defreturn:()=>ps,procedures_ifreturn:()=>rs,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>us,procedures_return:()=>ds});var _={};t.r(_),t.d(_,{tuple_change_to:()=>gs,tuple_create_with:()=>Ts,tuple_create_with_container:()=>hs,tuple_create_with_item:()=>ms,tuple_create_with_noreturn:()=>Ns,tuple_create_with_text2:()=>Os,tuple_create_with_text_return:()=>cs,tuple_del:()=>Es,tuple_find:()=>Ss,tuple_getIndex:()=>Ms,tuple_getSublist:()=>Ls,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>Ps,tuple_join:()=>Cs,tuple_length:()=>Rs,tuple_max:()=>As,tuple_totuple:()=>vs,tuple_trig:()=>Ds});var r={};t.r(r),t.d(r,{set_add_discard:()=>Hs,set_clear:()=>Gs,set_create_with:()=>ys,set_create_with_container:()=>Ys,set_create_with_item:()=>bs,set_create_with_text_return:()=>Ws,set_length:()=>ks,set_operate:()=>xs,set_operate_update:()=>Us,set_pop:()=>Xs,set_sub:()=>ws,set_toset:()=>Ks,set_update:()=>Bs});var d={};t.r(d),t.d(d,{html_content:()=>zs,html_content_more:()=>Zs,html_document:()=>js,html_form:()=>to,html_head_body:()=>Js,html_style:()=>$s,html_style_color:()=>io,html_style_content:()=>eo,html_text:()=>no,html_title:()=>qs});var I={};t.r(I),t.d(I,{attribute_access:()=>co,function_call:()=>ho,function_call_container:()=>mo,function_call_item:()=>Oo,raw_block:()=>po,raw_empty:()=>ao,raw_expression:()=>uo,raw_table:()=>oo,text_comment:()=>lo,text_print_multiple:()=>ro,text_print_multiple_container:()=>Io,text_print_multiple_item:()=>To,type_check:()=>_o});var T={};t.r(T),t.d(T,{controls_type:()=>Ao,controls_typeLists:()=>go,lists_zip:()=>So,unpack_iterable_object:()=>Do,variables_change:()=>Eo,variables_get:()=>Mo,variables_global:()=>Co,variables_set:()=>Ro});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>bo,base_setup:()=>No,controls_delay:()=>Yo,controls_flow_statements:()=>yo,controls_for:()=>vo,controls_forEach:()=>Uo,controls_for_range:()=>Po,controls_if:()=>fo,controls_interrupts:()=>Go,controls_lambda:()=>wo,controls_main:()=>Lo,controls_millis:()=>ko,controls_nointerrupts:()=>xo,controls_pass:()=>Wo,controls_range:()=>Ho,controls_repeat:()=>$o,controls_repeat_ext:()=>jo,controls_thread:()=>Ko,controls_try_finally:()=>Fo,controls_whileUntil:()=>Vo,datetime_fromtimestamp:()=>tp,do_while:()=>Qo,garbage_collection:()=>qo,gene_unique_identifier:()=>ep,get_mem_alloc:()=>Jo,get_mem_free:()=>zo,get_unique_identifier:()=>Zo,reset:()=>Xo,time_sleep:()=>Bo});var m={};t.r(m),t.d(m,{base_map:()=>Cp,generate_cartesian_product:()=>gp,math_arithmetic:()=>pp,math_bit:()=>op,math_constant:()=>np,math_constant_mp:()=>sp,math_constrain:()=>hp,math_dec:()=>_p,math_degree_to_radian:()=>Dp,math_indexer_number:()=>cp,math_map:()=>Tp,math_max_min:()=>dp,math_number:()=>ip,math_number_base_conversion:()=>mp,math_radian_to_degree:()=>Sp,math_random:()=>Ip,math_random_seed:()=>Op,math_round:()=>Mp,math_selfcalcu:()=>up,math_single:()=>ap,math_to_int:()=>rp,math_trig:()=>lp,text_to_number:()=>Rp,text_to_number_skulpt:()=>Ep,turn_to_int:()=>Ap});var O={};t.r(O),t.d(O,{ascii_to_char:()=>vp,char_to_ascii:()=>Pp,number_to_text:()=>Vp,os_system:()=>iu,text:()=>Lp,text_capital:()=>Hp,text_center:()=>wp,text_char:()=>fp,text_char_at:()=>bp,text_char_at2:()=>Yp,text_char_at3:()=>$p,text_compareTo:()=>Zp,text_compare_to:()=>Gp,text_encode:()=>tu,text_equals_starts_ends:()=>Xp,text_eval:()=>eu,text_find:()=>Bp,text_format:()=>qp,text_format_noreturn:()=>Jp,text_join:()=>Fp,text_join_seq:()=>Wp,text_length:()=>yp,text_random_char:()=>kp,text_replace:()=>Kp,text_split:()=>Qp,text_strip:()=>jp,text_substring:()=>Up,text_substring2:()=>xp,text_substring3:()=>zp,text_textarea:()=>Np});var c={};t.r(c),t.d(c,{content_in_lists:()=>bu,enumerate:()=>Yu,list_many_input:()=>Cu,list_tolist:()=>Vu,list_tolist2:()=>yu,list_trig:()=>Mu,lists_2d_get_col_row_data:()=>ou,lists_2d_get_data_with_col_row:()=>su,lists_append_extend:()=>_u,lists_change_to:()=>Eu,lists_change_to_general:()=>gu,lists_clear:()=>hu,lists_create_with:()=>pu,lists_create_with2:()=>Du,lists_create_with_noreturn:()=>Au,lists_create_with_text:()=>uu,lists_create_with_text2:()=>Lu,lists_del_general:()=>Su,lists_find:()=>mu,lists_getIndex3:()=>Nu,lists_getSublist3:()=>fu,lists_get_index:()=>au,lists_get_random_item:()=>ru,lists_get_random_sublist:()=>du,lists_get_sublist:()=>nu,lists_insert_value:()=>Iu,lists_insert_value2:()=>vu,lists_pop:()=>cu,lists_remove_at:()=>Ou,lists_remove_at2:()=>Pu,lists_reverse:()=>Tu,lists_setIndex3:()=>Fu,lists_set_index:()=>lu,lists_sort:()=>Ru});var M={};t.r(M),t.d(M,{dicts_add_change_del:()=>qu,dicts_add_or_change:()=>Uu,dicts_clear:()=>Bu,dicts_create_with:()=>ku,dicts_create_with_noreturn:()=>Zu,dicts_deldict:()=>ju,dicts_delete:()=>Hu,dicts_get:()=>Gu,dicts_get_default:()=>xu,dicts_items:()=>Wu,dicts_keys:()=>Xu,dicts_length:()=>Qu,dicts_pop:()=>Ju,dicts_setdefault:()=>zu,dicts_to_json:()=>ta,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>$u,dicts_update:()=>wu,dicts_values:()=>Ku,json_to_dicts:()=>ea});var R={};t.r(R),t.d(R,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>oa,logic_is:()=>da,logic_is_in:()=>ra,logic_negate:()=>ua,logic_null:()=>la,logic_operation:()=>pa,logic_tobool:()=>Ia,logic_true_or_false:()=>_a});var E={};t.r(E),t.d(E,{sdcard_mount:()=>ba,sdcard_use_spi_init:()=>Ya,storage_can_write_ornot:()=>Ca,storage_change_dir:()=>Fa,storage_close_file:()=>ga,storage_delete_file:()=>Da,storage_file_seek:()=>fa,storage_file_tell:()=>Na,storage_file_write:()=>ca,storage_fileopen:()=>ha,storage_fileopen_new:()=>ma,storage_fileopen_new_encoding:()=>Oa,storage_get_a_line:()=>Ea,storage_get_contents:()=>Ra,storage_get_contents_without_para:()=>Ma,storage_get_current_dir:()=>va,storage_get_file_size:()=>La,storage_get_filename:()=>Aa,storage_is_file:()=>ya,storage_list_all_files:()=>Sa,storage_make_dir:()=>Pa,storage_open_file_with_os:()=>Ta,storage_rename:()=>Va});var C={};t.r(C),t.d(C,{procedures_callnoreturn:()=>xa,procedures_callreturn:()=>Ga,procedures_defnoreturn:()=>Xa,procedures_defreturn:()=>ka,procedures_ifreturn:()=>Ua,procedures_return:()=>Ha});var A={};t.r(A),t.d(A,{tuple_change_to:()=>za,tuple_create_with:()=>wa,tuple_create_with_noreturn:()=>el,tuple_create_with_text2:()=>Ba,tuple_create_with_text_return:()=>Wa,tuple_del:()=>ja,tuple_find:()=>Za,tuple_getIndex:()=>Ka,tuple_getSublist:()=>tl,tuple_get_random_item:()=>nl,tuple_get_sublist:()=>il,tuple_input:()=>ol,tuple_join:()=>qa,tuple_length:()=>Qa,tuple_max:()=>Ja,tuple_totuple:()=>sl,tuple_trig:()=>$a});var g={};t.r(g),t.d(g,{set_add_discard:()=>dl,set_clear:()=>ll,set_create_with:()=>pl,set_create_with_text_return:()=>hl,set_length:()=>ul,set_operate:()=>_l,set_operate_update:()=>rl,set_pop:()=>al,set_sub:()=>Il,set_toset:()=>ml,set_update:()=>Tl});var S={};t.r(S),t.d(S,{html_content:()=>Rl,html_content_more:()=>El,html_document:()=>Ol,html_form:()=>Al,html_head_body:()=>Ml,html_style:()=>Cl,html_style_content:()=>gl,html_text:()=>Sl,html_title:()=>cl});var D={};t.r(D),t.d(D,{attribute_access:()=>Pl,function_call:()=>vl,raw_block:()=>Dl,raw_empty:()=>Nl,raw_expression:()=>Ll,raw_table:()=>fl,type_check:()=>Fl});var L={};t.r(L),t.d(L,{actuator_extern_get_led_bright:()=>Ul,actuator_extern_led_bright:()=>xl,actuator_extern_led_brightness:()=>Hl,actuator_get_led_bright:()=>Bl,actuator_led_bright:()=>wl,actuator_led_brightness:()=>Wl,actuator_neopixel_init:()=>s_,actuator_neopixel_rgb:()=>o_,actuator_neopixel_write:()=>p_,actuator_onboard_neopixel_rgb:()=>u_,actuator_onboard_neopixel_rgb_all:()=>a_,actuator_onboard_neopixel_write:()=>l_,esp32_mixgo_music_play_list_show:()=>n_,esp32_music_get_tempo:()=>Jl,esp32_music_pitch:()=>Kl,esp32_music_pitch_with_time:()=>Ql,esp32_music_play_list:()=>i_,esp32_music_reset:()=>zl,esp32_music_set_tempo:()=>ql,esp32_music_stop:()=>jl,esp32_onboard_music_pitch:()=>Zl,esp32_onboard_music_pitch_with_time:()=>$l,esp32_onboard_music_play_list:()=>e_,esp32_onboard_music_stop:()=>t_,get_led_bright:()=>r_,led_brightness:()=>d_,led_light:()=>__,ledswitch:()=>Gl,number:()=>Xl,servo_move:()=>kl});var N={};t.r(N),t.d(N,{mpython_blynk_app_data:()=>L_,mpython_blynk_app_notify:()=>R_,mpython_blynk_email:()=>A_,mpython_blynk_get_timers:()=>g_,mpython_blynk_on_connected:()=>O_,mpython_blynk_on_disconnected:()=>m_,mpython_blynk_run:()=>M_,mpython_blynk_sensor_data_to_app:()=>D_,mpython_blynk_set_property:()=>C_,mpython_blynk_setup:()=>N_,mpython_blynk_stop_timers:()=>E_,mpython_blynk_sync_virtual:()=>h_,mpython_blynk_terminal_widget_vpin:()=>T_,mpython_blynktimer:()=>S_,mpython_blynktimer_run:()=>c_});var f={};t.r(f),t.d(f,{display_animate:()=>Ur,display_blink_rate:()=>fr,display_bright_point:()=>tr,display_bright_screen:()=>Nr,display_circle:()=>Hr,display_clear:()=>Z_,display_draw_4strings:()=>Er,display_fill:()=>br,display_get_pixel:()=>$_,display_get_screen_image:()=>Lr,display_get_screen_pixel:()=>Dr,display_help:()=>Br,display_image_builtins:()=>rr,display_image_create:()=>dr,display_image_size:()=>Cr,display_line:()=>gr,display_line_arbitrarily:()=>Sr,display_matrix_use_i2c_init:()=>Qr,display_oled_drawPixel:()=>Kr,display_oled_showBitmap:()=>Wr,display_onoff:()=>Yr,display_rect:()=>Ar,display_rgb_color:()=>Fr,display_scroll_string:()=>Pr,display_scroll_string_delay:()=>yr,display_scroll_string_extern:()=>qr,display_show_image:()=>jr,display_show_image_or_string:()=>vr,display_show_image_or_string_delay:()=>Vr,display_show_static:()=>nr,display_tm1650_power:()=>Xr,display_tm1650_show_dot:()=>xr,display_tm1650_show_num:()=>Gr,display_tm_use_i2c_init:()=>kr,display_triangle:()=>wr,display_use_i2c_init:()=>Rr,esp32_display_is_on:()=>_r,esp32_display_off:()=>lr,esp32_display_on:()=>ar,esp32_display_scroll:()=>ur,esp32_display_show_animation:()=>pr,esp32_display_show_default_image:()=>or,esp32_display_show_string:()=>hr,group_lcd_init:()=>Or,group_lcd_power:()=>Mr,group_lcd_print:()=>mr,group_lcd_print2:()=>cr,image_arithmetic:()=>Tr,image_shift:()=>Ir,microbit_display_show_image:()=>sr,monitor_show_scroll_string:()=>ir,monitor_show_string:()=>er});var F={};t.r(F),t.d(F,{IOT_CONNECT_OLLAMA:()=>Pd,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Md,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>cd,IOT_EMQX_PING:()=>md,IOT_FORMATTING:()=>Td,IOT_FORMAT_STRING:()=>hd,IOT_MIXIO_NTP:()=>Od,IOT_MIXIO_PUBLISH:()=>ud,IOT_MIXIO_SUBSCRIBE:()=>ad,iot_checkonenet:()=>fd,iot_client_onboard:()=>Ed,iot_connect_ollama:()=>vd,iot_connect_openai:()=>Vd,iot_create_with_item:()=>od,iot_http_client:()=>Cd,iot_http_data:()=>Ad,iot_mixio_check:()=>rd,iot_mixio_connect:()=>pd,iot_mixio_connect_only:()=>_d,iot_mixio_disconnect:()=>ld,iot_mixio_format_msg:()=>Id,iot_mixio_format_topic:()=>dd,iot_mixly_key:()=>Rd,iot_mqtt_client:()=>gd,iot_mqtt_data:()=>Sd,iot_onenet_check:()=>td,iot_onenet_connect:()=>Zr,iot_onenet_disconnect:()=>$r,iot_onenet_publish:()=>id,iot_onenet_publish_dict:()=>ed,iot_onenetconnect:()=>Ld,iot_onenetdisconnect:()=>Nd,iot_publish:()=>Fd,iot_publish_container:()=>nd,iot_publish_item:()=>sd,iot_wifi_connect:()=>zr,iot_wificonnect:()=>Dd,ollama_empty_history:()=>bd,use_ollama_llm_to_chat:()=>yd,use_ollama_llm_to_chat_return:()=>Yd});var v={};t.r(v),t.d(v,{actuator_extern_get_led_bright:()=>lI,actuator_extern_led_bright:()=>aI,actuator_extern_led_brightness:()=>_I,actuator_get_led_bright:()=>dI,actuator_led_bright:()=>rI,actuator_led_brightness:()=>II,actuator_neopixel_init:()=>TI,actuator_neopixel_rgb:()=>mI,actuator_neopixel_write:()=>hI,actuator_onboard_neopixel_rgb:()=>cI,actuator_onboard_neopixel_rgb_all:()=>MI,actuator_onboard_neopixel_write:()=>OI,esp32_mixgo_music_play_list_show:()=>nI,esp32_music_get_tempo:()=>zd,esp32_music_pitch:()=>Qd,esp32_music_pitch_with_time:()=>jd,esp32_music_play_list:()=>iI,esp32_music_reset:()=>sI,esp32_music_set_tempo:()=>Jd,esp32_music_stop:()=>qd,esp32_onboard_music_pitch:()=>Zd,esp32_onboard_music_pitch_with_time:()=>$d,esp32_onboard_music_play_list:()=>eI,esp32_onboard_music_stop:()=>tI,get_led_bright:()=>EI,led_brightness:()=>CI,led_light:()=>RI,ledswitch:()=>uI,number:()=>pI,servo_move:()=>oI});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>yI,mpython_blynk_app_notify:()=>fI,mpython_blynk_email:()=>YI,mpython_blynk_get_timers:()=>vI,mpython_blynk_on_connected:()=>DI,mpython_blynk_on_disconnected:()=>SI,mpython_blynk_run:()=>NI,mpython_blynk_sensor_data_to_app:()=>VI,mpython_blynk_set_property:()=>bI,mpython_blynk_setup:()=>kI,mpython_blynk_stop_timers:()=>FI,mpython_blynk_sync_virtual:()=>gI,mpython_blynk_terminal_widget_vpin:()=>AI,mpython_blynktimer:()=>PI,mpython_blynktimer_run:()=>LI});var V={};t.r(V),t.d(V,{display_animate:()=>rT,display_blink_rate:()=>JI,display_bright_point:()=>KI,display_bright_screen:()=>qI,display_circle:()=>dT,display_clear:()=>zI,display_draw_4strings:()=>$I,display_fill:()=>pT,display_get_pixel:()=>WI,display_get_screen_image:()=>jI,display_get_screen_pixel:()=>QI,display_image_builtins:()=>BI,display_image_create:()=>wI,display_line:()=>nT,display_line_arbitrarily:()=>tT,display_matrix_use_i2c_init:()=>mT,display_oled_drawPixel:()=>hT,display_oled_showBitmap:()=>TT,display_onoff:()=>sT,display_rect:()=>eT,display_scroll_string:()=>GI,display_scroll_string_delay:()=>HI,display_scroll_string_extern:()=>cT,display_show_image:()=>OT,display_show_image_or_string:()=>XI,display_show_image_or_string_delay:()=>UI,display_show_static:()=>xI,display_tm1650_power:()=>aT,display_tm1650_show_dot:()=>_T,display_tm1650_show_num:()=>lT,display_tm_use_i2c_init:()=>uT,display_triangle:()=>IT,display_use_i2c_init:()=>ZI,image_arithmetic:()=>iT,image_shift:()=>oT});var y={};t.r(y),t.d(y,{IOT_CONNECT_OLLAMA:()=>KT,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>kT,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>YT,IOT_EMQX_PING:()=>XT,IOT_FORMATTING:()=>VT,IOT_FORMAT_STRING:()=>yT,IOT_MIXIO_NTP:()=>GT,IOT_MIXIO_PUBLISH:()=>DT,IOT_MIXIO_SUBSCRIBE:()=>LT,iot_client_onboard:()=>xT,iot_connect_ollama:()=>WT,iot_connect_openai:()=>QT,iot_http_client:()=>UT,iot_http_data:()=>HT,iot_mixio_check:()=>FT,iot_mixio_connect:()=>ST,iot_mixio_connect_only:()=>fT,iot_mixio_disconnect:()=>NT,iot_mixio_format_msg:()=>PT,iot_mixio_format_topic:()=>vT,iot_mixly_key:()=>bT,iot_mqtt_client:()=>wT,iot_mqtt_data:()=>BT,iot_onenet_check:()=>AT,iot_onenet_connect:()=>RT,iot_onenet_disconnect:()=>ET,iot_onenet_publish:()=>gT,iot_onenet_publish_dict:()=>CT,iot_wifi_connect:()=>MT,ollama_empty_history:()=>JT,use_ollama_llm_to_chat:()=>jT,use_ollama_llm_to_chat_return:()=>qT});var Y={};t.r(Y),t.d(Y,{PID_get_pid:()=>rh,PID_init:()=>_h,actuator_PAC9685_Servo:()=>nh,actuator_PAC9685_init:()=>ih,actuator_Servo:()=>eh,actuator_Servo_init:()=>th,actuator_ms32006_dcmotor:()=>ah,actuator_ms32006_init:()=>uh,actuator_ms32006_stepper:()=>lh,actuator_rgb_display:()=>ph,actuator_rgb_init:()=>sh,actuator_rgb_set:()=>oh});var b={};t.r(b),t.d(b,{KPU_analysis:()=>Rh,KPU_forward:()=>Mh,KPU_init_yolo2:()=>Oh,KPU_load:()=>hh,KPU_load1:()=>mh,KPU_run_yolo2:()=>ch,ai_face_info:()=>fh,ai_face_init:()=>Lh,ai_face_train:()=>Nh,ailocal_loading:()=>Sh,ailocal_predict:()=>Dh,ailocal_training:()=>gh,aionenet_API:()=>Ah,aionenet_nic_init:()=>Eh,aionenet_token:()=>Ch,tuple_anchor:()=>Ih,tuple_calss:()=>Th});var k={};t.r(k),t.d(k,{audio_play:()=>Vh,audio_record:()=>yh,mic_init:()=>Ph,spk_init:()=>vh,video_play:()=>Yh,video_record:()=>bh});var X={};t.r(X),t.d(X,{camera_getinfo:()=>zh,camera_init:()=>xh,camera_reset:()=>Uh,camera_run:()=>Bh,camera_set_colorbar:()=>Jh,camera_set_framesize:()=>wh,camera_set_hmirror:()=>jh,camera_set_pixformat:()=>Hh,camera_set_vflip:()=>qh,camera_set_windowing:()=>$h,camera_setmun:()=>Zh,camera_shutdown:()=>Qh,camera_skip_frames:()=>Wh,camera_snapshot:()=>Kh,mode:()=>Xh,size:()=>Gh});var G={};t.r(G),t.d(G,{communicate_i2c_available:()=>Om,communicate_i2c_init:()=>im,communicate_i2c_master_read:()=>mm,communicate_i2c_read:()=>sm,communicate_i2c_scan:()=>pm,communicate_i2c_write:()=>om,communicate_i2s_init:()=>nm,communicate_ir_recv:()=>em,communicate_ow_init:()=>Mm,communicate_ow_read:()=>Em,communicate_ow_reset:()=>gm,communicate_ow_scan:()=>Rm,communicate_ow_select:()=>Am,communicate_ow_write:()=>Cm,communicate_spi_buffer:()=>lm,communicate_spi_init:()=>um,communicate_spi_read:()=>_m,communicate_spi_read_output:()=>rm,communicate_spi_readinto:()=>dm,communicate_spi_readinto_output:()=>Im,communicate_spi_set:()=>am,communicate_spi_write:()=>Tm,communicate_spi_write_readinto:()=>hm,i2c_available:()=>Gm,i2c_init:()=>Sm,i2c_master_reader2:()=>Xm,i2c_read:()=>Dm,i2c_scan:()=>Nm,i2c_slave_onreceive:()=>cm,i2c_write:()=>Lm,spi_buffer:()=>vm,spi_init:()=>fm,spi_read:()=>Pm,spi_read_output:()=>Vm,spi_readinto:()=>ym,spi_readinto_output:()=>Ym,spi_set:()=>Fm,spi_write:()=>bm,spi_write_readinto:()=>km});var x={};t.r(x),t.d(x,{angle:()=>Um,lcd_clear:()=>jm,lcd_color:()=>Hm,lcd_colour:()=>Km,lcd_display:()=>Qm,lcd_draw_string:()=>zm,lcd_init:()=>Bm,lcd_mirror:()=>Jm,lcd_rotation:()=>qm,lcd_width:()=>Wm,on_off:()=>wm,touch_calibrate:()=>$m,touch_info:()=>eO,touch_init:()=>Zm,touch_read:()=>tO});var U={};t.r(U),t.d(U,{factory_block:()=>dO,factory_block_notes:()=>mO,factory_block_return:()=>IO,factory_block_return_with_textarea:()=>hO,factory_block_with_textarea:()=>TO,factory_callMethod_noreturn:()=>_O,factory_callMethod_return:()=>rO,factory_create_with_container:()=>pO,factory_create_with_item:()=>uO,factory_declare:()=>lO,factory_from_import:()=>nO,factory_function_noreturn:()=>oO,factory_function_return:()=>aO,factory_import:()=>sO});var H={};t.r(H),t.d(H,{asrloca_config:()=>MO,asrloca_del:()=>EO,asrloca_init:()=>cO,asrloca_recognize:()=>RO});var w={};t.r(w),t.d(w,{image_Histogram:()=>Ec,image_Image:()=>gO,image_Image1:()=>SO,image_RGB:()=>fO,image_apriltag:()=>Oc,image_barcode:()=>mc,image_binary:()=>_c,image_blob:()=>Rc,image_cartoon:()=>nc,image_circle:()=>$O,image_clear:()=>vO,image_compress:()=>FO,image_copy:()=>NO,image_dilate:()=>oc,image_draw_arrow:()=>UO,image_draw_circle:()=>wO,image_draw_cross:()=>HO,image_draw_image:()=>KO,image_draw_keypoints:()=>WO,image_draw_line:()=>xO,image_draw_rectangle:()=>BO,image_draw_string:()=>GO,image_draw_string_UTF:()=>XO,image_draw_string_flash:()=>kO,image_erode:()=>sc,image_find_apriltags:()=>Tc,image_find_barcodes:()=>dc,image_find_blobs:()=>cc,image_find_circles:()=>qO,image_find_hog:()=>Nc,image_find_keypoints:()=>fc,image_find_line_segments:()=>jO,image_find_lines:()=>QO,image_find_qrcodes:()=>Ic,image_find_rects:()=>JO,image_flood_fill:()=>pc,image_font_free:()=>bO,image_font_load:()=>YO,image_get_histogram:()=>Mc,image_get_pixel:()=>yO,image_get_regression:()=>zO,image_getinfo:()=>DO,image_grayscale_to_rgb:()=>Lc,image_histeq:()=>ec,image_invert:()=>ac,image_kptmatch:()=>vc,image_lab_to_rgb:()=>gc,image_lens_corr:()=>lc,image_line:()=>ZO,image_linpolar:()=>uc,image_match_descriptor:()=>Fc,image_mean:()=>ic,image_morph:()=>rc,image_percentile:()=>Cc,image_qrcode:()=>hc,image_rect:()=>tc,image_rgb_to_grayscale:()=>Dc,image_rgb_to_lab:()=>Sc,image_save:()=>LO,image_set_pixel:()=>VO,image_threshold:()=>Ac,image_tonew:()=>PO,true_false:()=>AO});var B={};t.r(B),t.d(B,{inout_digital_init:()=>yc,inout_digital_read:()=>bc,inout_digital_write:()=>Yc,inout_highlow:()=>Vc,inout_pin_attachInterrupt:()=>Gc,inout_pin_disirq:()=>xc,inout_pwm_init:()=>kc,inout_pwm_write:()=>Xc});var W={};t.r(W),t.d(W,{iot_checkonenet:()=>tM,iot_create_with_item:()=>Jc,iot_onenet_check:()=>Wc,iot_onenet_connect:()=>wc,iot_onenet_disconnect:()=>Bc,iot_onenet_publish:()=>Qc,iot_onenet_publish_dict:()=>Kc,iot_onenetconnect:()=>Zc,iot_onenetdisconnect:()=>$c,iot_publish:()=>eM,iot_publish_container:()=>jc,iot_publish_item:()=>qc,iot_wifi_connect:()=>Hc,iot_wificonnect:()=>zc});var K={};t.r(K),t.d(K,{base_map:()=>cM,math_arithmetic:()=>oM,math_bit:()=>uM,math_constant:()=>sM,math_constrain:()=>TM,math_indexer_number:()=>mM,math_map:()=>hM,math_max_min:()=>_M,math_max_min1:()=>rM,math_number:()=>nM,math_number_base_conversion:()=>dM,math_random:()=>IM,math_random_seed:()=>OM,math_selfcalcu:()=>pM,math_to_int:()=>lM,math_trig:()=>aM});var Q={};t.r(Q),t.d(Q,{nes_joystick_init:()=>RM,nes_keyboard_init:()=>EM,nes_run:()=>CM});var j={};t.r(j),t.d(j,{network_connect:()=>DM,network_disable_ap:()=>FM,network_disconnect:()=>NM,network_enable_ap:()=>fM,network_ifconfig:()=>LM,network_init:()=>gM,network_scan:()=>SM,network_socket_close:()=>kM,network_socket_connect:()=>VM,network_socket_getaddrinfo:()=>PM,network_socket_init:()=>vM,network_socket_receive:()=>bM,network_socket_send:()=>YM,network_socket_settimeout:()=>yM});var q={};t.r(q),t.d(q,{pins_analog:()=>UM,pins_analog_pin:()=>HM,pins_axis:()=>iR,pins_brightness:()=>nR,pins_builtinimg:()=>zM,pins_button:()=>WM,pins_dac:()=>wM,pins_dac_pin:()=>BM,pins_digital:()=>GM,pins_digital_dot:()=>aR,pins_digital_pin:()=>xM,pins_exlcdh:()=>tR,pins_exlcdv:()=>eR,pins_imglist:()=>ZM,pins_one_more:()=>uR,pins_playlist:()=>$M,pins_pwm:()=>KM,pins_pwm_pin:()=>QM,pins_radio_datarate:()=>pR,pins_radio_power:()=>oR,pins_serial:()=>JM,pins_tone_notes:()=>sR,pins_touch:()=>qM,pins_touch_pin:()=>jM});var J={};t.r(J),t.d(J,{HCSR04:()=>TR,KEY_SELET:()=>_R,sensor_adxl345_get_acceleration:()=>CR,sensor_bmp:()=>OR,sensor_button_init:()=>rR,sensor_button_read:()=>dR,sensor_dht11:()=>IR,sensor_mpu9250_get_acceleration:()=>hR,sensor_mpu9250_get_gyro:()=>RR,sensor_mpu9250_get_magnetic:()=>MR,sensor_mpu9250_temperature:()=>ER,sensor_sht:()=>cR,sensor_use_i2c_init:()=>mR});var z={};t.r(z),t.d(z,{serial_any:()=>fR,serial_print:()=>gR,serial_print_hex:()=>DR,serial_println:()=>SR,serial_read_from_mixgoce:()=>UR,serial_readline:()=>FR,serial_readstr:()=>NR,serial_readstr_until:()=>vR,serial_receive_data_event:()=>LR,serial_send_to_mixgoce:()=>xR,serial_softserial1:()=>PR,system_input:()=>VR,system_print:()=>yR,system_print_container:()=>XR,system_print_end:()=>bR,system_print_inline:()=>YR,system_print_item:()=>GR,system_print_many:()=>kR});var Z={};t.r(Z),t.d(Z,{Panic_with_status_code:()=>WR,TIM_SELET:()=>wR,Timer_init:()=>tE,base_delay:()=>nE,controls_delay:()=>BR,controls_millis:()=>KR,controls_uname:()=>jR,raw_block:()=>QR,system_gc_collect:()=>zR,system_reset:()=>JR,system_ticks_diff:()=>ZR,system_timer:()=>qR,system_timer_init:()=>$R,time_ticks_diff:()=>iE,timer2:()=>eE});var $={};t.r($),t.d($,{LCD_color_seclet:()=>uE,lists_create_with_text1:()=>oE,tuple_create_with_text3:()=>pE});var tt={};t.r(tt),t.d(tt,{PID_get_pid:()=>ME,PID_init:()=>cE,actuator_PAC9685_Servo:()=>rE,actuator_PAC9685_init:()=>_E,actuator_Servo:()=>lE,actuator_Servo_init:()=>aE,actuator_ms32006_dcmotor:()=>mE,actuator_ms32006_init:()=>hE,actuator_ms32006_stepper:()=>OE,actuator_rgb_display:()=>TE,actuator_rgb_init:()=>dE,actuator_rgb_set:()=>IE});var et={};t.r(et),t.d(et,{KPU_analysis:()=>LE,KPU_forward:()=>DE,KPU_init_yolo2:()=>gE,KPU_load:()=>CE,KPU_load1:()=>AE,KPU_run_yolo2:()=>SE,ai_face_info:()=>bE,ai_face_init:()=>yE,ai_face_train:()=>YE,ailocal_loading:()=>PE,ailocal_predict:()=>VE,ailocal_training:()=>vE,aionenet_API:()=>FE,aionenet_nic_init:()=>NE,aionenet_token:()=>fE,tuple_anchor:()=>RE,tuple_calss:()=>EE});var it={};t.r(it),t.d(it,{audio_play:()=>GE,audio_record:()=>xE,mic_init:()=>XE,spk_init:()=>kE,video_play:()=>UE,video_record:()=>HE});var nt={};t.r(nt),t.d(nt,{camera_getinfo:()=>iC,camera_init:()=>WE,camera_reset:()=>KE,camera_run:()=>qE,camera_set_colorbar:()=>eC,camera_set_framesize:()=>jE,camera_set_hmirror:()=>$E,camera_set_pixformat:()=>QE,camera_set_vflip:()=>tC,camera_set_windowing:()=>sC,camera_setmun:()=>nC,camera_shutdown:()=>ZE,camera_skip_frames:()=>JE,camera_snapshot:()=>zE,mode:()=>wE,size:()=>BE});var st={};t.r(st),t.d(st,{communicate_i2c_available:()=>dC,communicate_i2c_init:()=>pC,communicate_i2c_master_read:()=>rC,communicate_i2c_read:()=>aC,communicate_i2c_scan:()=>_C,communicate_i2c_write:()=>lC,communicate_i2s_init:()=>uC,communicate_ir_recv:()=>oC,communicate_ow_init:()=>AC,communicate_ow_read:()=>DC,communicate_ow_reset:()=>SC,communicate_ow_scan:()=>gC,communicate_ow_select:()=>NC,communicate_ow_write:()=>LC,communicate_spi_buffer:()=>mC,communicate_spi_init:()=>TC,communicate_spi_read:()=>OC,communicate_spi_read_output:()=>cC,communicate_spi_readinto:()=>MC,communicate_spi_readinto_output:()=>RC,communicate_spi_set:()=>hC,communicate_spi_write:()=>EC,communicate_spi_write_readinto:()=>CC,i2c_slave_onreceive:()=>IC});var ot={};t.r(ot),t.d(ot,{angle:()=>fC,lcd_clear:()=>bC,lcd_color:()=>FC,lcd_colour:()=>VC,lcd_display:()=>YC,lcd_draw_string:()=>GC,lcd_init:()=>PC,lcd_mirror:()=>XC,lcd_rotation:()=>kC,lcd_width:()=>yC,on_off:()=>vC,touch_calibrate:()=>UC,touch_info:()=>wC,touch_init:()=>xC,touch_read:()=>HC});var pt={};t.r(pt),t.d(pt,{factory_block:()=>zC,factory_block_notes:()=>eA,factory_block_return:()=>ZC,factory_block_return_with_textarea:()=>tA,factory_block_with_textarea:()=>$C,factory_callMethod_noreturn:()=>qC,factory_callMethod_return:()=>JC,factory_declare:()=>jC,factory_from_import:()=>BC,factory_function_noreturn:()=>KC,factory_function_return:()=>QC,factory_import:()=>WC});var ut={};t.r(ut),t.d(ut,{asrloca_config:()=>nA,asrloca_del:()=>oA,asrloca_init:()=>iA,asrloca_recognize:()=>sA});var at={};t.r(at),t.d(at,{image_Histogram:()=>sg,image_Image:()=>aA,image_Image1:()=>lA,image_RGB:()=>uA,image_apriltag:()=>tg,image_barcode:()=>ZA,image_binary:()=>QA,image_blob:()=>ng,image_cartoon:()=>xA,image_circle:()=>bA,image_clear:()=>MA,image_compress:()=>cA,image_copy:()=>OA,image_dilate:()=>HA,image_draw_arrow:()=>gA,image_draw_circle:()=>DA,image_draw_cross:()=>SA,image_draw_image:()=>fA,image_draw_keypoints:()=>NA,image_draw_line:()=>AA,image_draw_rectangle:()=>LA,image_draw_string:()=>mA,image_draw_string_UTF:()=>hA,image_draw_string_flash:()=>TA,image_erode:()=>UA,image_find_apriltags:()=>zA,image_find_barcodes:()=>qA,image_find_blobs:()=>eg,image_find_circles:()=>PA,image_find_hog:()=>rg,image_find_keypoints:()=>dg,image_find_line_segments:()=>vA,image_find_lines:()=>FA,image_find_qrcodes:()=>JA,image_find_rects:()=>VA,image_flood_fill:()=>wA,image_font_free:()=>dA,image_font_load:()=>IA,image_get_histogram:()=>ig,image_get_pixel:()=>CA,image_get_regression:()=>yA,image_getinfo:()=>_A,image_grayscale_to_rgb:()=>_g,image_histeq:()=>XA,image_invert:()=>WA,image_kptmatch:()=>Tg,image_lab_to_rgb:()=>ug,image_lens_corr:()=>KA,image_line:()=>YA,image_linpolar:()=>BA,image_match_descriptor:()=>Ig,image_mean:()=>GA,image_morph:()=>jA,image_percentile:()=>og,image_qrcode:()=>$A,image_rect:()=>kA,image_rgb_to_grayscale:()=>lg,image_rgb_to_lab:()=>ag,image_save:()=>rA,image_set_pixel:()=>EA,image_threshold:()=>pg,image_tonew:()=>RA,true_false:()=>pA});var lt={};t.r(lt),t.d(lt,{PGA_SELET:()=>hg,inout_adc_Vread:()=>gg,inout_adc_init:()=>Cg,inout_adc_read:()=>Ag,inout_digital_init:()=>Og,inout_digital_read:()=>Mg,inout_digital_write:()=>cg,inout_highlow:()=>mg,inout_pin_attachInterrupt:()=>Sg,inout_pin_disirq:()=>Dg,inout_pwm_init:()=>Rg,inout_pwm_write:()=>Eg});var _t={};t.r(_t),t.d(_t,{iot_onenet_check:()=>vg,iot_onenet_connect:()=>Ng,iot_onenet_disconnect:()=>fg,iot_onenet_publish:()=>Pg,iot_onenet_publish_dict:()=>Fg,iot_wifi_connect:()=>Lg});var rt={};t.r(rt),t.d(rt,{base_map:()=>qg,math_arithmetic:()=>bg,math_bit:()=>Yg,math_constant:()=>yg,math_constrain:()=>Wg,math_indexer_number:()=>jg,math_map:()=>Bg,math_max_min:()=>Ug,math_max_min1:()=>Hg,math_number:()=>Vg,math_number_base_conversion:()=>Kg,math_random:()=>wg,math_random_seed:()=>Qg,math_selfcalcu:()=>kg,math_single:()=>Xg,math_to_int:()=>xg,math_trig:()=>Gg});var dt={};t.r(dt),t.d(dt,{nes_joystick_init:()=>Jg,nes_keyboard_init:()=>zg,nes_run:()=>Zg});var It={};t.r(It),t.d(It,{network_connect:()=>eS,network_disable_ap:()=>oS,network_disconnect:()=>nS,network_enable_ap:()=>sS,network_ifconfig:()=>iS,network_init:()=>$g,network_scan:()=>tS,network_server:()=>pS,network_socket_close:()=>IS,network_socket_connect:()=>lS,network_socket_getaddrinfo:()=>aS,network_socket_init:()=>uS,network_socket_receive:()=>rS,network_socket_send:()=>dS,network_socket_settimeout:()=>_S});var Tt={};t.r(Tt),t.d(Tt,{pins_analog:()=>cS,pins_analog_pin:()=>OS,pins_axis:()=>FS,pins_brightness:()=>VS,pins_builtinimg:()=>LS,pins_button:()=>hS,pins_dac:()=>CS,pins_dac_pin:()=>ES,pins_digital:()=>TS,pins_digital_dot:()=>XS,pins_digital_pin:()=>mS,pins_exlcdh:()=>vS,pins_exlcdv:()=>PS,pins_imglist:()=>NS,pins_interrupt:()=>SS,pins_one_more:()=>kS,pins_playlist:()=>fS,pins_pwm:()=>RS,pins_pwm_pin:()=>MS,pins_radio_datarate:()=>bS,pins_radio_power:()=>YS,pins_serial:()=>DS,pins_tone_notes:()=>yS,pins_touch:()=>gS,pins_touch_pin:()=>AS});var ht={};t.r(ht),t.d(ht,{HCSR04:()=>wS,KEY_SELET:()=>GS,sensor_adxl345_get_acceleration:()=>QS,sensor_bmp:()=>eD,sensor_button_init:()=>xS,sensor_button_read:()=>US,sensor_compass_reset:()=>$S,sensor_dht11:()=>HS,sensor_mpu9250_attachGestureInterrupt:()=>BS,sensor_mpu9250_calibrate_compass:()=>JS,sensor_mpu9250_field_strength:()=>ZS,sensor_mpu9250_gesture:()=>WS,sensor_mpu9250_get_acceleration:()=>KS,sensor_mpu9250_get_gyro:()=>qS,sensor_mpu9250_get_magnetic:()=>jS,sensor_mpu9250_temperature:()=>zS,sensor_sht:()=>iD,sensor_use_i2c_init:()=>tD});var mt={};t.r(mt),t.d(mt,{UART_SELET:()=>nD,serial_any:()=>uD,serial_print:()=>sD,serial_print_hex:()=>pD,serial_println:()=>oD,serial_read_from_mixgoce:()=>OD,serial_readline:()=>lD,serial_readstr:()=>aD,serial_send_to_mixgoce:()=>mD,serial_softserial1:()=>_D,system_input:()=>rD,system_print:()=>dD,system_print_end:()=>TD,system_print_inline:()=>ID,system_print_many:()=>hD});var Ot={};t.r(Ot),t.d(Ot,{Panic_with_status_code:()=>fD,TIM_SELET:()=>cD,Timer_init:()=>xD,base_delay:()=>wD,controls_delay:()=>bD,controls_end_program:()=>vD,controls_millis:()=>FD,controls_uname:()=>YD,reset:()=>PD,system_device_name:()=>LD,system_device_serial_number:()=>ND,system_event_bus_source:()=>SD,system_event_bus_value:()=>DD,system_gc_collect:()=>yD,system_on_event:()=>CD,system_raise_event:()=>ED,system_reset:()=>VD,system_run_in_background:()=>MD,system_ticks_diff:()=>XD,system_timer:()=>kD,system_timer_init:()=>GD,system_timestamp:()=>AD,system_value:()=>gD,system_wait:()=>RD,time_ticks_diff:()=>HD,timer2:()=>UD});var ct={};t.r(ct),t.d(ct,{LCD_color_seclet:()=>QD,LCD_color_seclet1:()=>KD,lists_create_with_text1:()=>BD,tuple_create_with_text3:()=>WD});const Mt=Blockly,Rt=Mixly,Et={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(p+=n)):i=p}else i="i";return i}},Ct=Et; /** * @license * Visual Blocks Editor * * Copyright 2012 Google Inc. * https://developers.google.com/blockly/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class At{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Mt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Mt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(bt),this.appendValueInput("FROM").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.PYTHON_RANGE).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},wt={init:function(){this.setColour(bt),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Mt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Mt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Bt={init:function(){this.setColour(bt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Mt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Mt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Mt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Mt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Mt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Mt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Mt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Kt={init:function(){this.setColour(bt);var t=new Mt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Qt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Mt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},jt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Mt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Bt.OPERATORS=[[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const qt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Jt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Mt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(bt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},$t={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Mt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Mt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Mt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:bt,tooltip:Mt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Mt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(bt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},oe={init:function(){this.appendDummyInput().appendField(Mt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Mt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Mt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Mt.FieldDropdown([[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(bt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},pe={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ue={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},le={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET+Mt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Mt.Msg.PROCEDURES_DEFRETURN_RETURN+Mt.Msg.MIXLY_GET_UNIQUE_IDEN)}},_e={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Mt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},re={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},de=230;Mt.FieldTextInput.math_number_validator=function(t){return String(t)},Mt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ie={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Mt.FieldTextInput("0",Mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MATH_NUMBER_TOOLTIP)}},Te={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},he={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},me={init:function(){this.setColour(de),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Oe={init:function(){this.setColour(de),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ce={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Me={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Mt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Mt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Mt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Mt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Mt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Mt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Mt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Mt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Re={init:function(){var t=[[Mt.Msg.MATH_BIN,"bin"],[Mt.Msg.MATH_OCT,"oct"],[Mt.Msg.MATH_HEX,"hex"]];this.setColour(de),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Mt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Mt.Msg.MATH_DEC_TOOLTIP_BIN,oct:Mt.Msg.MATH_DEC_TOOLTIP_OCT,hex:Mt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Ee={init:function(){var t=[[Mt.Msg.LANG_MATH_TO_ROUND,"round"],[Mt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Mt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Mt.Msg.MATH_ABS,"fabs"],[Mt.Msg.MATH_SQRT,"sqrt"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).appendField(new Mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Mt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Mt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Mt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Mt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Mt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Mt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Ce={init:function(){var t=[[Mt.Msg.MIXLY_MAX,"max"],[Mt.Msg.MIXLY_MIN,"min"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(new Mt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Mt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ae={init:function(){var t=[[Mt.Msg.MATH_TWO,"two"],[Mt.Msg.MATH_EIGHT,"eight"],[Mt.Msg.MATH_TEN,"ten"],[Mt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(de),this.appendDummyInput("").appendField(Mt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Mt.FieldDropdown(t),"OP").appendField(Mt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.MATH_ZHW).appendField(new Mt.FieldDropdown(t),"OP2").appendField(Mt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Mt.Msg.MATH_Before_two,eight:Mt.Msg.MATH_Before_eight,ten:Mt.Msg.MATH_Before_ten,sixteen:Mt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Mt.Msg.MATH_Behind_two,eight:Mt.Msg.MATH_Behind_eight,ten:Mt.Msg.MATH_Behind_ten,sixteen:Mt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[Mt.Msg.LANG_MATH_INT,"int"],[Mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(de),this.setOutput(!0,Number),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Mt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Mt.Msg.LANG_MATH_INT,float:Mt.Msg.LANG_MATH_FLOAT_RANDOM};return Mt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Se={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Mt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Mt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Mt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MATH_CONSTRAIN_TOOLTIP)}},De={init:function(){this.setColour(de),this.appendValueInput("NUM",Number).appendField(Mt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Mt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Mt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Le={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Mt.FieldTextInput("0",Mt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Mt.Msg.MATH_NUMBER_TOOLTIP)}},Ne={init:function(){this.setColour(de),this.appendValueInput("NUM").setCheck(Number).appendField(Mt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},fe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Mt.Msg.MATH_ROUND).appendField(Mt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Mt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MATH_ROUND_NEW_TOOLTIP)}},Fe={init:function(){var t=[[Mt.Msg.MIXLY_TO_INT,"int"],[Mt.Msg.MIXLY_TO_FLOAT,"float"],[Mt.Msg.MIXLY_TO_BITES,"b"],[Mt.Msg.LANG_MATH_BYTE+Mt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Mt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ve={init:function(){var t=[[Mt.Msg.MIXLY_TO_INT,"int"],[Mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Mt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Mt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Pe=De,Ve={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Mt.Msg.LANG_MATH_BYTE+Mt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ye={init:function(){this.setColour(de),this.itemCount_=1,this.setMutator(new Mt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Mt.Msg.MIXLY_PRODUCT+Mt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Mt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Mt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Mt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const xe={init:function(){this.setColour(ke),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Mt.FieldTextInput("",Mt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Mt.FieldImage(e,7,12,'"')}},Ue={init:function(){this.setColour(ke),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Mt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},He={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(Number).appendField(Mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},we={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(String).appendField(Mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Be={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},We={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ke={init:function(){this.WHERE_OPTIONS=[[Mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Mt.Msg.TEXT_GET_INDEX_RANDOM+1+Mt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Mt.Msg.LISTS_GET_INDEX_GET,"MODE"),Mt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Mt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Mt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Mt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Mt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Mt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Mt.Msg.TEXT_GET_INDEX_RANDOM};return Mt.Msg.PROCEDURES_DEFRETURN_RETURN+Mt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Mt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Mt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Mt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Mt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Qe={init:function(){this.setHelpUrl(Mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Mt.Msg.LISTS_GET_INDEX_GET+" "+Mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Mt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Mt.Msg.PROCEDURES_DEFRETURN_RETURN+Mt.Msg.MIXLY_MICROBIT_TYPE_STRING+Mt.Msg.LISTS_GET_INDEX_FROM_START+"n"+Mt.Msg.TEXT_CHARAT2)}},je={init:function(){this.setHelpUrl(Mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},qe={init:function(){this.WHERE_OPTIONS_1=[[Mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Mt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Mt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Mt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Mt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Mt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Mt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Mt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Je={init:function(){this.setHelpUrl(Mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Mt.Msg.LISTS_GET_INDEX_GET+" "+Mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Mt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Mt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ze={init:function(){var t=[[Mt.Msg.MIXLY_EQUALS,"==="],[Mt.Msg.MIXLY_STARTSWITH,"startswith"],[Mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ke),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ze={init:function(){this.setColour(ke),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Mt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_COMPARETO_HELP)}},$e={init:function(){var t=[[Mt.Msg.TEXT_UPPER,"upper"],[Mt.Msg.TEXT_TITLE,"title"],[Mt.Msg.TEXT_CAPITALIZE,"capitalize"],[Mt.Msg.TEXT_SWAPCASE,"swapcase"],[Mt.Msg.TEXT_LOWER,"lower"]];this.setColour(ke),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Mt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Mt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Mt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Mt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Mt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Mt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ti={init:function(){var t=[[Mt.Msg.TEXT_LJUST,"ljust"],[Mt.Msg.TEXT_CENTER,"center"],[Mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(ke),this.appendValueInput("VAR").appendField(new Mt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Mt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Mt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ei={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Mt.Msg.MIXLY_MID+Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Mt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Mt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Mt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(ke),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Mt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Mt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},oi={init:function(){var t=[[Mt.Msg.TEXT_TRIM_BOTH,"strip"],[Mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ke),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Mt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Mt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Mt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Mt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Mt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},pi={init:function(){this.setColour(ke),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Mt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Mt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},on={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_KEYS),this.setTooltip(Mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},pn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Mt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Mt.Msg.DICTS_GET_TOOLTIP)}},un={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Mt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Mt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Mt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Mt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Mt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Mt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Mt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_DELETE_TOOLTIP)}},_n={init:function(){this.setColour(tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(Mt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Mt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MID),this.setTooltip(Mt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_CLEAR),this.setTooltip(Mt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_ITEMS),this.setTooltip(Mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_VALUES),this.setTooltip(Mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_LENGTH),this.setTooltip(Mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},hn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_DELDICT),this.setTooltip(Mt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mn={init:function(){this.MODE=[[Mt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Mt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Mt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Mt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Mt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Mt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Mt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},On={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Mt.Msg.DICTS_ADD_VALUE),this.setTooltip(Mt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Mt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Mt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Mn={init:function(){this.setColour(tn),this.appendDummyInput("").appendField(new Mt.FieldLabel(Mt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Mt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Rn={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},En={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_TO_JSON),this.setTooltip(Mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},An={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_TO_JSON),this.setTooltip(Mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn=210,Dn={init:function(){var t=Mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Mt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Mt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Mt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Mt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Mt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Mt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Ln={init:function(){var t=Mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Mt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Nn={init:function(){var t=[[Mt.Msg.LOGIC_OPERATION_AND,"AND"],[Mt.Msg.LOGIC_OPERATION_OR,"OR"],[Mt.Msg.LOGIC_OPERATION_NOR,"NOR"],[Mt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Mt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Mt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Mt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Mt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},fn={init:function(){this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Mt.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var t=[[Mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Mt.FieldDropdown(t),"BOOL"),this.setTooltip(Mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},vn={init:function(){this.setColour(Sn),this.setOutput(!0),this.appendDummyInput().appendField(Mt.Msg.LOGIC_NULL),this.setTooltip(Mt.Msg.LOGIC_NULL_TOOLTIP)}},Pn={init:function(){this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Mt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Mt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Vn={init:function(){var t=[[Mt.Msg.TEXT_APPEND_TO,"in"],[Mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Mt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Mt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Mt.Msg.IN)}},yn={init:function(){var t=[[Mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Yn={init:function(){this.setColour(Sn),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},bn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Mt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.MIXLY_USE,n=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Mt.Msg.MIXLY_BELONG;return i+{r:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.MIXLY_USE,n=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Mt.Msg.MIXLY_BELONG,p=Mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+p}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Mt.Msg.MIXPY_TEXT_ENCODE).appendField(new Mt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.MIXLY_USE,n=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Mt.Msg.MIXLY_BELONG,p=Mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+p}))}},xn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Mt.Msg.MIXLY_MICROBIT_TYPE_STRING+Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MICROBIT_PYTHON_TYPE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Mt.Msg.HTML_FILE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},$n={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Mt.Msg.MIXLY_ESP32_SET+{mkdir:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Mt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.HTML_FILE,"isfile"],[Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_SETUP+Mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Mt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Mt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},os={init:function(){var t=Mt.Procedures.findLegalName("",this),e=new Mt.FieldTextInput(t,Mt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Mt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Mt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Mt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Mt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Mt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Mt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Mt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Mt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Mt.Events.enable()}},mutationToDom:function(t){var e=Mt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Mt.Msg.MIXLY_AIP_ATTR).setAlign(Mt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$s={init:function(){this.setColour(Qs),this.appendDummyInput().appendField(Mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},to={init:function(){this.setColour(Qs),this.appendDummyInput().appendField(Mt.Msg.HTML_FORM_CONTENT).appendField(new Mt.FieldDropdown([[Mt.Msg.HTML_TEXT,"text"],[Mt.Msg.HTML_EMAIL,"email"],[Mt.Msg.HTML_NUMBER,"number"],[Mt.Msg.HTML_PASSWORD,"password"],[Mt.Msg.HTML_CHECKBOX,"checkbox"],[Mt.Msg.HTML_RADIOBUTTON,"radiobutton"],[Mt.Msg.HTML_BUTTON,"button"],[Mt.Msg.HTML_COLOUR,"colour"],[Mt.Msg.HTML_DATE,"date"],[Mt.Msg.HTML_LOCALTIME,"local time"],[Mt.Msg.HTML_FILE,"file"],[Mt.Msg.HTML_HIDDEN,"hidden"],[Mt.Msg.HTML_IMAGE,"image"],[Mt.Msg.HTML_MONTH,"month"],[Mt.Msg.HTML_RANGE,"range"],[Mt.Msg.HTML_RESET,"reset"],[Mt.Msg.HTML_SEARCH,"search"],[Mt.Msg.HTML_SUBMIT,"submit"],[Mt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Mt.Msg.HTML_TIME,"time"],[Mt.Msg.HTML_URL,"url"],[Mt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Mt.Msg.HTML_NAME).appendField(new Mt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Mt.Msg.HTML_VALUE).appendField(new Mt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Mt.Msg.MIXLY_AIP_ATTR).setAlign(Mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eo={init:function(){this.setColour(Qs),this.appendDummyInput().appendField(new Mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},io={init:function(){this.setColour(Qs),this.appendDummyInput().appendField(new Mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},no={init:function(){this.setColour(Qs),this.appendDummyInput().appendField(Mt.Msg.HTML_TEXT).appendField(new Mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},so=160,oo={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Mt.FieldTable(""),"TEXT")}},po={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Mt.FieldMultilineInput(""),"TEXT")}},uo={init:function(){this.setColour(so),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},ao={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},lo={init:function(){this.setColour(so),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},_o={init:function(){this.setColour(so),this.appendValueInput("VALUE").appendField(Mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ro={init:function(){this.setColour(so),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Mt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Mt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Mt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+l()+"("+t+", "+e+", "+i+")"},Mt.isNumber(n)&&Mt.isNumber(s)&&Mt.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const pa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var p=s+" and "+o;else if("OR"==i)p=s+" or "+o;else if("NOR"==i)p="not("+s+"^"+o+")";else p=s+"^"+o;return[p,n]},ua=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},la=function(t,e){return["None",e.ORDER_ATOMIC]},_a=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},da=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ia=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},ha=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Oa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ca=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ea=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Sa=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Da=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},La=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Na=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},fa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},va=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Pa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Va=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ya=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ka=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Mt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],p=0;p\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},cl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ml=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Rl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},El=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Cl=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Al=function(t,e){return'"},gl=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Sl=function(){return this.getFieldValue("TEXT")+"\n"},Dl=function(t){return t.getFieldValue("TEXT")+"\n"},Ll=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Nl=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},fl=function(){return""},Fl=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},vl=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+"while True:\n"+a.join("")+l.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+l.join("\n")},Yl.scrubNakedValue=function(t){return t+"\n"},Yl.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Yl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Yl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Mt.utils.string.wrap(o,Yl.COMMENT_WRAP-3),n+=Yl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const bl=100,kl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_SERVO).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Xl={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(new Mt.FieldDropdown([["1","1"],["2","2"]]),"op"),this.setOutput(!0)}},Gl={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_ESP32_ON,"1"],[Mt.Msg.MIXLY_ESP32_OFF,"0"],[Mt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},xl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_SETTING).appendField(Mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ul={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Hl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_SETTING).appendField(Mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Mt.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},wl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Bl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Wl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Mt.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_LED_SETBRIGHT)}},Kl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_TONE).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Ql={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_TONE).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},jl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_NOTONE).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ql={init:function(){this.setColour(bl),this.appendValueInput("TICKS").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Jl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},zl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Zl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},$l={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},t_={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},i_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.appendValueInput("PIN").setCheck(Number).appendField(Mt.Msg.MIXLY_PIN),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},n_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.appendValueInput("PIN").setCheck(Number).appendField(Mt.Msg.MIXLY_PIN),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_MIXGO_MUSIC_PLAY_TONE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_PLAYSHOW)}},s_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_RGB_PIN_COUNT)}},o_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_RGB_NUM_R_G_B)}},p_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},u_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_RGB_NUM_R_G_B)}},a_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_RGB_NUM_R_G_B)}},l_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},__=wl,r_=Bl,d_=Wl,I_="#2FAD7A",T_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"}]})}},h_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"}]})}},m_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_MESSAGE0}),this.appendStatementInput("DO").appendField(Mt.CONTROLS_REPEAT_INPUT_DO)}},O_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_ON_CONNECTED_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_ON_CONNECTED_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_ON_CONNECTED_MESSAGE0}),this.appendStatementInput("DO").appendField(Mt.CONTROLS_REPEAT_INPUT_DO)}},c_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNKTIMER_RUN_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNKTIMER_RUN_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNKTIMER_RUN_MESSAGE0})}},M_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_RUN_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_RUN_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_RUN_MESSAGE0})}},R_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_APP_NOTIFY_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_APP_NOTIFY_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_APP_NOTIFY_MESSAGE0,args0:[{check:String,type:"input_value",name:"notification"}]})}},E_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_STOP_TIMERS_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNKTIMER_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_STOP_TIMERS_MESSAGE0,args0:[{check:Number,type:"input_value",name:"timer_num"}]})}},C_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_SET_PROPERTY_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_SET_PROPERTY_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_SET_PROPERTY_MESSAGE0,args0:[{check:String,type:"input_value",name:"attribute_name"},{type:"input_value",name:"attribute_value"}]})}},A_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_EMAIL_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_EMAIL_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_EMAIL_MESSAGE0,args0:[{check:String,type:"input_value",name:"TargetEmail"},{check:String,type:"input_value",name:"subject"},{check:String,type:"input_value",name:"body"}]})}},g_={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_GET_TIMERS_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_GET_TIMERS_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_GET_TIMERS_MESSAGE0})}},S_={init:function(){this.jsonInit({message0:Mt.Msg.MPYTHON_BLYNKTIMER_MESSAGE0,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNKTIMER_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNKTIMER_TOOLTIP,args0:[{check:Number,type:"input_value",name:"Num"},{options:[[Mt.Msg.MIXLY_PYTHON_PERIODIC,"False"],[Mt.Msg.MIXLY_PYTHON_ONE_SHOT,"True"]],type:"field_dropdown",name:"Timer_mode"},{check:Number,type:"input_value",name:"period"}]}),this.appendStatementInput("DO").appendField(Mt.CONTROLS_REPEAT_INPUT_DO)}},D_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_MESSAGE0,args0:[{type:"input_value",name:"sensor_data"},{check:Number,type:"input_value",name:"virtual_pin"}]})}},L_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_APP_DATA_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_APP_DATA_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"},{type:"input_value",name:"virtual_pin_val"}]}),this.appendStatementInput("DO").appendField(Mt.CONTROLS_REPEAT_INPUT_DO)}},N_={init:function(){this.jsonInit({nextStatement:null,previousStatement:null,colour:I_,helpUrl:Mt.Msg.MPYTHON_BLYNK_SETUP_HELPURL,tooltip:Mt.Msg.MPYTHON_BLYNK_SETUP_TOOLTIP,message0:Mt.Msg.MPYTHON_BLYNK_SETUP_MESSAGE0,args0:[{type:"input_dummy"},{check:String,type:"input_value",name:"server"},{check:Number,type:"input_value",name:"port"},{check:String,type:"input_value",name:"auth"}]})}},f_=120,F_={init:function(){this.setColour(f_),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Mt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Mt.FieldDropdown(F_.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},v_={init:function(){this.setColour(f_);var t=new Mt.FieldDropdown(v_.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},P_="5BA5A5",V_={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(P_),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET2).appendField(new Mt.FieldDropdown(V_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Mt.Msg.DISPLAY_IMAGE_LET,n=Mt.Msg.DISPLAY_IMAGE_LET2,s=Mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Mt.Msg.MIXLY_UP,down:Mt.Msg.MIXLY_DOWN,left:Mt.Msg.MIXLY_LEFT,right:Mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Mt.Msg.MIXLY_UP,"shift_up"],[Mt.Msg.MIXLY_DOWN,"shift_down"],[Mt.Msg.MIXLY_LEFT,"shift_left"],[Mt.Msg.MIXLY_RIGHT,"shift_right"]]},y_={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(P_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Mt.FieldDropdown(y_.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Mt.Msg.MIXLY_MICROBIT_image_add,"-":Mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Mt.Msg.MICROBIT_DISPLAY_UNION,"add"],[Mt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Y_={init:function(){this.setColour(P_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Mt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Y_.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Mt.Msg.MIXLY_MICROBIT_IMAGE+{height:Mt.Msg.MIXLY_HEIGHT,width:Mt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Mt.Msg.MIXLY_HEIGHT,"height"],[Mt.Msg.MIXLY_WIDTH,"width"]]},b_={init:function(){this.setColour(P_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RECT).appendField(new Mt.FieldDropdown(b_.STATUS),"OP"),this.jsonInit({message0:Mt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_OLED_RECT)},STATUS:[[Mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},k_={init:function(){this.setColour(P_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Mt.FieldDropdown(k_.STATUS),"OP"),this.jsonInit({message0:Mt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},X_={init:function(){this.setColour(P_),this.appendValueInput("SUB").setCheck("var").appendField(Mt.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET2).appendField(new Mt.FieldDropdown(X_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Mt.Msg.DISPLAY_IMAGE_LET,n=Mt.Msg.DISPLAY_IMAGE_LET2,s=Mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Mt.Msg.MIXLY_UP,down:Mt.Msg.MIXLY_DOWN,left:Mt.Msg.MIXLY_LEFT,right:Mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Mt.Msg.MIXLY_UP,"shift_up"],[Mt.Msg.MIXLY_DOWN,"shift_down"],[Mt.Msg.MIXLY_LEFT,"shift_left"],[Mt.Msg.MIXLY_RIGHT,"shift_right"]]},G_="#569A98",x_={init:function(){this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Mt.inputs.Align.CENTRE).appendField(new Mt.FieldBitmap(x_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},U_={init:function(){this.setColour(G_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Mt.FieldDropdown(U_.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Mt.Msg.MIXLY_MICROBIT_image_add,"-":Mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Mt.Msg.MICROBIT_DISPLAY_UNION,"add"],[Mt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},H_={init:function(){this.setColour(G_),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET2).appendField(new Mt.FieldDropdown(H_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Mt.Msg.DISPLAY_IMAGE_LET,n=Mt.Msg.DISPLAY_IMAGE_LET2,s=Mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Mt.Msg.MIXLY_UP,shift_down:Mt.Msg.MIXLY_DOWN,shift_left:Mt.Msg.MIXLY_LEFT,shift_right:Mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Mt.Msg.MIXLY_UP,"shift_up"],[Mt.Msg.MIXLY_DOWN,"shift_down"],[Mt.Msg.MIXLY_LEFT,"shift_left"],[Mt.Msg.MIXLY_RIGHT,"shift_right"]]},w_={init:function(){this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Mt.inputs.Align.CENTRE).appendField(new Mt.FieldBitmap(w_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},B_={init:function(){this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Mt.inputs.Align.CENTRE).appendField(new Mt.FieldBitmap(B_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},W_={init:function(){this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Mt.inputs.Align.CENTRE).appendField(new Mt.FieldBitmap(W_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},K_={init:function(){this.setColour(G_),this.appendDummyInput().appendField(Mt.Msg.OLED_SET_FONT).appendField(new Mt.FieldDropdown(K_.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Mt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Q_={init:function(){this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Mt.inputs.Align.CENTRE).appendField(new Mt.FieldBitmap(Q_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},j_={init:function(){this.setColour(G_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Mt.FieldDropdown(j_.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Mt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Mt.Msg.CLOCKWISE+"90"+Mt.Msg.blockpy_setheading_degree,"1"],[Mt.Msg.CLOCKWISE+"180"+Mt.Msg.blockpy_setheading_degree,"2"],[Mt.Msg.CLOCKWISE+"270"+Mt.Msg.blockpy_setheading_degree,"3"]]},q_={init:function(){this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Mt.inputs.Align.CENTRE).appendField(new Mt.FieldBitmap(q_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},J_=180,z_={colourOptions:["#f00","#000"],columns:2},Z_={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Mt.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Clear_display)}},$_={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},tr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},er={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(new Mt.FieldDropdown([[Mt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Mt.Msg.MIXLY_ESP32_MONITOR_SCROLL,"scroll"]]),"MODE").appendField(Mt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.OLED_DRAWSTR;return{show:Mt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},ir={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(new Mt.FieldDropdown([[Mt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Mt.Msg.MIXLY_ESP32_MONITOR_SCROLL,"scroll"]]),"MODE").appendField(Mt.Msg.OLED_DRAWSTR),this.appendValueInput("time").setCheck(Number).appendField(Mt.Msg.MIXLY_DELAY),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.OLED_DRAWSTR;return{show:Mt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},nr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_MONITOR_SHOW_STATIC),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_MUSIC_SHOW_STATIC)}},sr={init:function(){this.setColour(J_),this.appendValueInput("PIN",String).setCheck("esp32_image").appendField(Mt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.OLED_BITMAP)}},or={init:function(){this.jsonInit({colour:J_,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Mt.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"],["LEFT_ARROW","LEFT_ARROW"],["RIGHT_ARROW","RIGHT_ARROW"],["DRESS","DRESS"],["TRANSFORMERS","TRANSFORMERS"],["SCISSORS","SCISSORS"],["EXIT","EXIT"],["TREE","TREE"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["PITCHFORK","PITCHFORK"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["COW","COW"],["RABBIT","RABBIT"],["SQUARE_SMALL","SQUARE_SMALL"],["SQUARE","SQUARE"],["DIAMOND_SMALL","DIAMOND_SMALL"],["DIAMOND","DIAMOND"],["CHESSBOARD","CHESSBOARD"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["TRIANGLE","TRIANGLE"],["SNAKE","SNAKE"],["UMBRELLA","UMBRELLA"],["SKULL","SKULL"],["GIRAFFE","GIRAFFE"],["SWORD","SWORD"]],type:"field_dropdown"}]})}},pr={init:function(){this.jsonInit({colour:J_,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Mt.Msg.MIXLY_MICROBIT_Animate_images,args0:[{check:"List",type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Mt.Msg.MIXLY_MICROBIT_Animate_images1)}},ur={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Mt.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},ar={init:function(){this.setColour(J_),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Mt.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Mt.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Mt.Msg.MIXLY_MICROBIT_monitor;return{on:Mt.Msg.MIXLY_MICROBIT_Turn_on_display,off:Mt.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},lr={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Mt.Msg.MIXLY_MICROBIT_Turn_off_display})}},_r={init:function(){this.jsonInit({colour:J_,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Mt.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Display_is_on1)}},rr={init:function(){this.jsonInit({colour:J_,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"],["LEFT_ARROW","LEFT_ARROW"],["RIGHT_ARROW","RIGHT_ARROW"],["DRESS","DRESS"],["TRANSFORMERS","TRANSFORMERS"],["SCISSORS","SCISSORS"],["EXIT","EXIT"],["TREE","TREE"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["PITCHFORK","PITCHFORK"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["COW","COW"],["RABBIT","RABBIT"],["SQUARE_SMALL","SQUARE_SMALL"],["SQUARE","SQUARE"],["DIAMOND_SMALL","DIAMOND_SMALL"],["DIAMOND","DIAMOND"],["CHESSBOARD","CHESSBOARD"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["TRIANGLE","TRIANGLE"],["SNAKE","SNAKE"],["UMBRELLA","UMBRELLA"],["SKULL","SKULL"],["GIRAFFE","GIRAFFE"],["SWORD","SWORD"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Mt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Mt.Msg.MIXLY_MICROBIT_Built_in_image})}},dr={init:function(){this.jsonInit({colour:J_,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{colour:"#000000",type:"field_colour",name:"05"},{colour:"#000000",type:"field_colour",name:"06"},{colour:"#000000",type:"field_colour",name:"07"},{colour:"#000000",type:"field_colour",name:"08"},{colour:"#000000",type:"field_colour",name:"09"},{colour:"#000000",type:"field_colour",name:"0a"},{colour:"#000000",type:"field_colour",name:"0b"},{colour:"#000000",type:"field_colour",name:"0c"},{colour:"#000000",type:"field_colour",name:"0d"},{colour:"#000000",type:"field_colour",name:"0e"},{colour:"#000000",type:"field_colour",name:"0f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{colour:"#000000",type:"field_colour",name:"15"},{colour:"#000000",type:"field_colour",name:"16"},{colour:"#000000",type:"field_colour",name:"17"},{colour:"#000000",type:"field_colour",name:"18"},{colour:"#000000",type:"field_colour",name:"19"},{colour:"#000000",type:"field_colour",name:"1a"},{colour:"#000000",type:"field_colour",name:"1b"},{colour:"#000000",type:"field_colour",name:"1c"},{colour:"#000000",type:"field_colour",name:"1d"},{colour:"#000000",type:"field_colour",name:"1e"},{colour:"#000000",type:"field_colour",name:"1f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{colour:"#000000",type:"field_colour",name:"25"},{colour:"#000000",type:"field_colour",name:"26"},{colour:"#000000",type:"field_colour",name:"27"},{colour:"#000000",type:"field_colour",name:"28"},{colour:"#000000",type:"field_colour",name:"29"},{colour:"#000000",type:"field_colour",name:"2a"},{colour:"#000000",type:"field_colour",name:"2b"},{colour:"#000000",type:"field_colour",name:"2c"},{colour:"#000000",type:"field_colour",name:"2d"},{colour:"#000000",type:"field_colour",name:"2e"},{colour:"#000000",type:"field_colour",name:"2f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{colour:"#000000",type:"field_colour",name:"35"},{colour:"#000000",type:"field_colour",name:"36"},{colour:"#000000",type:"field_colour",name:"37"},{colour:"#000000",type:"field_colour",name:"38"},{colour:"#000000",type:"field_colour",name:"39"},{colour:"#000000",type:"field_colour",name:"3a"},{colour:"#000000",type:"field_colour",name:"3b"},{colour:"#000000",type:"field_colour",name:"3c"},{colour:"#000000",type:"field_colour",name:"3d"},{colour:"#000000",type:"field_colour",name:"3e"},{colour:"#000000",type:"field_colour",name:"3f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"},{colour:"#000000",type:"field_colour",name:"45"},{colour:"#000000",type:"field_colour",name:"46"},{colour:"#000000",type:"field_colour",name:"47"},{colour:"#000000",type:"field_colour",name:"48"},{colour:"#000000",type:"field_colour",name:"49"},{colour:"#000000",type:"field_colour",name:"4a"},{colour:"#000000",type:"field_colour",name:"4b"},{colour:"#000000",type:"field_colour",name:"4c"},{colour:"#000000",type:"field_colour",name:"4d"},{colour:"#000000",type:"field_colour",name:"4e"},{colour:"#000000",type:"field_colour",name:"4f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"50"},{colour:"#000000",type:"field_colour",name:"51"},{colour:"#000000",type:"field_colour",name:"52"},{colour:"#000000",type:"field_colour",name:"53"},{colour:"#000000",type:"field_colour",name:"54"},{colour:"#000000",type:"field_colour",name:"55"},{colour:"#000000",type:"field_colour",name:"56"},{colour:"#000000",type:"field_colour",name:"57"},{colour:"#000000",type:"field_colour",name:"58"},{colour:"#000000",type:"field_colour",name:"59"},{colour:"#000000",type:"field_colour",name:"5a"},{colour:"#000000",type:"field_colour",name:"5b"},{colour:"#000000",type:"field_colour",name:"5c"},{colour:"#000000",type:"field_colour",name:"5d"},{colour:"#000000",type:"field_colour",name:"5e"},{colour:"#000000",type:"field_colour",name:"5f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"60"},{colour:"#000000",type:"field_colour",name:"61"},{colour:"#000000",type:"field_colour",name:"62"},{colour:"#000000",type:"field_colour",name:"63"},{colour:"#000000",type:"field_colour",name:"64"},{colour:"#000000",type:"field_colour",name:"65"},{colour:"#000000",type:"field_colour",name:"66"},{colour:"#000000",type:"field_colour",name:"67"},{colour:"#000000",type:"field_colour",name:"68"},{colour:"#000000",type:"field_colour",name:"69"},{colour:"#000000",type:"field_colour",name:"6a"},{colour:"#000000",type:"field_colour",name:"6b"},{colour:"#000000",type:"field_colour",name:"6c"},{colour:"#000000",type:"field_colour",name:"6d"},{colour:"#000000",type:"field_colour",name:"6e"},{colour:"#000000",type:"field_colour",name:"6f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"70"},{colour:"#000000",type:"field_colour",name:"71"},{colour:"#000000",type:"field_colour",name:"72"},{colour:"#000000",type:"field_colour",name:"73"},{colour:"#000000",type:"field_colour",name:"74"},{colour:"#000000",type:"field_colour",name:"75"},{colour:"#000000",type:"field_colour",name:"76"},{colour:"#000000",type:"field_colour",name:"77"},{colour:"#000000",type:"field_colour",name:"78"},{colour:"#000000",type:"field_colour",name:"79"},{colour:"#000000",type:"field_colour",name:"7a"},{colour:"#000000",type:"field_colour",name:"7b"},{colour:"#000000",type:"field_colour",name:"7c"},{colour:"#000000",type:"field_colour",name:"7d"},{colour:"#000000",type:"field_colour",name:"7e"},{colour:"#000000",type:"field_colour",name:"7f"}],output:"esp32_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Mt.Msg.MIXLY_ESP32_Create_image}),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_Create_image1)}},Ir={init:function(){this.setColour(J_),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Mt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_LET2).appendField(new Mt.FieldDropdown(Ir.OPERATORS),"OP"),this.appendValueInput("val").appendField(Mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Mt.Msg.DISPLAY_IMAGE_LET,n=Mt.Msg.DISPLAY_IMAGE_LET2,s=Mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Mt.Msg.MIXLY_UP,down:Mt.Msg.MIXLY_DOWN,left:Mt.Msg.MIXLY_LEFT,right:Mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Mt.Msg.MIXLY_UP,"up"],[Mt.Msg.MIXLY_DOWN,"down"],[Mt.Msg.MIXLY_LEFT,"left"],[Mt.Msg.MIXLY_RIGHT,"right"]]},Tr={init:function(){this.setColour(J_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Mt.FieldDropdown(Tr.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Mt.Msg.MIXLY_MICROBIT_image_add,"-":Mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Mt.Msg.MICROBIT_DISPLAY_UNION,"+"],[Mt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},hr={init:function(){this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING,"scroll"]]),"MODE"),this.jsonInit({colour:J_,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Mt.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Mt.Msg.OLED_DRAWSTR;return Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+{show:Mt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},mr={init:function(){this.setColour(J_),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Mt.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},Or={init:function(){this.setColour(J_),this.appendValueInput("device").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_SETUP).appendField(Mt.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Mt.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_SETUP+Mt.Msg.MIXLY_DF_LCD+Mt.Msg.MIXLY_LCD_ADDRESS)}},cr={init:function(){this.setColour(J_),this.appendValueInput("row",Number).setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Mt.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},Mr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_ON,"on()"],[Mt.Msg.MIXLY_OFF,"off()"],[Mt.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Mt.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(off)"],[Mt.Msg.MIXLY_LCD_BACKLIGHT,"backlight(on)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Mt.Msg.LISTS_SET_INDEX_SET+Mt.Msg.MIXLY_DF_LCD+{"on()":Mt.Msg.MIXLY_ON,"off()":Mt.Msg.MIXLY_OFF,"clear()":Mt.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Mt.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Mt.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},Rr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendValueInput("row").appendField(Mt.Msg.MIXLY_SETUP+Mt.Msg.LISTS_SET_INDEX_INPUT_TO+"OLED").setCheck(Number),this.appendValueInput("column").appendField("X").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip()}},Er={init:function(){this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendValueInput("Text_line1","String").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.OLEDDISPLAY+Mt.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(J_),this.setTooltip(Mt.Msg.MIXLY_DF_LCD+Mt.Msg.OLEDDISPLAY+Mt.Msg.MIXLY_MICROBIT_TYPE_STRING)}},Cr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Mt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Cr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Mt.Msg.MIXLY_MICROBIT_IMAGE+{height:Mt.Msg.MIXLY_HEIGHT,width:Mt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Mt.Msg.MIXLY_HEIGHT,"height"],[Mt.Msg.MIXLY_WIDTH,"width"]]},Ar={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RECT).appendField(new Mt.FieldDropdown(Ar.STATUS),"OP"),this.jsonInit({message0:Mt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_OLED_RECT)},STATUS:[[Mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},gr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_DISPLAY_DRAW).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_DISPLAY_RLINE,"hline"],[Mt.Msg.MIXLY_DISPLAY_VLINE,"vline"]]),"direction"),this.jsonInit({message0:Mt.Msg.MIXLY_MICROBIT_SHOW_LINE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"length"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_OLED_LINE)}},Sr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.jsonInit({message0:Mt.Msg.MIXLY_MICROBIT_SHOW_LINE_ARBITRARILY,args0:[{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_OLED_LINE_ARBIT)}},Dr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Lr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_MONITOR_GET_SCREEN_IMAGE),this.setInputsInline(!0),this.setOutput(!0,"esp32_image"),this.setTooltip(Mt.Msg.MIXLY_ESP32_MONITOR_GET_SCREEN_IMAGE_TOOLTIP)}},Nr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS)}},fr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BLINK_RATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BLINK_RATE)}},Fr={init:function(){this.setColour(J_),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").appendField(Mt.Msg.LISTS_SET_INDEX_SET+Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS).appendField(new Mt.FieldColour("#f00",null,z_),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_RGB_NUM_R_G_B)}},vr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_OR_ANIMATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.OLED_BITMAP_OR_STRING)}},Pr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_OR_ANIMATION),this.appendValueInput("time").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},yr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("time").setCheck(Number).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Yr={init:function(){this.setColour(J_),this.appendDummyInput("").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_ESP32_ON,"ON"],[Mt.Msg.MIXLY_ESP32_OFF,"OFF"]]),"ONOFF"),this.setOutput(!0,Boolean),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},br={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Mt.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Mt.Msg.MIXLY_LCD_STAT_CLEAR,1:Mt.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Mt.Msg.MIXLY_DF_LCD+i[e]}))}},kr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_SETUP+Mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Mt.FieldDropdown([["TM1650","TM1650"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return Mt.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP+{TM1650:"TM1650"}[e]}))}},Xr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Mt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendDummyInput().appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_ON,"_on"],[Mt.Msg.MIXLY_OFF,"_off"],[Mt.Msg.MIXLY_LCD_STAT_CLEAR,"_clear"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_4digitdisplay_power)}},Gr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Mt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendValueInput("VALUE").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_NUMBER),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},xr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Mt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Mt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendValueInput("NO").appendField(Mt.Msg.MIXLY_4DIGITDISPLAY_NOMBER1),this.appendValueInput("STAT").appendField(Mt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Mt.Msg.MIXLY_4DIGITDISPLAY_DOT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_4digitdisplay_showDot)}},Ur={init:function(){this.setColour(J_),this.setOutput(!0,"Tuple"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_DISPLAY_ANIMATE).appendField(new Mt.FieldDropdown(Ur.ANIMATE),"ANIMATION")},ANIMATE:[["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]]},Hr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Mt.FieldDropdown(Hr.STATUS),"OP"),this.jsonInit({message0:Mt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},wr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_DISPLAY_DRAW+Mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Mt.FieldDropdown(wr.STATUS),"OP"),this.jsonInit({message0:Mt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Mt.Msg.MIXLY_DISPLAY_DRAW+Mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Br={init:function(){this.setColour("#555555"),this.appendDummyInput("").appendField(Mt.Msg.MIXGO_ONBOARDDISPLAY_HELP),this.setInputsInline(!0),this.setTooltip("")}},Wr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.OLED_BITMAP),this.appendValueInput("START_X",Number).appendField(Mt.Msg.OLED_START_X).setCheck(Number),this.appendValueInput("START_Y",Number).appendField(Mt.Msg.OLED_START_Y).setCheck(Number),this.appendValueInput("bitmap_name",String).appendField(Mt.Msg.OLED_BITMAP_NAME),this.appendValueInput("WIDTH",Number).appendField(Mt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("HEIGHT",Number).appendField(Mt.Msg.MIXLY_HEIGHT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.OLED_SHOW_BMP_TOOLTIP)}},Kr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Mt.Msg.OLED),this.appendDummyInput("").appendField(Mt.Msg.OLED_DRAWPIXEL),this.appendValueInput("POS_X").appendField(Mt.Msg.OLED_POSX),this.appendValueInput("POS_Y").appendField(Mt.Msg.OLED_POSY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.OLED_DRAW_PIXE_TOOLTIP)}},Qr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_SETUP+Mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Mt.FieldDropdown([["32x12 Matrix","32x12 Matrix"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},jr={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Mt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.OLED_BITMAP_OR_STRING)}},qr={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendValueInput("data").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jr="#526FC3",zr={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Mt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Mt.Msg.HTML_PASSWORD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},Zr={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"+Mt.Msg.TUPLE_JOIN),this.appendValueInput("CLIENT").setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_CLIENT),this.appendValueInput("SERVER").setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_SERVER),this.appendValueInput("USERNAME").setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_USERNAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_PASSWORD),this.appendValueInput("TOPIC").setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_TOPIC),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_ESP32_ONENET_SUB),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_CONNECT_TOOLTIP)}},$r={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_DISCONNECT_TOOLTIP)}},td={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_CHECK_TOOLTIP)}},ed={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendValueInput("DICT").appendField(Mt.Msg.MIXLY_ESP32_PUBLISH_ONENET),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_IOT_ONENET_PRINT_DATA).appendField(new Mt.FieldCheckbox("TRUE"),"is_print"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_DICT_TOOLTIP)}},id={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET").setAlign(Mt.inputs.Align.RIGHT),this.appendDummyInput().appendField(new Mt.FieldLabel(Mt.Msg.MIXLY_ESP32_PUBLISH_ONENET),"TIP").setAlign(Mt.inputs.Align.RIGHT),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Mt.icons.MutatorIcon(["iot_publish_item"],this)),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("iot_publish_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},od={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},pd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Mt.Msg.MIXLY_EMQX_SERVER).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Mt.Msg.MIXLY_WIFI_USERNAME).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Mt.Msg.MIXLY_IOT_PASSWORD).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Mt.Msg.MIXLY_EMQX_PROJECT).setAlign(Mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ud={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},ad={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Mt.Msg.MIXLY_EMQX_SUBSCRIBE+Mt.Msg.MIXLY_MICROBIT_MSG).appendField(Mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},ld={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_d={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Id={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Td={init:function(){this.setColour(Jr),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},hd={init:function(){this.setColour(Jr),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},md={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Od={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO").appendField(Mt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Mt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},cd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Mt.Msg.MIXLY_EMQX_SERVER).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+Mt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Md={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Mt.Msg.MIXLY_EMQX_SERVER).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rd={init:function(){this.VISITOR_ID=Rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Jr),this.appendDummyInput("").appendField(new Mt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},Ed={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO").appendField(Mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Cd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("HTTP"+Mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Mt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Mt.Msg.MIXLY_REQUESTS_GET).appendField(Mt.Msg.MIXLY_GET_CURRENT_TIME).appendField(Mt.Msg.MIXLY_OPEN_DEBUG).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ad={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("HTTP"+Mt.Msg.MIXLY_Client).appendField(Mt.Msg.MIXLY_GET).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Mt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},gd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MQTT"+Mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Mt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Mt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Mt.Msg.MQTT_Topic).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Mt.Msg.MIXLY_OPEN_DEBUG).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MQTT"+Mt.Msg.MIXLY_Client).appendField(Mt.Msg.MIXLY_GET).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Mt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},Dd=zr,Ld=Zr,Nd=$r,fd=td,Fd=id,vd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Mt.Msg.MIXLY_EMQX_SERVER).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Mt.Msg.MODEL_NAME).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pd=vd,Vd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Mt.Msg.MIXLY_EMQX_SERVER).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Mt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Mt.Msg.MODEL_NAME).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Mt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},bd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("Ollama "+Mt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kd=225,Xd={init:function(){this.appendValueInput("VAL"),this.setColour(kd),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Mt.FieldDropdown(Xd.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Mt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},Gd="#3288dd",xd={init:function(){this.appendValueInput("VAL"),this.setColour(Gd),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Mt.FieldDropdown(xd.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Mt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Mt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},Ud="#A58C5B",Hd={init:function(){this.setColour(Ud),this.appendValueInput("PIN",Number).appendField(new Mt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Hd.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},wd=(Mt.Msg.PS2_TRIANGLE,Mt.Msg.PS2_CIRCLE,Mt.Msg.PS2_CROSS,Mt.Msg.PS2_SQUARE,Mt.Msg.PS2_L1,Mt.Msg.PS2_L2,Mt.Msg.PS2_R1,Mt.Msg.PS2_R2,Mt.Msg.PS2_UP,Mt.Msg.PS2_RIGHT,Mt.Msg.PS2_DOWN,Mt.Msg.PS2_LEFT,Mt.Msg.PS2_SELECT,Mt.Msg.PS2_START,{init:function(){this.setColour(Ud),this.appendDummyInput("").appendField(Mt.Msg.PS2_stick).appendField(new Mt.FieldDropdown(wd.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Mt.Msg.PS2_RX,"0"],[Mt.Msg.PS2_RY,"1"],[Mt.Msg.PS2_LX,"2"],[Mt.Msg.PS2_LY,"3"]]}),Bd={init:function(){this.setColour(Ud),this.appendValueInput("SUB").appendField(Mt.Msg.PS2),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_JOYSTICK).appendField(new Mt.FieldDropdown(Bd.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Mt.Msg.PS2_RX,"RX"],[Mt.Msg.PS2_RY,"RY"],[Mt.Msg.PS2_LX,"LX"],[Mt.Msg.PS2_LY,"LY"]]},Wd=40,Kd={init:function(){this.setColour(Wd),this.appendValueInput("PIN",Number).appendField(new Mt.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Kd.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Mt.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Mt.Msg.MIXLY_DHT11_T_H,"tempandhum"]]},Qd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"pitch",e.ORDER_ATOMIC);return"music.pitch("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+i+")\n"},jd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"pitch",e.ORDER_ATOMIC),n=e.valueToCode(this,"time",e.ORDER_ATOMIC);return"music.pitch_time("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+i+", "+n+")\n"},qd=function(t,e){return e.definitions_.import_music="import music","music.stop("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")\n"},Jd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"BPM",e.ORDER_ASSIGNMENT);return"music.set_tempo("+e.valueToCode(this,"TICKS",e.ORDER_ASSIGNMENT)+", "+i+")\n"},zd=function(t,e){e.definitions_.import_music="import music";return["music.get_tempo()",e.ORDER_ATOMIC]},Zd=function(t,e){return e.definitions_.import_music="import music","music.pitch("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+")\n"},$d=function(t,e){return e.definitions_.import_music="import music","music.pitch_time("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"time",e.ORDER_ATOMIC)+")\n"},tI=function(t,e){e.definitions_.import_music="import music";return"music.stop()\n"},eI=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+")\n"},iI=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN",e.ORDER_ASSIGNMENT)+")\n"},nI=function(t,e){return e.definitions_.import_music="import music",e.definitions_.import_matrix="import matrix","music.play_show("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN",e.ORDER_ASSIGNMENT)+")\n"},sI=function(t,e){return e.definitions_.import_music="import music","music.reset()\n"},oI=function(t,e){return e.definitions_.import_servo="import servo",e.definitions_.import_machine="import machine","servo.servo_write_angle("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"DEGREE",e.ORDER_ATOMIC)+")\n"},pI=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},uI=function(t,e){return[this.getFieldValue("flag"),e.ORDER_ATOMIC]},aI=function(t,e){e.definitions_.import_mixgo="import mixgo";var i=e.valueToCode(this,"bright",e.ORDER_ATOMIC);return"mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").setonoff("+i+")\n"},lI=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").getonoff()",e.ORDER_ATOMIC]},_I=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").setbrightness("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},rI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".setonoff("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},dI=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".getonoff()",e.ORDER_ATOMIC]},II=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".setbrightness("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},TI=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=e.valueToCode(this,"LEDCOUNT",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",i+" = neopixel.NeoPixel(machine.Pin("+n+"), "+s+", timing=True)\n"},hI=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".write()\n"},mI=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"["+e.valueToCode(this,"_LED_",e.ORDER_ATOMIC)+"] = ("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+")\n"},OI=function(t,e){e.definitions_.import_mixgo="import mixgo";return"mixgo.rgb.write()\n"},cI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.rgb["+e.valueToCode(this,"_LED_",e.ORDER_ATOMIC)+"] = ("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+")\n"},MI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.rgb.fill(("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+"))\n"},RI=rI,EI=dI,CI=II,AI=function(t,e){var i=e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC);e.functions_["terminal_widget_vpin_"+i]=`\nALLOWED_COMMANDS_LIST = ['ls', 'lsusb', 'ip a', 'ip abc']\n\n@blynk.handle_event('write V${i}')\ndef write_handler(pin, _values):\n header = ''\n result = ''\n delimiter = '{}\\n'.format('=' * 30)\n if _values and _values[0] in ALLOWED_COMMANDS_LIST:\n cmd_params = _values[0].split(' ')\n try:\n result = subprocess.check_output(cmd_params).decode('utf-8')\n header = '[output]\\n'\n except subprocess.CalledProcessError as exe_err:\n header = '[error]\\n'\n result = 'Return Code: {}\\n'.format(exe_err.returncode)\n except Exception as g_err:\n print("Command caused '{}'".format(g_err))\n elif _values and _values[0] == 'help':\n header = '[help -> allowed commands]\\n'\n result = '{}\\n'.format('\\n'.join(ALLOWED_COMMANDS_LIST))\n\n # communicate with terminal if help or some allowed command\n if result:\n output = '{}{}{}{}'.format(header, delimiter, result, delimiter)\n print(output)\n blynk.virtual_write(pin, output)\n blynk.virtual_write(pin, '\\n')\n`;return""},gI=function(t,e){return"blynk.virtual_sync("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+")\n"},SI=function(t,e){var i=e.statementToCode(this,"DO");return i=e.addLoopTrap(i,this.id)||e.PASS,e.definitions_.blynk_on_disconnected="@blynk.handle_event(\"disconnect\")\ndef connect_handler():\n print('Blynk disconnected')\n"+i,""},DI=function(t,e){var i=e.statementToCode(this,"DO");return i=e.addLoopTrap(i,this.id)||e.PASS,e.definitions_.blynk_on_connected="@blynk.handle_event(\"connect\")\ndef connect_handler():\n print('Blynk connected')\n"+i,""},LI=function(){return"blynk_timer.run()\n"},NI=function(){return"blynk.run()\n"},fI=function(t,e){return"blynk.notify("+e.valueToCode(this,"notification",e.ORDER_ATOMIC)+")\n"},FI=function(t,e){e.definitions_.import_blynktimer="import blynktimer",e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)";var i=e.valueToCode(this,"timer_num",e.ORDER_ATOMIC);return`blynk_timer.stop('${i}_blynk_timer${i}')\n`},vI=function(t,e){e.definitions_.import_blynktimer="import blynktimer",e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)";return["blynk_timer.get_timers()",e.ORDER_ATOMIC]},PI=function(t,e){e.definitions_.import_blynktimer="import blynktimer";var i=e.valueToCode(this,"Num",e.ORDER_ATOMIC),n=e.valueToCode(this,"period",e.ORDER_ATOMIC),s=this.getFieldValue("Timer_mode"),o=e.statementToCode(this,"DO");return o=e.addLoopTrap(o,this.id)||e.PASS,e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)",e.definitions_["blynktimer_event"+i]=`\n@blynk_timer.register(interval=${n}, run_once=${s})\ndef blynk_timer${i}():\n`+o,""},VI=function(t,e){var i=e.valueToCode(this,"sensor_data",e.ORDER_ATOMIC);return"blynk.virtual_write("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+", "+i+")\n"},yI=function(t,e){var i=e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC),n=e.statementToCode(this,"DO");return n=e.addLoopTrap(n,this.id)||e.PASS,e.definitions_["blynk_VIRTUAL_WRITE_"+i]="@blynk.handle_event('write V"+i+"')\ndef write_virtual_pin_handler(pin, _value):\n for i in range(0, len(_value)):\n try: _value[i] = eval(_value[i])\n except: pass\n if len(_value) == 1: _value = _value[0]\n"+n,""},YI=function(t,e){var i=e.valueToCode(this,"body",e.ORDER_ATOMIC),n=e.valueToCode(this,"subject",e.ORDER_ATOMIC);return`blynk.email(${e.valueToCode(this,"TargetEmail",e.ORDER_ATOMIC)}, ${n}, ${i})\n`},bI=function(t,e){var i=e.valueToCode(this,"attribute_value",e.ORDER_ATOMIC);return`blynk.set_property(pin, ${e.valueToCode(this,"attribute_name",e.ORDER_ATOMIC)}, ${i})\n`},kI=function(t,e){e.definitions_.import_BlynkLib="import blynklib";var i=e.valueToCode(this,"server",e.ORDER_ATOMIC),n=e.valueToCode(this,"auth",e.ORDER_ATOMIC),s=e.valueToCode(this,"port",e.ORDER_ATOMIC);return e.definitions_.mpython_blynk_setup="blynk = blynklib.Blynk("+n+", server="+i+", port="+s+")",e.definitions_.blynk_on_connected="\n@blynk.handle_event(\"connect\")\ndef connect_handler():\n print('Blynk connected')\n",e.definitions_.blynk_on_disconnected="\n@blynk.handle_event(\"disconnect\")\ndef connect_handler():\n print('Blynk disconnected')\n",""};const XI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},GI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},xI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.showstatic("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},UI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},HI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},wI=function(t,e){e.definitions_.import_matrix="import matrix";var i={"#000000":"0","#ff0000":"1"};return['matrix.Image("'+i[t.getFieldValue("00")]+i[t.getFieldValue("01")]+i[t.getFieldValue("02")]+i[t.getFieldValue("03")]+i[t.getFieldValue("04")]+i[t.getFieldValue("05")]+i[t.getFieldValue("06")]+i[t.getFieldValue("07")]+i[t.getFieldValue("08")]+i[t.getFieldValue("09")]+i[t.getFieldValue("0a")]+i[t.getFieldValue("0b")]+i[t.getFieldValue("0c")]+i[t.getFieldValue("0d")]+i[t.getFieldValue("0e")]+i[t.getFieldValue("0f")]+":"+i[t.getFieldValue("10")]+i[t.getFieldValue("11")]+i[t.getFieldValue("12")]+i[t.getFieldValue("13")]+i[t.getFieldValue("14")]+i[t.getFieldValue("15")]+i[t.getFieldValue("16")]+i[t.getFieldValue("17")]+i[t.getFieldValue("18")]+i[t.getFieldValue("19")]+i[t.getFieldValue("1a")]+i[t.getFieldValue("1b")]+i[t.getFieldValue("1c")]+i[t.getFieldValue("1d")]+i[t.getFieldValue("1e")]+i[t.getFieldValue("1f")]+":"+i[t.getFieldValue("20")]+i[t.getFieldValue("21")]+i[t.getFieldValue("22")]+i[t.getFieldValue("23")]+i[t.getFieldValue("24")]+i[t.getFieldValue("25")]+i[t.getFieldValue("26")]+i[t.getFieldValue("27")]+i[t.getFieldValue("28")]+i[t.getFieldValue("29")]+i[t.getFieldValue("2a")]+i[t.getFieldValue("2b")]+i[t.getFieldValue("2c")]+i[t.getFieldValue("2d")]+i[t.getFieldValue("2e")]+i[t.getFieldValue("2f")]+":"+i[t.getFieldValue("30")]+i[t.getFieldValue("31")]+i[t.getFieldValue("32")]+i[t.getFieldValue("33")]+i[t.getFieldValue("34")]+i[t.getFieldValue("35")]+i[t.getFieldValue("36")]+i[t.getFieldValue("37")]+i[t.getFieldValue("38")]+i[t.getFieldValue("39")]+i[t.getFieldValue("3a")]+i[t.getFieldValue("3b")]+i[t.getFieldValue("3c")]+i[t.getFieldValue("3d")]+i[t.getFieldValue("3e")]+i[t.getFieldValue("3f")]+":"+i[t.getFieldValue("40")]+i[t.getFieldValue("41")]+i[t.getFieldValue("42")]+i[t.getFieldValue("43")]+i[t.getFieldValue("44")]+i[t.getFieldValue("45")]+i[t.getFieldValue("46")]+i[t.getFieldValue("47")]+i[t.getFieldValue("48")]+i[t.getFieldValue("49")]+i[t.getFieldValue("4a")]+i[t.getFieldValue("4b")]+i[t.getFieldValue("4c")]+i[t.getFieldValue("4d")]+i[t.getFieldValue("4e")]+i[t.getFieldValue("4f")]+":"+i[t.getFieldValue("50")]+i[t.getFieldValue("51")]+i[t.getFieldValue("52")]+i[t.getFieldValue("53")]+i[t.getFieldValue("54")]+i[t.getFieldValue("55")]+i[t.getFieldValue("56")]+i[t.getFieldValue("57")]+i[t.getFieldValue("58")]+i[t.getFieldValue("59")]+i[t.getFieldValue("5a")]+i[t.getFieldValue("5b")]+i[t.getFieldValue("5c")]+i[t.getFieldValue("5d")]+i[t.getFieldValue("5e")]+i[t.getFieldValue("5f")]+":"+i[t.getFieldValue("60")]+i[t.getFieldValue("61")]+i[t.getFieldValue("62")]+i[t.getFieldValue("63")]+i[t.getFieldValue("64")]+i[t.getFieldValue("65")]+i[t.getFieldValue("66")]+i[t.getFieldValue("67")]+i[t.getFieldValue("68")]+i[t.getFieldValue("69")]+i[t.getFieldValue("6a")]+i[t.getFieldValue("6b")]+i[t.getFieldValue("6c")]+i[t.getFieldValue("6d")]+i[t.getFieldValue("6e")]+i[t.getFieldValue("6f")]+":"+i[t.getFieldValue("70")]+i[t.getFieldValue("71")]+i[t.getFieldValue("72")]+i[t.getFieldValue("73")]+i[t.getFieldValue("74")]+i[t.getFieldValue("75")]+i[t.getFieldValue("76")]+i[t.getFieldValue("77")]+i[t.getFieldValue("78")]+i[t.getFieldValue("79")]+i[t.getFieldValue("7a")]+i[t.getFieldValue("7b")]+i[t.getFieldValue("7c")]+i[t.getFieldValue("7d")]+i[t.getFieldValue("7e")]+i[t.getFieldValue("7f")]+'")',e.ORDER_ATOMIC]},BI=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.Image."+t.getFieldValue("image"),e.ORDER_ATOMIC]},WI=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.get_pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},KI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},QI=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_brightness()",e.ORDER_ATOMIC]},jI=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_screenimage()",e.ORDER_ATOMIC]},qI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},JI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.blink_rate("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},zI=function(t,e){e.definitions_.import_matrix="import matrix";return"matrix.clear()\n"},ZI=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},$I=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},tT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},eT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),p=e.valueToCode(this,"height",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP"),l="";switch(u){case"True":l=i+".show_fill_rect("+n+", "+s+", "+o+", "+p+", "+a+")\n";break;case"False":l=i+".show_rect("+n+", "+s+", "+o+", "+p+", "+a+")\n"}return l},iT=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP"),n=e.valueToCode(t,"A",e.ORDER_ATOMIC),s=e.valueToCode(t,"B",e.ORDER_ATOMIC);return["INTERSECTION"==i?n+"-("+n+"-"+s+")":n+i+s,e.ORDER_ATOMIC]},nT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},sT=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},oT=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pT=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},uT=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},aT=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+this.getFieldValue("STAT")+"()\n"},lT=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+"_show_num("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},_T=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+"_show_dot("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},rT=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},dT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",u=this.getFieldValue("OP"),a="";switch(p){case"True":a=i+".show_fill_circle("+n+", "+s+", "+o+", "+u+")\n";break;case"False":a=i+".show_circle("+n+", "+s+", "+o+", "+u+")\n"}return a},IT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),p=e.valueToCode(this,"y1",e.ORDER_ATOMIC),u=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),l="TRUE"==this.getFieldValue("fill")?"True":"False",_=this.getFieldValue("OP"),r="";switch(l){case"True":r=i+".show_fill_triangle("+n+", "+s+", "+o+", "+p+", "+u+", "+a+", "+_+")\n";break;case"False":r=i+".show_triangle("+n+", "+s+", "+o+", "+p+", "+u+", "+a+", "+_+")\n"}return r},TT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},hT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},mT=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=n+" = matrix32x12.Matrix("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},OT=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_matrix32x12="import matrix32x12",i+".set_buffer("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},cT=function(t,e){return e.definitions_.import_matrix32x12="import matrix32x12",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},MT=function(t,e){return e.definitions_.import_mixiot="import mixiot","mixiot.wlan_connect("+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},RT=function(t,e){return e.definitions_.import_onenet="import onenet",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = onenet.init_MQTT_client("+e.valueToCode(this,"CLIENT",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", "+(e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)||"None")+")\n"},ET=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".do_disconnect()\n"},CT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"DICT",e.ORDER_ATOMIC),s="TRUE"==this.getFieldValue("is_print")?"True":"False";return e.definitions_.import_onenet="import onenet",i+".publish("+n+", is_print="+s+")\n"},AT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".check_msg()\n"},gT=function(t,e){e.definitions_.import_onenet="import onenet";var i=new Array(this.itemCount_),n=new Array(this.itemCount_),s=new Array(this.itemCount_),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);for(let t=0;te?t[e]:"ni-hao"),"KEY"+e).appendField("”:")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},RO={init:function(){this.setColour(OO),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("启动识别 返回结果"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("语音识别,获取识别结果")}},EO={init:function(){this.setColour(OO),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("注销识别 内存释放"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("语音识别,注销语音识别,释放内存")}},CO="#90A244",AO={init:function(){this.setColour(CO),this.appendDummyInput("").appendField(new Mt.FieldDropdown([["否","0"],["是","1"]]),"flag"),this.setOutput(!0),this.setTooltip()}},gO={init:function(){this.setColour(CO),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("path").appendField("打开路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("打开一个新的图像对象")}},SO={init:function(){this.setColour(CO),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField("打开空图"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开一个空的图像对象")}},DO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像信息"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["宽度","width"],["高度","height"],["格式","format"],["大小","size"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取图像的宽度、高度、格式、大小")}},LO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像保存"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("path").setAlign(Mt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("图像的副本保存到文件系统")}},NO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像截取"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("复制一个图像图像的副本")}},fO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("RGB"),this.appendDummyInput().appendField("["),this.appendValueInput("R").setCheck(Number),this.appendValueInput("G").appendField(",").setCheck(Number),this.appendValueInput("B").appendField(",").setCheck(Number),this.appendDummyInput().appendField("]"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("对图像进行适当压缩")}},FO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像压缩"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("quality").setAlign(Mt.inputs.Align.RIGHT).appendField("压缩率").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("对图像进行适当压缩")}},vO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像清除"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将图像中的所有像素设置为零")}},PO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像转换"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendDummyInput().appendField("转换为").appendField(new Mt.FieldDropdown([["灰度图","to_grayscale"],["彩色图","to_rgb565"],["彩虹图","to_rainbow"],["AI格式","pix_to_ai"],["字节块","to_bytes"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("将图像转换为灰度图、彩色图、彩虹图像")}},VO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("修改点颜色"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("设置图像某点像素值")}},yO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("获取点颜色"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xy"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("获取图像某点像素值")}},YO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("字库加载"),this.appendValueInput("path").setAlign(Mt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从SD中加载需要显示文字的字库")}},bO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("字库释放"),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("释放字库所占的内存")}},kO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制文本(中)"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Mt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Mt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Mt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Mt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.appendValueInput("x_spacing").setAlign(Mt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个文本")}},XO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制文本"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Mt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Mt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Mt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Mt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.appendValueInput("x_spacing").setAlign(Mt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个中文文本")}},GO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制文本(英)"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Mt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Mt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Mt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Mt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个字符文本")}},xO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制直线"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xyxy"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Mt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一条从(x0,y0)到(x1,y1)的线")}},UO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制箭头"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xyxy"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Mt.inputs.Align.RIGHT).appendField("大小").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个箭头")}},HO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制十字"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("延伸").setCheck(Number),this.appendValueInput("thi").setAlign(Mt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个十字")}},wO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制圆形"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xyr"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Mt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Mt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个圆形")}},BO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制矩形"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xywh"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Mt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Mt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个矩形")}},WO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制特征点"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("keypoints").setAlign(Mt.inputs.Align.RIGHT).appendField("对象"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("大小").setCheck(Number),this.appendValueInput("thi").setAlign(Mt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Mt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setTooltip("绘制一个特征点对象的各个点")}},KO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("绘制图像"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("x_scale").setAlign(Mt.inputs.Align.RIGHT).appendField("x缩放").setCheck(Number),this.appendValueInput("y_scale").setAlign(Mt.inputs.Align.RIGHT).appendField("y缩放").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("绘制一个image图像")}},QO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("直线识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("theta_margin").setAlign(Mt.inputs.Align.RIGHT).appendField("合并角度").setCheck(Number),this.appendValueInput("rho_margin").setAlign(Mt.inputs.Align.RIGHT).appendField("合并斜率").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别直线,返回image.line对象列表")}},jO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("线段识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("distance").setAlign(Mt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.appendValueInput("difference").setAlign(Mt.inputs.Align.RIGHT).appendField("合并角度").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别线段,返回image.line对象列表")}},qO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("圆形识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("r_min").setAlign(Mt.inputs.Align.RIGHT).appendField("最小r").setCheck(Number),this.appendValueInput("r_max").setAlign(Mt.inputs.Align.RIGHT).appendField("最大r").setCheck(Number),this.appendValueInput("r_step").setAlign(Mt.inputs.Align.RIGHT).appendField("步长r").setCheck(Number),this.appendValueInput("x_margin").setAlign(Mt.inputs.Align.RIGHT).appendField("合并x值").setCheck(Number),this.appendValueInput("y_margin").setAlign(Mt.inputs.Align.RIGHT).appendField("合并y值").setCheck(Number),this.appendValueInput("r_margin").setAlign(Mt.inputs.Align.RIGHT).appendField("合并r值").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[circle]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别圆形,返回image.cirle对象列表")}},JO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("矩形识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[rect]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用四元检测识别矩形,返回image.rect对象列表")}},zO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("线性回归"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("invert").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值反转"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("robust").setAlign(Mt.inputs.Align.RIGHT).appendField("泰尔指数").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("计算线性回归,返回image.line对象列表")}},ZO={init:function(){this.setColour(CO),this.appendDummyInput().appendField("直线解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","line"],["x1分量","x1"],["y1分量","y1"],["x2分量","x2"],["y2分量","y2"],["长度","length"],["角度","theta"],["斜率","rho"],["模","magnitude"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.line列表,获取直线信息")}},$O={init:function(){this.setColour(CO),this.appendDummyInput().appendField("圆形解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xyr","circle"],["x分量","x"],["y分量","y"],["r分量","r"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.circle列表,获取圆形信息")}},tc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("矩形解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.rect列表,获取矩形信息")}},ec={init:function(){this.setColour(CO),this.appendDummyInput().appendField("直方图均衡"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("key").setAlign(Mt.inputs.Align.RIGHT).appendField("自适应"),this.appendValueInput("limit").setAlign(Mt.inputs.Align.RIGHT).appendField("对比度").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单直方图均衡化")}},ic={init:function(){this.setColour(CO),this.appendDummyInput().appendField("模糊滤波"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("key").setAlign(Mt.inputs.Align.RIGHT).appendField("自适应"),this.appendValueInput("offset").setAlign(Mt.inputs.Align.RIGHT).appendField("补偿").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单模糊滤波")}},nc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("卡通化滤波"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("seed").setAlign(Mt.inputs.Align.RIGHT).appendField("原始差异").setCheck(Number),this.appendValueInput("float").setAlign(Mt.inputs.Align.RIGHT).appendField("相邻差异").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单卡通滤波器")}},sc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像腐蚀"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setTooltip("图像腐蚀,从分割区域的边缘删除像素(白色目标区域)")}},oc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像膨胀"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setTooltip("图像膨胀,将像素添加到分割区域的边缘中(白色目标区域)")}},pc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像填充"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("开始坐标"),this.appendValueInput("color").setAlign(Mt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("seed").setAlign(Mt.inputs.Align.RIGHT).appendField("原始差异").setCheck(Number),this.appendValueInput("float").setAlign(Mt.inputs.Align.RIGHT).appendField("相邻差异").setCheck(Number),this.appendValueInput("invert").setAlign(Mt.inputs.Align.RIGHT).appendField("反转"),this.appendValueInput("clear").setAlign(Mt.inputs.Align.RIGHT).appendField("清除"),this.setOutput(!0),this.setTooltip("像洪水一样填充图像中低矮凹陷的地方(洪水填充)")}},uc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像投影"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("key").setAlign(Mt.inputs.Align.RIGHT).appendField("垂直投影"),this.setOutput(!0),this.setTooltip("图像从笛卡尔坐标到线性极坐标重新投影")}},ac={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像反转"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("翻转图像中的所有像素值")}},lc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("校正缩放"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendValueInput("strength").appendField("校正值").setCheck(Number),this.appendValueInput("zoom").appendField("缩放值").setCheck(Number),this.setOutput(!0),this.setTooltip("翻转图像中的所有像素值")}},_c={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像二值化"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("invert").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值反转"),this.appendValueInput("zero").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值像素为零"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("根据像素是否在阈值列表 thresholds 中的阈值内,将图像中的所有像素设置为黑色或白色。")}},rc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("图像边缘检测"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("kernel").setAlign(Mt.inputs.Align.RIGHT).appendField("内核"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("通过过滤器内核对图像进行卷积。")}},dc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("条形码识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[barcode]"),this.setOutput(!0),this.setInputsInline(!1),this.setOutput(!0),this.setTooltip("使用条形码识别,返回image.barcode对象列表")}},Ic={init:function(){this.setColour(CO),this.appendDummyInput().appendField("二维码识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[qrcode]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用二维码识别,返回image.line对象列表")}},Tc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("AprilTag识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[apriltag]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用image.TAG36H11识别,返回image.apriltag对象列表")}},hc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("二维码解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["内容","payload"],["版本","version"],["掩码","mask"],["类型","data_type"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.qrcode列表,获取二维码信息")}},mc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("条形码解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["内容","payload"],["类型","type"],["角度","rotation"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},Oc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("AprilTag解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["号码","id"],["家族","family"],["弧度","rotation"],["x向距离","x_translation"],["y向距离","y_translation"],["z向距离","z_translation"],["x向弧度","x_rotation"],["y向弧度","y_rotation"],["z向弧度","z_rotation"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.apriltag列表,获取Apriltag信息")}},cc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("色块追踪"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Mt.inputs.Align.RIGHT).appendField("阈值LAB"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("area").setAlign(Mt.inputs.Align.RIGHT).appendField("滤掉区域").setCheck(Number),this.appendValueInput("pixel").setAlign(Mt.inputs.Align.RIGHT).appendField("滤掉素数").setCheck(Number),this.appendValueInput("margin").setAlign(Mt.inputs.Align.RIGHT).appendField("合并").setCheck(Number),this.appendValueInput("key").setAlign(Mt.inputs.Align.RIGHT).appendField("重叠"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[blob]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用色块追踪,返回image.blob对象列表")}},Mc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("颜色识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[histogram]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用直方图识别颜色,返回image.histogram对象列表")}},Rc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("追踪解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["像素量","pixels"],["弧度","rotation"],["号码数","code"],["合并量","count"],["面积","area"],["密度比","density"]]),"key"),this.setOutput(!0),this.setTooltip("通过image.blob列表,获取追踪色块信息")}},Ec={init:function(){this.setColour(CO),this.appendDummyInput().appendField("色阈浮点"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["灰度图浮点列表","bins"],["LAB的L浮点列表","l_bins"],["LAB的A浮点列表","a_bins"],["LAB的B浮点列表","b_bins"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},Cc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("颜色解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendValueInput("percentile").appendField("CDF").setCheck(Number),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["灰度图值","value"],["LAB的L值","l_value"],["LAB的A值","a_value"],["LAB的B值","b_value"]]),"key"),this.setOutput(!0),this.setTooltip("通过histogram列表,获取识别颜色信息")}},Ac={init:function(){this.setColour(CO),this.appendDummyInput().appendField("色阈解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["灰度图值","value"],["LAB的L值","l_value"],["LAB的A值","a_value"],["LAB的B值","b_value"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},gc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("RGB888值"),this.appendValueInput("LIST").appendField("由LAB"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("LAB转RGB888")}},Sc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("LAB值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转LAB")}},Dc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("灰度值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转灰度图")}},Lc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("RGB888"),this.appendValueInput("g_value").appendField("由灰度值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("灰度图转RGB888")}},Nc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("定向梯度图"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("size").setAlign(Mt.inputs.Align.RIGHT).appendField("线长").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("用HOG(定向梯度直方图)线替换ROI中的像素,仅支持灰度图像")}},fc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("特征识别"),this.appendValueInput("VAR").setAlign(Mt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Mt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("max_keypoints").setAlign(Mt.inputs.Align.RIGHT).appendField("关键点数").setCheck(Number),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("角点数").setCheck(Number),this.appendValueInput("scale_factor").setAlign(Mt.inputs.Align.RIGHT).appendField("比例因子").setCheck(Number),this.appendValueInput("normalized").setAlign(Mt.inputs.Align.RIGHT).appendField("多比例"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[keypoints]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用特征识别,返回image.keypoints对象列表")}},Fc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("特征比较"),this.appendValueInput("VAR1").setAlign(Mt.inputs.Align.RIGHT).appendField("对象1").setCheck("var"),this.appendValueInput("VAR2").setAlign(Mt.inputs.Align.RIGHT).appendField("对象2").setCheck("var"),this.appendValueInput("threshold").setAlign(Mt.inputs.Align.RIGHT).appendField("相似度").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("返回[kptmatch]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用特征识别,返回image.keypoints对象列表")}},vc={init:function(){this.setColour(CO),this.appendDummyInput().appendField("特征信息"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Mt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["匹配量","count"],["弧度","theta"],["匹配点-xy","match"]]),"key"),this.setOutput(!0),this.setTooltip("通过image.kptmatch列表,获取追踪特征信息")}},Pc=20,Vc={init:function(){this.setColour(Pc),this.appendDummyInput("").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_HIGH,"HIGH"],[Mt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Mt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},yc={init:function(){this.setColour(Pc),this.appendDummyInput().appendField("初始化 "),this.appendDummyInput("").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_Digital_PINMODEOUT,"GPIO.OUT"],[Mt.Msg.MIXLY_Digital_PINMODEIN,"GPIO.IN"],[Mt.Msg.MIXLY_PINMODEPULLUP,"GPIO.IN, board.GPIO.PULL_UP"],[Mt.Msg.MIXLY_PINMODEPULLDOWN,"GPIO.IN, board.GPIO.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)}},Yc={init:function(){this.setColour(Pc),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Mt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},bc={init:function(){this.setColour(Pc),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Mt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField("值"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},kc={init:function(){this.setColour(Pc),this.appendDummyInput().appendField("初始化 PWM输出"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("freq").appendField("频率").setCheck(Number),this.appendValueInput("VAR").appendField("定时器").setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化PWM输出设置,需要调用定时器")}},Xc={init:function(){this.setColour(Pc),this.appendValueInput("PIN",Number).appendField("PWM输出").setCheck(Number),this.appendValueInput("pwm").appendField("占空比").setCheck(Number),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("PWM输出,值范围为0-100%,可以为小数")}},Gc={init:function(){this.setColour(Pc),this.appendDummyInput().appendField("硬件中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MODE).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_RISING,"GPIO.IRQ_RISING"],[Mt.Msg.MIXLY_FALLING,"GPIO.IRQ_FALLING"],[Mt.Msg.MIXLY_CHANGE,"GPIO.IRQ_BOTH"]]),"mode"),this.appendValueInput("DO").appendField(Mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},xc={init:function(){this.setColour(Pc),this.appendDummyInput().appendField("取消中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("取消中断")}},Uc="#637AAC",Hc={init:function(){this.setColour(Uc),this.appendDummyInput().appendField("OneNET 连接WiFi"),this.appendValueInput("WIFINAME").setCheck(String).appendField(Mt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Mt.Msg.HTML_PASSWORD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},wc={init:function(){this.setColour(Uc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"+Mt.Msg.TUPLE_JOIN),this.appendValueInput("CLIENT").setAlign(Mt.inputs.Align.RIGHT).setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_CLIENT),this.appendValueInput("SERVER").setAlign(Mt.inputs.Align.RIGHT).setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_SERVER),this.appendValueInput("USERNAME").setAlign(Mt.inputs.Align.RIGHT).setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_USERNAME),this.appendValueInput("PASSWORD").setAlign(Mt.inputs.Align.RIGHT).setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_PASSWORD),this.appendValueInput("TOPIC").setAlign(Mt.inputs.Align.RIGHT).setCheck(String).appendField(Mt.Msg.MIXLY_ESP32_ONENET_TOPIC),this.appendValueInput("SUB").setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_ESP32_ONENET_SUB),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_CONNECT_TOOLTIP)}},Bc={init:function(){this.setColour(Uc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_DISCONNECT_TOOLTIP)}},Wc={init:function(){this.setColour(Uc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_CHECK_TOOLTIP)}},Kc={init:function(){this.setColour(Uc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendValueInput("DICT").appendField(Mt.Msg.MIXLY_ESP32_PUBLISH_ONENET),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_IOT_ONENET_PRINT_DATA).appendField(new Mt.FieldCheckbox("TRUE"),"is_print"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_DICT_TOOLTIP)}},Qc={init:function(){this.setColour(Uc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET").setAlign(Mt.inputs.Align.RIGHT),this.appendDummyInput().appendField(new Mt.FieldLabel(Mt.Msg.MIXLY_ESP32_PUBLISH_ONENET),"TIP").setAlign(Mt.inputs.Align.RIGHT),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Mt.icons.MutatorIcon(["iot_publish_item"],this)),this.setTooltip(Mt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("iot_publish_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},jc={init:function(){this.setColour(Uc),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},qc={init:function(){this.setColour(Uc),this.appendDummyInput().appendField(Mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Jc={init:function(){this.setColour(Uc),this.appendDummyInput().appendField(Mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},zc=Hc,Zc=wc,$c=Bc,tM=Wc,eM=Qc,iM=230;Mt.FieldTextInput.math_number_validator=function(t){return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null},Mt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const nM={init:function(){this.setColour(iM),this.appendDummyInput().appendField(new Mt.FieldTextInput("0",Mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MATH_NUMBER_TOOLTIP)}},sM={init:function(){this.setColour(iM);this.appendDummyInput("").appendField(Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},oM={init:function(){this.setColour(iM),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},pM={init:function(){this.setColour(iM),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Mt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},uM={init:function(){this.setColour(iM),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},aM={init:function(){this.setColour(iM),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Mt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Mt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Mt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Mt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Mt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Mt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Mt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Mt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},lM={init:function(){var t=[[Mt.Msg.LANG_MATH_TO_ROUND,"round"],[Mt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Mt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Mt.Msg.MATH_ABS,"fabs"],[Mt.Msg.MATH_SQRT,"sqrt"]];this.setColour(iM),this.appendValueInput("A").setCheck(Number).appendField(new Mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Mt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Mt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Mt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Mt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Mt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Mt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},_M={init:function(){var t=[[Mt.Msg.MIXLY_MAX,"max"],[Mt.Msg.MIXLY_MIN,"min"]];this.setColour(iM),this.appendValueInput("A").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(new Mt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Mt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},rM={init:function(){var t=[[Mt.Msg.MIXLY_MAX,"max"],[Mt.Msg.MIXLY_MIN,"min"]];this.setColour(iM),this.appendValueInput("LIST").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(new Mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},dM={init:function(){var t=[[Mt.Msg.MATH_TWO,"two"],[Mt.Msg.MATH_EIGHT,"eight"],[Mt.Msg.MATH_TEN,"ten"],[Mt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(iM),this.appendDummyInput("").appendField(Mt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Mt.FieldDropdown(t),"OP").appendField(Mt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Mt.Msg.MATH_ZHW).appendField(new Mt.FieldDropdown(t),"OP2").appendField(Mt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Mt.Msg.MATH_Before_two,eight:Mt.Msg.MATH_Before_eight,ten:Mt.Msg.MATH_Before_ten,sixteen:Mt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Mt.Msg.MATH_Behind_two,eight:Mt.Msg.MATH_Behind_eight,ten:Mt.Msg.MATH_Behind_ten,sixteen:Mt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},IM={init:function(){var t=[[Mt.Msg.LANG_MATH_INT,"int"],[Mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(iM),this.setOutput(!0,Number),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Mt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Mt.Msg.LANG_MATH_INT,float:Mt.Msg.LANG_MATH_FLOAT_RANDOM};return Mt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},TM={init:function(){this.setColour(iM),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Mt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Mt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Mt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MATH_CONSTRAIN_TOOLTIP)}},hM={init:function(){this.setColour(iM),this.appendValueInput("NUM",Number).appendField(Mt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Mt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Mt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},mM={init:function(){this.setColour(iM),this.appendDummyInput().appendField(new Mt.FieldTextInput("0",Mt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Mt.Msg.MATH_NUMBER_TOOLTIP)}},OM={init:function(){this.setColour(iM),this.appendValueInput("NUM").setCheck(Number).appendField(Mt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},cM=hM,MM="#2E9883",RM={init:function(){this.setColour(MM),this.appendDummyInput().appendField("NES 初始化"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("PS2手柄"),this.appendValueInput("miso_pin",Number).setAlign(Mt.inputs.Align.RIGHT).appendField("DAT#").setCheck(Number),this.appendValueInput("mosi_pin",Number).setAlign(Mt.inputs.Align.RIGHT).appendField("CMD#").setCheck(Number),this.appendValueInput("cs_pin",Number).setAlign(Mt.inputs.Align.RIGHT).appendField("SEL#").setCheck(Number),this.appendValueInput("clk_pin",Number).setAlign(Mt.inputs.Align.RIGHT).appendField("CLK#").setCheck(Number),this.appendValueInput("vol").setAlign(Mt.inputs.Align.RIGHT).appendField("音量").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化NES,使用PS2手柄控制")}},EM={init:function(){this.setColour(MM),this.appendDummyInput().appendField("NES 初始化"),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("UART键盘"),this.appendValueInput("vol").setAlign(Mt.inputs.Align.RIGHT).appendField("音量").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化NES,使用串口键盘控制")}},CM={init:function(){this.setColour(MM),this.appendDummyInput().appendField("NES 运行游戏"),this.appendValueInput("path").appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("运行NES游戏ROM")}},AM="#5B6DA5",gM={init:function(){this.setColour(AM),this.appendDummyInput().appendField("ESP-AT 初始化"),this.appendValueInput("RX",Number).appendField("RX#").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("TX#").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("使用串口连接ESP-AT设备,并初始化配置")}},SM={init:function(){this.setColour(AM),this.appendDummyInput().appendField("WiFi扫描"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("扫描附近可用的WiFi信息-返回多信息列表")}},DM={init:function(){this.setColour(AM),this.appendDummyInput("").appendField("WiFi连接"),this.appendValueInput("account").appendField("名称").setCheck(String),this.appendValueInput("password").appendField("密码").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("配置WiFi名称及密码,连接WiFi上网")}},LM={init:function(){this.setColour(AM),this.appendDummyInput().appendField("WiFi").appendField(new Mt.FieldDropdown([["连接信息","1"],["连接状态","2"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("查看wifi连接信息或者连接状态")}},NM={init:function(){this.setColour(AM),this.appendDummyInput().appendField("WiFi断开连接"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("断开wifi连接")}},fM={init:function(){this.setColour(AM),this.appendDummyInput("").setAlign(Mt.inputs.Align.RIGHT).appendField("打开热点"),this.appendValueInput("account").setAlign(Mt.inputs.Align.RIGHT).appendField("名称").setCheck(String),this.appendValueInput("password").setAlign(Mt.inputs.Align.RIGHT).appendField("密码").setCheck(String),this.appendValueInput("chl").setAlign(Mt.inputs.Align.RIGHT).appendField("通道").setCheck(Number),this.appendDummyInput().setAlign(Mt.inputs.Align.RIGHT).appendField("加密").appendField(new Mt.FieldDropdown([["WPA2_PSK","WPA2_PSK"],["OPEN","OPEN"],["WPA_PSK","WPA_PSK"],["WPA_WPA2_PSK","WPA_WPA2_PSK"]]),"mode"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开WiFi热点并配置")}},FM={init:function(){this.setColour(AM),this.appendDummyInput().appendField("关闭热点"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("关闭热点")}},vM={init:function(){this.setColour(AM),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("套接字 初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("套接字初始化")}},PM={init:function(){this.setColour(AM),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("获取地址"),this.appendValueInput("addr").setAlign(Mt.inputs.Align.RIGHT).appendField("域名").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接字根据域名解析地址IP信息")}},VM={init:function(){this.setColour(AM),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("创建连接"),this.appendValueInput("address").appendField("地址"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接字创建目标IP地址连接")}},yM={init:function(){this.setColour(AM),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("超时时间"),this.appendValueInput("time").setAlign(Mt.inputs.Align.RIGHT).appendField("").setCheck(Number),this.appendDummyInput().appendField("s"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("设置阻塞套接字超时时间")}},YM={init:function(){this.setColour(AM),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendValueInput("content").appendField("发送数据"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接发送数据")}},bM={init:function(){this.setColour(AM),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("接收数据"),this.appendValueInput("size").appendField("字节").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接接收数据,返回接收到的数据对象")}},kM={init:function(){this.setColour(AM),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},XM=230,GM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},xM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},UM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},HM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},wM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},BM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},WM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},KM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},QM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},jM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},qM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},JM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},zM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},ZM={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},$M={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},tR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},eR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},iR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},nR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},sR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},oR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},pR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},uR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},aR={init:function(){this.setColour(XM),this.appendDummyInput("").appendField(new Mt.FieldDropdown(Rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},lR=40,_R={init:function(){this.setColour(lR),this.appendDummyInput("").appendField(new Mt.FieldDropdown([["A","17"],["B","16"]]),"KEY"),this.setOutput(!0),this.setTooltip()}},rR={init:function(){this.setColour(lR),this.appendDummyInput().appendField("初始化"),this.appendValueInput("key").appendField("按键"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化按键")}},dR={init:function(){this.setColour(lR),this.appendValueInput("key").appendField("按键"),this.appendDummyInput().appendField("被按下?"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip("获取按键值")}},IR={init:function(){this.setColour(lR),this.appendDummyInput().appendField("DHT11"),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField("获取").appendField(new Mt.FieldDropdown([["温度-℃","0"],["湿度-%","1"],["温湿度","2"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("dht11,获取温湿度")}},TR={init:function(){this.setColour(lR),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_CHAOSHENGBO),this.appendValueInput("PIN1",Number).appendField("Trig #").setCheck(Number),this.appendValueInput("PIN2",Number).appendField("Echo #").setCheck(Number),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_CHAOSHENGBO)}},hR={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Mt.Msg.MIXLY_MICROBIT_Direction,s=Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},mR={init:function(){this.setColour(lR),this.appendValueInput("I2CSUB").appendField(Mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_SETUP+Mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Mt.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("MPU9250","key");var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return Mt.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP+{MPU9250:"MPU9250",SHT20:"SHT20",BMP280:"BMP280",ADXL345:"ADXL345"}[e]}))}},OR={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Mt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":Mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},cR={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Mt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":Mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},MR={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_JS_GET+Mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Mt.Msg.MIXLY_MICROBIT_Direction,s=Mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},RR={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Mt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Mt.Msg.MIXLY_MICROBIT_Direction,s=Mt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},ER={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_GETTEMPERATUE)}},CR={init:function(){this.setColour(lR),this.appendValueInput("SUB").appendField("ADXL345").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Mt.Msg.MIXLY_MICROBIT_Direction,s=Mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},AR=65,gR={init:function(){this.setColour(AR),this.appendValueInput("CONTENT",String).appendField("Serial").appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Mt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.TEXT_PRINT_TOOLTIP)}},SR={init:function(){this.setColour(AR),this.appendValueInput("CONTENT",String).appendField("Serial").appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Mt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.TEXT_PRINT_Huanhang_TOOLTIP+Mt.Msg.TEXT_PRINT_TOOLTIP)}},DR={init:function(){this.setColour(AR),this.appendDummyInput().appendField("Serial").appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Mt.Msg.MIXLY_SERIAL_PRINTLN),this.appendValueInput("CONTENT",Number).appendField(new Mt.FieldDropdown([[Mt.Msg.MATH_BIN,"bin"],[Mt.Msg.MATH_OCT,"oct"],[Mt.Msg.MATH_DEC,"int"],[Mt.Msg.MATH_HEX,"hex"]]),"STAT").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setFieldValue("hex","STAT"),this.setTooltip(Mt.Msg.TEXT_PRINT_HEX_TOOLTIP)}},LR={init:function(){this.setColour(AR),this.appendValueInput("char_marker").setCheck(String).appendField(Mt.Msg.MIXLY_MICROBIT_JS_SERIAL_WHEN_CONTAIN_DATA),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_DO)}},NR={init:function(){this.setColour(AR),this.appendDummyInput().appendField("Serial").appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Mt.Msg.MIXLY_SERIAL_READSTR),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERIAL_READ_STR)}},fR={init:function(){this.setColour(AR),this.appendDummyInput().appendField("Serial").appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Boolean),this.setTooltip(Mt.Msg.MIXLY_SERIAL_AVAILABLE1)}},FR={init:function(){this.setColour(AR),this.appendDummyInput().appendField("Serial").appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Mt.Msg.MIXLY_ESP32_READ_LINE),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_MICROBIT_JS_SERIAL_READ_LINE1)}},vR={init:function(){this.setColour(AR),this.appendDummyInput().appendField("Serial "+Mt.Msg.MIXLY_SERIAL_READSTR_UNTIL).appendField(new Mt.FieldDropdown([["new line","serial.delimiters(Delimiters.NewLine)"],[",","serial.delimiters(Delimiters.Comma)"],["$","serial.delimiters(Delimiters.Dollar)"],[":","serial.delimiters(Delimiters.Colon)"],[".","serial.delimiters(Delimiters.Fullstop)"],["#","serial.delimiters(Delimiters.Hash)"]]),"char_marker"),this.setInputsInline(!0),this.setOutput(!0,String)}},PR={init:function(){this.setColour(AR),this.appendValueInput("RX",Number).appendField(Mt.Msg.MIXLY_SETUP).appendField(new Mt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField("RX#").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("TX#").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT),this.appendDummyInput().appendField(Mt.Msg.MIXLY_SERIAL_BEGIN).appendField(new Mt.FieldDropdown([["115200","115200"],["57600","57600"],["37400","38400"],["31250","31250"],["28800","28800"],["19200","19200"],["14400","14400"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["300","300"]]),"baudrate"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_SERIAL_softserial)}},VR={init:function(){this.setColour(AR),this.appendValueInput("VAR").appendField(Mt.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Mt.Msg.INOUT_input_TOOLTIP)}},yR={init:function(){this.setColour(AR),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.BLOCKPY_PRINT_TOOLTIP)}},YR={init:function(){this.setColour(AR),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Mt.Msg.TEXT_PRINT_TOOLTIP)}},bR={init:function(){this.setColour(AR),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(Mt.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},kR={init:function(){this.setColour(AR),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Mt.icons.MutatorIcon(["system_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("system_print_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n {\n"+e.statementToCode(this,"do")+"})\n"},RD=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},ED=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},CD=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},AD=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},gD=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},SD=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},DD=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},LD=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},ND=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},fD=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},FD=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},vD=function(){return"while True:\n pass\n"},PD=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},VD=function(t,e){e.definitions_["import machine"]="import machine";return"machine.reset()\n"},yD=function(t,e){return e.definitions_["import gc"]="import gc",this.getFieldValue("gc")+"\n"},YD=function(t,e){return e.definitions_.import_os="import os","os.uname()"},bD=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},kD=function(t,e){e.definitions_["from machine import Timer"]="from machine import Timer";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=i%3,s=parseInt(i/3),o=e.valueToCode(this,"period",e.ORDER_NONE);return"tim"+i+" =Timer(Timer.TIMER"+n+",Timer.CHANNEL"+s+",mode=Timer.MODE_"+this.getFieldValue("mode")+",period = "+o+", callback = "+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},XD=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},GD=function(t,e){e.definitions_["from machine import Timer"]="from machine import Timer";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"tim"+i+" = Timer(Timer.TIMER"+i%3+",Timer.CHANNEL"+parseInt(i/3)+", mode=Timer.MODE_PWM)\n"},xD=GD,UD=kD,HD=XD,wD=bD;const BD=function(t,e){return["["+this.getFieldValue("TEXT")+"]",e.ORDER_ATOMIC]},WD=function(t,e){return["("+this.getFieldValue("TEXT")+")",e.ORDER_ATOMIC]},KD=function(t,e){var i=this.getFieldValue("COLOR");return["("+("0x"+(i=i.substr(1)).substr(0,2))+","+("0x"+i.substr(2,2))+","+("0x"+i.substr(4,2))+")",e.ORDER_ATOMIC]},QD=function(t,e){var i=this.getFieldValue("COLOR");return[i=function(t){var e,i,n;e=(t=t.substr(1)).substr(0,2),i=t.substr(2,2),n=t.substr(4,2);var s=(64512&(t="0x"+(t=e+i+n)))>>10;return((248&t)>>3<<8)+((7&s)<<13)+((16252928&t)>>19<<3)+((56&s)>>3)}(i),e.ORDER_ATOMIC]};Object.assign(Mt.Variables,Ct),Object.assign(Mt.Procedures,yl),Mt.Python=Yl,Mt.generator=Yl,Rt.Profile.default={},Object.assign(Rt.Profile,ZT),Object.assign(Rt.Profile.default,ZT.k210),Object.assign(Mt.Blocks,e,i,n,s,o,p,u,a,l,_,r,d,I,F,f,N,L,Y,b,k,X,G,x,U,H,w,B,W,K,Q,j,q,J,z,Z,$),Object.assign(Mt.Python.forBlock,T,h,m,O,c,M,R,E,C,A,g,S,D,y,V,P,v,tt,et,it,nt,st,ot,pt,ut,at,lt,_t,rt,dt,It,Tt,ht,mt,Ot,ct)})();