diff --git a/docs/examples/microbit-uh.umd.min.js b/docs/examples/microbit-uh.umd.min.js new file mode 100644 index 0000000..d169bc4 --- /dev/null +++ b/docs/examples/microbit-uh.umd.min.js @@ -0,0 +1,2 @@ +(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e=e||self,t(e.microbitUh={}))})(this,function(e){'use strict';var N=String.prototype,k=Math.max,v=Math.floor,C=Math.ceil,D=Math.min;function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(e){if(0!=e.length%2)throw new Error("Hex string \""+e+"\" is not divisible by 2.");var t=e.match(/.{1,2}/g);return t?new Uint8Array(t.map(function(t){var n=Number.isNaN,r=parseInt(t,16);if(n(r))throw new Error("There were some non-hex characters in \""+e+"\".");else return r})):new Uint8Array}function r(e){return e.toString(16).toUpperCase().padStart(2,"0")}function a(e){return e.reduce(function(e,t){return e+t.toString(16).toUpperCase().padStart(2,"0")},"")}function o(e){var t=e.reduce(function(e,t){return e+t.length},0),n=new Uint8Array(t);return e.reduce(function(e,t){return n.set(t,e),e+t.length},0),n}function l(e){return!!(e>=yr.Data&&e<=yr.StartLinearAddress||e>=yr.BlockStart&&e<=yr.OtherData)}function d(e){var t=e.reduce(function(e,t){return e+t},0);return 255&-t}function s(e,t,n){if(0>e||6553532)throw new Error("Record ("+t+") data has too many bytes ("+i+").");if(!l(t))throw new Error("Record type '"+t+"' is not valid.");var s=o([new Uint8Array([i,e>>8,255&e,t]),n]),c=a(s),g=r(d(s));return":"+c+g}function c(e){if(e.lengthPr)throw new Error("Record length is too large: "+e);if(":"!==e[0])throw new Error("Record does not start with a \":\": "+e);return!0}function g(e){c(e);var t=Tr+2+4,n=e.slice(t,t+2),r=parseInt(n,16);if(!l(r))throw new Error("Record type '"+n+"' from record '"+e+"' is not valid.");return r}function u(t){try{return n(t.slice(Ir,-2))}catch(n){throw new Error("Could not parse Intel Hex record \""+t+"\": "+n.message)}}function h(t){c(t);var r;try{r=n(t.substring(1))}catch(n){throw new Error("Could not parse Intel Hex record \""+t+"\": "+n.message)}var a=r[0],o=1,l=(r[o]<<8)+r[o+1],i=o+2,d=r[i],s=i+1,g=s+a,u=r.slice(s,g),h=r[g],p=g+1;if(r.length>p)throw new Error("Parsed record \""+t+"\" is larger than indicated by the byte count."+("\n\tExpected: "+p+"; Length: "+r.length+"."));return{byteCount:a,address:l,recordType:d,data:u,checksum:h}}function p(){return":00000001FF"}function E(e){if(0>e||4294967295>24,255&e>>16]))}function y(e){if(0>e||65535>8,255&e,192,222]))}function T(e){switch(e){case 4:return":0400000BFFFFFFFFF5";case 12:return":0C00000BFFFFFFFFFFFFFFFFFFFFFFFFF5";default:var t=new Uint8Array(e).fill(255);return s(0,yr.BlockEnd,t);}}function S(e){var t=new Uint8Array(e).fill(255);return s(0,yr.PaddedData,t)}function A(e,t){var n=h(e),o=new Uint8Array(n.data.length+4);o[0]=n.data.length,o[1]=n.address>>8,o[2]=255&n.address,o[3]=t,o.set(n.data,4);var l=a(o),i=r(d(o));return":"+l+i}function x(e){var t=u(e);if(2!==t.length||15&t[0]||0!==t[1])throw new Error("Invalid Extended Segment Address record "+e);var n=t[0]<<12;return E(n)}function I(e){var t=e.replace(/\r/g,"").split("\n");return t.filter(Boolean)}function m(e){for(var t=16,n=0,r=0,a=e;rt?(t=l,n=0):l===t&&n++,1232)throw new Error("Intel Hex record data size is too large: "+t);return t}function O(e,t){var n=!Lr.includes(t),r=y(t),a=E(0),o=a.length,l=r.length,i=T(0).length,d=S(0).length,s=I(e),c=m(s);if(!s.length)return"";if(R(s))throw new Error("Board ID "+t+" Hex is already a Universal Hex.");for(var u=0,h=[];u=f+s[u].length+1;){var L=s[u++],F=g(L);if(n&&F===yr.Data)L=A(L,yr.CustomData);else if(F===yr.ExtendedLinearAddress)a=L;else if(F===yr.ExtendedSegmentAddress)L=x(L),a=L;else if(F===yr.EndOfFile){P=!0;break}h.push(L),f+=L.length+1}if(P){if(u!==s.length)if(b(s))throw new Error("Board ID "+t+" Hex is from MakeCode, import this hex into the MakeCode editor to create a Universal Hex.");else throw new Error("EoF record found at record "+u+" of "+s.length+" in Board ID "+t+" hex");h.push(T(0)),h.push(p())}else{for(;512-f>2*c;){var L=S(D((512-f-(d+1))/2,c));h.push(L),f+=L.length+1}h.push(T((512-f)/2))}}return h.push(""),h.join("\n")}function P(e,t){var n=[],r=0,a=0,o=function(e){r+=e.length+1},l=function(e){n.push(e),o(e)},i=I(e);if(!i.length)return"";if(R(i))throw new Error("Board ID "+t+" Hex is already a Universal Hex.");var d=g(i[0]);d===yr.ExtendedLinearAddress?(l(i[0]),a++):d===yr.ExtendedSegmentAddress?(l(x(i[0])),a++):l(E(0)),l(y(t));for(var s=!Lr.includes(t),c=!1;a2*O;){var L=P-f>>1,u=S(D(L,O));l(u),P=(512-r%512)%512}return n.push(T(P>>1)),c&&n.push(p()),n.push(""),n.join("\n")}function L(e,t){if(void 0===t&&(t=!1),!e.length)return"";for(var n,r=t?O:P,a=p()+"\n",o=[],l=0;le?k(e+t,0):D(e,t)},Le=function(e){return function(t,n,r){var a,o=he(t),l=Oe(o.length),i=Pe(r,l);if(e&&n!=n){for(;l>i;)if(a=o[i++],a!=a)return!0;}else for(;l>i;i++)if((e||i in o)&&o[i]===n)return e||i||0;return!e&&-1}},Fe=U("keys"),Re=function(e){return Fe[e]||(Fe[e]=G(e))},be=Le(!1),_e=Re("IE_PROTO"),Ne=function(e,t){var n,r=he(e),a=0,o=[];for(n in r)n!=_e&&Ee(r,n)&&o.push(n);for(;t.length>a;)Ee(r,n=t[a++])&&(~be(o,n)||o.push(n));return o},ke=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ve=Object.keys||function(e){return Ne(e,ke)},Ce=X?Object.defineProperties:function(e,t){w(e);for(var n,r=ve(t),a=r.length,o=0;a>o;)f.f(e,n=r[o++],t[n]);return e},De=Y.document,Be=De&&De.documentElement,He=Re("IE_PROTO"),Ye=function(){},Ue="prototype",Me=function(){var e,t=Z("iframe"),n=ke.length,r="<",a=">";for(t.style.display="none",Be.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+a+"document.F=Object"+r+"/script"+a),e.close(),Me=e.F;n--;)delete Me[Ue][ke[n]];return Me()},$e=Object.create||function(e,t){var n;return null===e?n=Me():(Ye[Ue]=w(e),n=new Ye,Ye[Ue]=null,n[He]=e),void 0===t?n:Ce(n,t)},Ge=f.f,Ve=V("toStringTag"),je=function(e,t,n){e&&!Ee(e=n?e:e.prototype,Ve)&&Ge(e,Ve,{configurable:!0,value:t})},We={};re(We,V("iterator"),function(){return this});var we=function(e,t,n){e.prototype=$e(We,{next:ne(1,n)}),je(e,t+" Iterator")},Ke=function(e){return Object(ue(e))},Xe=Re("IE_PROTO"),ze=Object.prototype,qe=Object.getPrototypeOf||function(e){return e=Ke(e),Ee(e,Xe)?e[Xe]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ze:null},Ze=V("iterator"),Je=!([].keys&&"next"in[].keys()),Qe="keys",et="values",tt=function(){return this},nt=function(e,t,n,r,a,o,l){we(n,t,r);var i,d,s,c=function(e){return!Je&&e in p?p[e]:e===Qe?function(){return new n(this,e)}:e===et?function(){return new n(this,e)}:function(){return new n(this,e)}},g=t+" Iterator",u=a==et,h=!1,p=e.prototype,E=p[Ze]||p["@@iterator"]||a&&p[a],f=E||c(a),y=a?u?c("entries"):f:void 0,T="Array"==t?p.entries||E:E;if(T&&(s=qe(T.call(new e)),s!==Object.prototype&&s.next&&(je(s,g,!0),"function"!=typeof s[Ze]&&re(s,Ze,tt))),u&&E&&E.name!==et&&(h=!0,f=function(){return E.call(this)}),(Je||h||!p[Ze])&&re(p,Ze,f),de[t]=f,de[g]=tt,a)if(i={values:u?f:c(et),keys:o?f:c(Qe),entries:y},l)for(d in i)d in p||ye(p,d,i[d]);else Ie(Ie.P+Ie.F*(Je||h),t,i);return i},rt=nt(Array,"Array",function(e,t){this._t=he(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,ie(1)):"keys"==t?ie(0,n):"values"==t?ie(0,e[n]):ie(0,[n,e[n]])},"values");de.Arguments=de.Array,le("keys"),le("values"),le("entries");for(var ot=V("iterator"),lt=V("toStringTag"),it=de.Array,dt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},st=ve(dt),ct=0;cts||s>=i?e?"":void 0:(r=d.charCodeAt(s),55296>r||56319(o=d.charCodeAt(s+1))||57343")}),Gt=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}(),Vt=function(e,t,n){var r=V(e),a=!K(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)}),o=a?!K(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[Mt]=function(){return n}),n[r](""),!t}):void 0;if(!a||!o||"replace"===e&&!$t||"split"===e&&!Gt){var l=/./[r],i=n(ue,r,""[e],function(e,t,n,r,o){return t.exec===Ut?a&&!o?{done:!0,value:l.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),d=i[0],s=i[1];ye(String.prototype,e,d),re(RegExp.prototype,r,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}},jt=function(e){return e===void 0?e:e+""};Vt("replace",2,function(e,t,n,r){function a(e,t,r,a,o,l){var i=r+e.length,d=a.length,s=/\$([$&`']|\d\d?)/g;return void 0!==o&&(o=Ke(o),s=/\$([$&`']|\d\d?|<[^>]*>)/g),n.call(l,s,function(l,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(i);case"<":c=o[s.slice(1,-1)];break;default:var g=+s;if(0==g)return l;if(g>d){var n=v(g/10);return 0===n?l:n<=d?void 0===a[n-1]?s.charAt(1):a[n-1]+s.charAt(1):l}c=a[g-1];}return void 0===c?"":c})}return[function(r,a){var o=e(this),l=r==null?void 0:r[t];return l===void 0?n.call(o+"",r,a):l.call(r,o,a)},function(e,t){var o=r(n,e,this,t);if(o.done)return o.value;var l=w(e),d=this+"",s="function"==typeof t;s||(t=t+"");var c=l.global;if(c){var g=l.unicode;l.lastIndex=0}for(var u,h=[];(u=Nt(l,d),null!==u)&&!(h.push(u),!c);){var p=u[0]+"";""==p&&(l.lastIndex=at(d,Oe(l.lastIndex),g))}for(var E="",f=0,y=0;y=f&&(E+=d.slice(f,S)+O,f=S+T.length)}return E+d.slice(f)}]});var Wt=V("species"),wt=function(e,t){var n,r=w(e).constructor;return r===void 0||(n=w(r)[Wt])==null?t:Te(n)},Kt=[].push,Xt="split",zt="length",qt="lastIndex",Zt=4294967295,Jt=!K(function(){RegExp(Zt,"y")});Vt("split",2,function(e,t,n,r){var a;return a="c"=="abbc"[Xt](/(b)*/)[1]||4!="test"[Xt](/(?:)/,-1)[zt]||2!="ab"[Xt](/(?:ab)*/)[zt]||4!="."[Xt](/(.?)(.?)/)[zt]||1<"."[Xt](/()()/)[zt]||""[Xt](/.?/)[zt]?function(e,t){var r=this+"";if(void 0===e&&0===t)return[];if(!It(e))return n.call(r,e,t);for(var a,o,l,i=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),s=0,c=void 0===t?Zt:t>>>0,g=new RegExp(e.source,d+"g");(a=Ut.call(g,r))&&(o=g[qt],!(o>s&&(i.push(r.slice(s,a.index)),1=c)));)g[qt]===a.index&&g[qt]++;return s===r[zt]?(l||!g.test(""))&&i.push(""):i.push(r.slice(s)),i[zt]>c?i.slice(0,c):i}:"0"[Xt](void 0,0)[zt]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),l=null==n?void 0:n[t];return void 0===l?a.call(o+"",n,r):l.call(n,o,r)},function(t,o){var l=r(a,t,this,o,a!==n);if(l.done)return l.value;var d=w(t),s=this+"",c=wt(d,RegExp),g=d.unicode,u=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(Jt?"y":"g"),h=new c(Jt?d:"^(?:"+d.source+")",u),E=void 0===o?Zt:o>>>0;if(0===E)return[];if(0===s.length)return null===Nt(h,s)?[s]:[];for(var f=0,y=0,T=[];ya;)t[a++]=e;return t};Ie(Ie.P,"Array",{fill:Qt}),le("fill");for(var en,tn=G("typed_array"),nn=G("view"),rn=!!(Y.ArrayBuffer&&Y.DataView),an=rn,on=0,ln=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"];on<9;)(en=Y[ln[on++]])?(re(en.prototype,tn,!0),re(en.prototype,nn,!0)):an=!1;var dn={ABV:rn,CONSTR:an,TYPED:tn,VIEW:nn},sn=function(e,t,n){for(var r in t)ye(e,r,t[r],n);return e},cn=function(e,t,n,r){if(!(e instanceof t)||r!==void 0&&r in e)throw TypeError(n+": incorrect invocation!");return e},gn=function(e){if(e===void 0)return 0;var t=me(e),n=Oe(t);if(t!==n)throw RangeError("Wrong length!");return n},un=ke.concat("length","prototype"),hn=Object.getOwnPropertyNames||function(e){return Ne(e,un)},pn={f:hn},En=t(function(e,t){function n(t,n,r){var a,o,l,d=Array(r),g=8*r-n-1,u=(1<>1,p=23===n?F(2,-24)-F(2,-77):0,E=0,f=0>t||0===t&&0>1/t?1:0;for(t=L(t),t!=t||t===O?(o=t==t?0:1,a=u):(a=R(b(t)/_),1>t*(l=F(2,-a))&&(a--,l*=2),t+=1<=a+h?p/l:p*F(2,1-h),2<=t*l&&(a++,l/=2),a+h>=u?(o=0,a=u):1<=a+h?(o=(t*l-1)*F(2,n),a+=h):(o=t*F(2,h-1)*F(2,n),a=0));8<=n;d[E++]=255&o,o/=256,n-=8);for(a=a<>1,c=o-7,g=r-1,u=t[g--],h=127&u;for(u>>=7;0>=-c,c+=n;0>8]}function i(e){return[255&e,255&e>>8,255&e>>16,255&e>>24]}function d(e){return n(e,52,8)}function s(e){return n(e,23,4)}function c(e,t,n){p(e.prototype,t,{get:function(){return this[n]}})}function g(e,t,n,r){var a=gn(+n);if(a+t>e[B])throw I("Wrong index!");var o=e[D]._b,l=a+e[H],i=o.slice(l,l+t);return r?i:i.reverse()}function u(e,t,n,r,a,o){var l=gn(+n);if(l+t>e[B])throw I("Wrong index!");for(var d=e[D]._b,s=l+e[H],c=r(+a),g=0;ga||a>r)throw I("Wrong offset!");if(n=void 0===n?r-a:Oe(n),a+n>r)throw I("Wrong length!");this[D]=e,this[H]=a,this[B]=n},X&&(c(S,k,"_l"),c(A,N,"_b"),c(A,k,"_l"),c(A,C,"_o")),sn(A[T],{getInt8:function(e){return g(this,1,e)[0]<<24>>24},getUint8:function(e){return g(this,1,e)[0]},getInt16:function(e){var t=g(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=g(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return a(g(this,4,e,arguments[1]))},getUint32:function(e){return a(g(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return r(g(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return r(g(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){u(this,1,e,o,t)},setUint8:function(e,t){u(this,1,e,o,t)},setInt16:function(e,t){u(this,2,e,l,t,arguments[2])},setUint16:function(e,t){u(this,2,e,l,t,arguments[2])},setInt32:function(e,t){u(this,4,e,i,t,arguments[2])},setUint32:function(e,t){u(this,4,e,i,t,arguments[2])},setFloat32:function(e,t){u(this,4,e,s,t,arguments[2])},setFloat64:function(e,t){u(this,8,e,d,t,arguments[2])}});else{if(!K(function(){S(1)})||!K(function(){new S(-1)})||K(function(){return new S,new S(1.5),new S(NaN),S.name!=E})){S=function(e){return cn(this,S),new P(gn(e))};for(var U,M=S[T]=P[T],$=h(P),G=0;$.length>G;)(U=$[G++])in S||re(S,U,P[U]);M.constructor=S}var m=new A(new S(2)),V=A[T].setInt8;m.setInt8(0,2147483648),m.setInt8(1,2147483649),(m.getInt8(0)||!m.getInt8(1))&&sn(A[T],{setInt8:function(e,t){V.call(this,e,t<<24>>24)},setUint8:function(e,t){V.call(this,e,t<<24>>24)}},!0)}je(S,E),je(A,y),re(A[T],dn.VIEW,!0),t[E]=S,t[y]=A}),fn=V("iterator"),yn=Array.prototype,Tn=function(e){return e!==void 0&&(de.Array===e||yn[fn]===e)},Sn=V("iterator"),An=B.getIteratorMethod=function(e){if(e!=null)return e[Sn]||e["@@iterator"]||de[St(e)]},xn=Array.isArray||function(e){return"Array"==ce(e)},In=V("species"),mn=function(e){var t;return xn(e)&&(t=e.constructor,"function"==typeof t&&(t===Array||xn(t.prototype))&&(t=void 0),W(t)&&(t=t[In],null===t&&(t=void 0))),void 0===t?Array:t},On=function(e,t){return new(mn(e))(t)},Pn=function(e,t){var n=1==e,r=4==e,a=6==e,o=t||On;return function(t,l,i){for(var d,s,c=Ke(t),g=ge(c),u=Se(l,i,3),h=Oe(g.length),p=0,E=n?o(t,h):2==e?o(t,0):void 0;h>p;p++)if((5==e||a||p in g)&&(d=g[p],s=u(d,p,c),e))if(n)E[p]=s;else if(s)switch(e){case 3:return!0;case 5:return d;case 6:return p;case 2:E.push(d);}else if(r)return!1;return a?-1:3==e||r?r:E}},Ln=V("iterator"),Fn=!1;try{var Rn=[7][Ln]();Rn["return"]=function(){Fn=!0},Array.from(Rn,function(){throw 2})}catch(t){}var bn=function(e,t){if(!t&&!Fn)return!1;var n=!1;try{var r=[7],a=r[Ln]();a.next=function(){return{done:n=!0}},r[Ln]=function(){return a},e(r)}catch(t){}return n},_n=V("species"),Nn=function(e){var t=Y[e];X&&t&&!t[_n]&&f.f(t,_n,{configurable:!0,get:function(){return this}})},kn=[].copyWithin||function(e,t){var n=Ke(this),r=Oe(n.length),a=Pe(e,r),o=Pe(t,r),l=2n||n%t)throw _("Wrong offset!");return n},De=function(e){if(y(e)&&Re in e)return e;throw N(e+" is not a typed array!")},Be=function(e,t){if(!(y(e)&&Ae in e))throw N("It is not a typed array constructor!");return new e(t)},He=function(e,t){return Ye(P(e,e[xe]),t)},Ye=function(e,t){for(var n=0,r=t.length,a=Be(e,r);r>n;)a[n]=t[n++];return a},Ue=function(e,t,n){b(e,t,{get:function(){return this._d[n]}})},Me=function(e){var t,n,r,a,o,l,d=T(e),s=arguments.length,g=1t;t++)a[t]=u?g(d[t],t):d[t];return a},Ge=function(){for(var e=0,t=arguments.length,n=Be(this,t);t>e;)n[e]=arguments[e++];return n},Ve=!!k&&r(function(){fe.call(new k(1))}),je=function(){return fe.apply(Ve?he.call(De(this)):De(this),arguments)},We={copyWithin:function(e,t){return kn.call(De(this),e,t,2n)throw _(_e);for(;o(r=Math.round(r))?0:255o)throw _(_e)}else if(o=c(r)*l,o+T>S)throw _(_e);s=o/l}else return Re in t?Ye(p,t):Me.call(p,t);for(d(e,"_d",{b:a,o:T,l:o,e:s,v:new $(a)});fa||a==1/0)throw RangeError("Count can't be negative");for(;0>>=1)&&(t+=t))1&a&&(r+=t);return r},Gn=function(e,t,n,r){var a=ue(e)+"",o=a.length,l=void 0===n?" ":n+"",i=Oe(t);if(i<=o||""==l)return a;var d=i-o,s=$n.call(l,C(d/l.length));return s.length>d&&(s=s.slice(0,d)),r?s+a:a+s},Vn=Y.navigator,jn=Vn&&Vn.userAgent||"",Wn=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(jn);Ie(Ie.P+Ie.F*Wn,"String",{padStart:function(e){return Gn(this,e,1d||d>a)return NaN;return parseInt(s,r)}}return+t};if(!dr(" 0o1")||!dr("0b1")||dr("+0x1")){dr=function(e){var t=1>arguments.length?0:e,n=this;return n instanceof dr&&(gr?K(function(){cr.valueOf.call(n)}):ce(n)!=ir)?zn(new sr(hr(t)),n,dr):hr(t)};for(var pr,Er=X?rr(sr):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),fr=0;Er.length>fr;fr++)Ee(sr,pr=Er[fr])&&!Ee(dr,pr)&&or(dr,pr,ar(sr,pr));dr.prototype=cr,cr.constructor=dr,ye(Y,ir,dr)}Ie(Ie.S,"Number",{isNaN:function(e){return e!=e}}),Vt("match",1,function(e,t,r,a){return[function(n){var r=e(this),a=n==null?void 0:n[t];return a===void 0?new RegExp(n)[t](r+""):a.call(n,r)},function(e){var t=a(r,e,this);if(t.done)return t.value;var o=w(e),l=this+"";if(!o.global)return Nt(o,l);var i=o.unicode;o.lastIndex=0;for(var d,s=[],c=0;null!==(d=Nt(o,l));){var g=d[0]+"";s[c]=g,""==g&&(o.lastIndex=at(l,Oe(o.lastIndex),i)),c++}return 0===c?null:s}]});var yr;(function(e){e[e.Data=0]="Data",e[e.EndOfFile=1]="EndOfFile",e[e.ExtendedSegmentAddress=2]="ExtendedSegmentAddress",e[e.StartSegmentAddress=3]="StartSegmentAddress",e[e.ExtendedLinearAddress=4]="ExtendedLinearAddress",e[e.StartLinearAddress=5]="StartLinearAddress",e[e.BlockStart=10]="BlockStart",e[e.BlockEnd=11]="BlockEnd",e[e.PaddedData=12]="PaddedData",e[e.CustomData=13]="CustomData",e[e.OtherData=14]="OtherData"})(yr||(yr={}));var Tr=":".length,Sr=2,Ar=4,xr=2,Ir=0+Tr+Sr+Ar+xr,mr=0,Or=Tr+Sr+Ar+xr+mr+2,Pr=Or-mr+64,Lr=[39168,39169];(function(e){e[e.V1=39168]="V1",e[e.V2=39171]="V2"})(e.microbitBoardId||(e.microbitBoardId={})),e.createUniversalHex=L,e.iHexToCustomFormatBlocks=O,e.iHexToCustomFormatSection=P,e.isMakeCodeForV1Hex=function(e){return b(I(e))},e.isUniversalHex=F,e.separateUniversalHex=_,Object.defineProperty(e,"__esModule",{value:!0})}); +//# sourceMappingURL=microbit-uh.umd.min.js.map