diff --git a/assets/js/slides.js b/assets/js/slides.js index 1ffc7bffd9b5c11fce92de57643e108c4851faf5..9754642cfa6fd626176a6bc6ec39a20de70c6b6c 100644 --- a/assets/js/slides.js +++ b/assets/js/slides.js @@ -7,17 +7,44 @@ return !value||(typeOfValue!=="object"&&typeOfValue!==typeFunction); }; - function valueIsPrimitiveError(value){ - return( - "\x22"+ - value+ - "\x22 (type:\x20"+ - (value!==null?typeof value:value)+ - ") is not an object type (an object or a function)!" - ); - } + const returnOrThrowObjectType=function(){ + + function valueIsPrimitiveError(value){ + return( + "\x22"+ + value+ + "\x22 (type:\x20"+ + (value!==null?typeof value:value)+ + ") is not an object type (an object or a function)!" + ); + } + + return function(value){ + if(isPrimitive(value))throw valueIsPrimitiveError(value); + else return value; + }; + }(); + + returnOrThrowObjectType(globalObject); + + const Object_constructor={}.constructor; - if(isPrimitive(globalObject))throw valueIsPrimitiveError(globalObject); + const tryES5CreateNullPrototypeObject=function(){ + + const create=Object_constructor.create; + const createIsFunction=typeof create===typeFunction; + + return function(){ + try{ + return returnOrThrowObjectType( + createIsFunction&& + create(null) + ); + }catch(_){ + return new Object_constructor(); + } + }; + }(); const dep0="Bright", dep1="DOMOperation", @@ -38,26 +65,25 @@ [dep0,dep1,dep2], function(){ const args=arguments; - return execute( - globalObject, - { - "Bright":args[0], - "DOMOperation":args[1], - "Slides":args[2] - }, - useRequireJS - ); + const dependencies=tryES5CreateNullPrototypeObject(); + let index; + index=-1; + dependencies[dep0]=args[index+=1]; + dependencies[dep1]=args[index+=1]; + dependencies[dep2]=args[index+=1]; + dependencies.define=define_; + dependencies.requirejs=requirejs_; + return execute(globalObject,dependencies,useRequireJS); } ) - ):execute( - globalObject, - { - "Bright":globalObject[dep0], - "DOMOperation":globalObject[dep1], - "Slides":globalObject[dep2] - }, - useRequireJS - ); + ):function(){ + const dependencies=tryES5CreateNullPrototypeObject(); + dependencies[dep0]=globalObject[dep0]; + dependencies[dep1]=globalObject[dep1]; + dependencies[dep2]=globalObject[dep2]; + execute(globalObject,dependencies,useRequireJS); + return; + }(); return; })( this, @@ -67,6 +93,8 @@ function isPrimitive(value){ return !value||(typeOfValue!=="object"&&typeOfValue!=="function"); } +const returnOrThrowObjectType=function(){ + function valueIsPrimitiveError(value){ return( "\x22"+ @@ -77,8 +105,14 @@ function valueIsPrimitiveError(value){ ); } -if(isPrimitive(bwindow))throw valueIsPrimitiveError(bwindow); -if(isPrimitive(dependencies))throw valueIsPrimitiveError(dependencies); + return function(value){ + if(isPrimitive(value))throw valueIsPrimitiveError(value); + else return value; + }; +}(); + +returnOrThrowObjectType(bwindow); +returnOrThrowObjectType(dependencies); function isFunction(value){ return typeof value==="function"; @@ -102,15 +136,12 @@ function notAFunctionError(value){ }; }(); -const Bright=dependencies.Bright, - DOMOperation=dependencies.DOMOperation, +const Bright=returnOrThrowObjectType(dependencies.Bright), + DOMOperation=returnOrThrowObjectType(dependencies.DOMOperation), Slides=returnOrThrowFunction(dependencies.Slides); -if(isPrimitive(Bright))throw valueIsPrimitiveError(Bright); -if(isPrimitive(DOMOperation))throw valueIsPrimitiveError(DOMOperation); - -const True=true, - False=false; +const False=false, + True=true; const constructor_key="constructor", prototype_key="prototype", @@ -154,11 +185,9 @@ const svg_namespace="http://www.w3.org/2000/svg"; const newElement=createElementNS(svg_namespace,"svg"); attributesSetter(newElement,"version","1.1"); attributesSetter(newElement,"viewBox","0 0 4.4 4.4"); - let tempDocumentFragment, - tempElement; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); - tempElement=createElementNS(svg_namespace,"path"); + const tempElement=createElementNS(svg_namespace,"path"); attributesSetter(tempElement,"d","m 0 1 h 2 v -1 l 2 2 l -2 2 v -1 h -2 z"); attributesSetter(tempElement,"fill","#FFFFFF"); attributesSetter(tempElement,"stroke","#000000"); @@ -177,7 +206,6 @@ const svg_namespace="http://www.w3.org/2000/svg"; appendChildren(tempDocumentFragment,tempElement); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=tempElement=null; return newElement; }; }(); @@ -194,14 +222,12 @@ const spanWithTextAndLang=function(text,lang){ const newElement=createElement("span"); isNotEmpty(lang)&&smartSetDOMProperties(newElement,"lang",lang); if(isEmpty(text))return newElement; - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, createTextNode(text) ); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=null; return newElement; }; @@ -284,7 +310,7 @@ const counter_key="counter", const click_eventKey="click", change_eventKey="change"; -const aboutDate=new nDate(1686748584329); +const aboutDate=new nDate(1687526393826); const createTextNodeDescription=function(text){ const newObject=new Object_constructor(); @@ -317,8 +343,7 @@ const createAnchorWithTextDescription=function(href,text){ }; const aboutResource=function(target){ - if(isPrimitive(target))throw valueIsPrimitiveError(target); - target.type="document-fragment"; + returnOrThrowObjectType(target).type="document-fragment"; target.children=[ createPWithTextDescription("Slides in XHTML"), createPWithTextDescription("Author: Bright_Leader"), @@ -400,8 +425,7 @@ function inputElement_classes(){ "factory-date-"+(new nDate()-0) ); - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); +const tempDocumentFragment=createDocumentFragment(); const containerElement=createElement("div"); @@ -430,7 +454,6 @@ const toPageEvent=function(num){ bwindow.console.log(localApplication); }catch(_){ /* */ } } - tempFunction=null; return; }; @@ -456,14 +479,12 @@ const navigateButton=function(rightDirection){ click_eventKey, rightDirection?nextPageEvent:previousPageEvent ); - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, arrowSVG(rightDirection) ); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=null; return newElement; }; @@ -477,14 +498,12 @@ const switchPageDiv=function(rightDirection,hideOnPortrait){ newElement, hideOnPortrait_classes() ); - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, navigateButton(rightDirection) ); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=null; return newElement; }; @@ -534,8 +553,7 @@ const pageNavigationBarDiv=function(hideOnPortrait){ newElement, hideOnPortrait_classes() ); - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, spanWithTextAndLang("To page number:\x20","en"), @@ -544,7 +562,6 @@ const pageNavigationBarDiv=function(hideOnPortrait){ navigateToPageInputNumber() ); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=null; return newElement; }; @@ -567,7 +584,6 @@ const totalPageNumberInputText=function(){ isObjectType(tempValue=app[resources_key]) )?tempValue.length:"?" ); - tempValue=null; return; } ); @@ -588,8 +604,7 @@ const totalPageNumberIndicatorBarDiv=function(hideOnPortrait){ newElement, hideOnPortrait_classes() ); - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, spanWithTextAndLang("Total page number(s):\x20","en"), @@ -598,7 +613,6 @@ const totalPageNumberIndicatorBarDiv=function(hideOnPortrait){ totalPageNumberInputText() ); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=null; return newElement; }; @@ -614,8 +628,7 @@ const indicatorsDiv=function(isTop){ "indicators", "indicators-"+(isTop?"top":"bottom") ); - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, switchPageDiv(False,False), @@ -627,7 +640,6 @@ const indicatorsDiv=function(isTop){ switchPageDiv(True,False) ); appendChildren(newElement,tempDocumentFragment); - tempDocumentFragment=null; return newElement; }; @@ -684,7 +696,6 @@ const quickNavigationDiv=function(isTop){ ); appendChildren(newElement,tempDocumentFragment); } - tempValue=tempDocumentFragment=null; return; } ); @@ -729,10 +740,9 @@ appendChildren( function(){ const newElement=createElement("div"); smartAddClasses(newElement,"padding-vertical-default"); - let pageNumIndex, - tempDocumentFragment; + let pageNumIndex; pageNumIndex=-1; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, navigateToPage_aboutApp( @@ -745,7 +755,6 @@ appendChildren( ) ); appendChildren(newElement,tempDocumentFragment); - pageNumIndex=tempDocumentFragment=null; return newElement; }(), containerElement @@ -775,12 +784,15 @@ smartAddEventListener( "load", function(){ +const temp=bwindow.config; + Function_call[call_key]( - returnOrThrowFunction(localApplication.config), + returnOrThrowFunction(localApplication.configure), localApplication, - bwindow.config + temp ); toPageEvent(localApplication[counter_key]); +isObjectType(temp)&&(temp.app=localApplication); return; } @@ -792,8 +804,6 @@ toPageEvent(localApplication[counter_key]); appendChildren(newElement,tempDocumentFragment); -tempDocumentFragment=null; - return newElement; }; }(); @@ -802,7 +812,7 @@ const arrayLikeEvery=returnOrThrowFunction(Bright.arrayLikeEvery), getElementsByClassName=returnOrThrowFunction(DOMOperation.getElementsByClassName), replaceNode=returnOrThrowFunction(DOMOperation.replaceNode); -const bdocument=bwindow.document; +const bdocument=returnOrThrowObjectType(bwindow.document); const callbackFn=function(){ Function_call[call_key]( @@ -830,30 +840,25 @@ useRequireJS?( debugSwitch&&function(){ -let tempDate; +const tempDate=new nDate(); const bconsole=bwindow.console; try{ bconsole.log(bwindow); + bconsole.log(dependencies); bconsole.info(Bright); bconsole.info(DOMOperation); bconsole.info(Slides); bconsole.log(factory); bconsole.log(callbackFn); - tempDate=new nDate(); - bconsole.log(tempDate); bconsole.log(tempDate+""); bconsole.log(tempDate-0); -}catch(_){ /* */ }finally{ - - tempDate=null; - -} +}catch(_){ /* */ } return; }(); diff --git a/assets/js/stylesheets.js b/assets/js/stylesheets.js index 5595816f555b11fa9e84712903ec171fa9fe3c3f..066611cb9bd1b27bfc8e8c9a5db1efc906e4c269 100644 --- a/assets/js/stylesheets.js +++ b/assets/js/stylesheets.js @@ -7,17 +7,44 @@ return !value||(typeOfValue!=="object"&&typeOfValue!==typeFunction); }; - function valueIsPrimitiveError(value){ - return( - "\x22"+ - value+ - "\x22 (type:\x20"+ - (value!==null?typeof value:value)+ - ") is not an object type (an object or a function)!" - ); - } - - if(isPrimitive(globalObject))throw valueIsPrimitiveError(globalObject); + const returnOrThrowObjectType=function(){ + + function valueIsPrimitiveError(value){ + return( + "\x22"+ + value+ + "\x22 (type:\x20"+ + (value!==null?typeof value:value)+ + ") is not an object type (an object or a function)!" + ); + } + + return function(value){ + if(isPrimitive(value))throw valueIsPrimitiveError(value); + else return value; + }; + }(); + + returnOrThrowObjectType(globalObject); + + const Object_constructor={}.constructor; + + const tryES5CreateNullPrototypeObject=function(){ + + const create=Object_constructor.create; + const createIsFunction=typeof create===typeFunction; + + return function(){ + try{ + return returnOrThrowObjectType( + createIsFunction&& + create(null) + ); + }catch(_){ + return new Object_constructor(); + } + }; + }(); const dep0="Bright", dep1="DOMOperation"; @@ -37,24 +64,23 @@ [dep0,dep1], function(){ const args=arguments; - return execute( - globalObject, - { - "Bright":args[0], - "DOMOperation":args[1] - }, - useRequireJS - ); + const dependencies=tryES5CreateNullPrototypeObject(); + let index; + index=-1; + dependencies[dep0]=args[index+=1]; + dependencies[dep1]=args[index+=1]; + dependencies.define=define_; + dependencies.requirejs=requirejs_; + return execute(globalObject,dependencies,useRequireJS); } ) - ):execute( - globalObject, - { - "Bright":globalObject[dep0], - "DOMOperation":globalObject[dep1] - }, - useRequireJS - ); + ):function(){ + const dependencies=tryES5CreateNullPrototypeObject(); + dependencies[dep0]=globalObject[dep0]; + dependencies[dep1]=globalObject[dep1]; + execute(globalObject,dependencies,useRequireJS); + return; + }(); return; })( this, @@ -64,6 +90,8 @@ function isPrimitive(value){ return !value||(typeOfValue!=="object"&&typeOfValue!=="function"); } +const returnOrThrowObjectType=function(){ + function valueIsPrimitiveError(value){ return( "\x22"+ @@ -74,8 +102,14 @@ function valueIsPrimitiveError(value){ ); } -if(isPrimitive(bwindow))throw valueIsPrimitiveError(bwindow); -if(isPrimitive(dependencies))throw valueIsPrimitiveError(dependencies); + return function(value){ + if(isPrimitive(value))throw valueIsPrimitiveError(value); + else return value; + }; +}(); + +returnOrThrowObjectType(bwindow); +returnOrThrowObjectType(dependencies); function isFunction(value){ return typeof value==="function"; @@ -99,11 +133,8 @@ function notAFunctionError(value){ }; }(); -const Bright=dependencies.Bright, - DOMOperation=dependencies.DOMOperation; - -if(isPrimitive(Bright))throw valueIsPrimitiveError(Bright); -if(isPrimitive(DOMOperation))throw valueIsPrimitiveError(DOMOperation); +const Bright=returnOrThrowObjectType(dependencies.Bright), + DOMOperation=returnOrThrowObjectType(dependencies.DOMOperation); const constructor_key="constructor", prototype_key="prototype", @@ -118,7 +149,8 @@ const Function_call=Function_prototype[call_key]; const createElement=returnOrThrowFunction(DOMOperation.createElement), smartSetDOMProperties=returnOrThrowFunction(DOMOperation.smartSetDOMProperties), appendChildren=returnOrThrowFunction(DOMOperation.appendChildren), - createDocumentFragment=returnOrThrowFunction(DOMOperation.createDocumentFragment); + createDocumentFragment=returnOrThrowFunction(DOMOperation.createDocumentFragment), + arrayLikeMap=returnOrThrowFunction(Bright.arrayLikeMap); const createStylesheet=function(path){ const newElement=createElement("link"); @@ -131,19 +163,25 @@ const createStylesheet=function(path){ return newElement; }; -const bdocument=bwindow.document; +const bdocument=returnOrThrowObjectType(bwindow.document); + +const basePath="./static/css/"; const callbackFn=function(){ - let tempDocumentFragment; - tempDocumentFragment=createDocumentFragment(); + const tempDocumentFragment=createDocumentFragment(); appendChildren( tempDocumentFragment, - createStylesheet("./static/css/pages"), - createStylesheet("./static/css/pages.css3") + Function_call[call_key]( + arrayLikeMap, + [ + basePath+"pages", + basePath+"pages.css3" + ], + createStylesheet + ) ); appendChildren(bdocument.head,tempDocumentFragment); - tempDocumentFragment=null; return; }; diff --git a/static/js/Bright.js b/static/js/Bright.js index 89f3af0546b01e84093fda94b2477e078148ca85..79a85c33dc91b01835b814d35f2cab5bdd7faf67 100644 --- a/static/js/Bright.js +++ b/static/js/Bright.js @@ -1,14 +1,14 @@ /*! Bright.js -date 1686226515971 [Thu Jun 08 2023 20:15:15 GMT+0800 (China Standard Time)] +date 1687485630671 [Fri Jun 23 2023 10:00:30 GMT+0800 (China Standard Time)] (c) 2023 Bright_Leader Licensed under the Apache-2.0. Release information: -- http://gitee.com/MengZian/bright-browser/releases/tag/20230608 -- http://gitcode.net/MengZian/bright-browser/-/releases/20230608 +- http://gitee.com/MengZian/bright-browser/releases/tag/20230623 +- http://gitcode.net/MengZian/bright-browser/-/releases/20230623 */ -(function(t,n){"use strict";function r(t){return'"'+t+'" (type: '+(null!==t?typeof t:t)+") is not an object type (an object or a function)!"}var e="function",i=function(t){var n=typeof t;return!t||"object"!==n&&n!==e};if(i(t))throw r(t);var o="constructor",u="prototype",f=r[o],c={}[o],l=[][o],s=f[u],a=c[u],h="call",w=s[h],y=a.hasOwnProperty,p=function(t,n,e){if(i(e))throw r(e);var o,u;return o=w[h](y,e,n),u=e[n],function(){return e[n]===t&&(!o&&w[h](y,e,n)?delete e[n]:e[n]=u,o=w[h](y,e,n),n in e&&e[n]!==t&&(u=e[n])),t}},d=function(t){var n=new l(1);return n[0]=t,n},L="Bright",k="relinquish",b="useRequireJS";var I;var m=typeof define===e&&typeof(I=define)===e&&typeof requirejs===e&&!i(I.amd);m?I(d("exports"),function(e){if(i(e))throw r(e);return e[k]=p(e,L,t),e[b]=m,L in t||(t[L]=e),n(e,t)}):t[L]=function(){var r=new c;return r[k]=p(r,L,t),r[b]=m,n(r,t)}()})(this,function(t,n){"use strict"; +(function r(n,t){"use strict";var e,i,u,o,f,a,c,s,l,y,h,v,p,d,w,L,k,b,I,m,g,j,O="function",x=function(r){var n=typeof r;return!r||"object"!==n&&n!==O},S=function(){function r(r){return'"'+r+'" (type: '+(null!==r?typeof r:r)+") is not an object type (an object or a function)!"}return function(n){if(x(n))throw r(n);return n}}();S(n),u={}[e="constructor"],o=[][e],f=r[e][i="prototype"],a=u[i],s=f[c="call"],l=a.hasOwnProperty,y=function(r,n,t){var e,i;return S(t),e=s[c](l,t,n),i=t[n],function(){return t[n]===r&&(!e&&s[c](l,t,n)?delete t[n]:t[n]=i,e=s[c](l,t,n),n in t&&t[n]!==r&&(i=t[n])),r}},m=u.create,g=typeof m===O,h=function(){try{return S(g&&m(null))}catch(r){return new u}},v=function(r){var n=new o(1);return n[0]=r,n},p="Bright",d="relinquish",w="useRequireJS",L="isAsynchronous",I=typeof define===O&&typeof(k=define)===O&&typeof requirejs===O&&!x(k.amd),b=false,I?k(v("exports"),function(r){return S(r)[d]=y(r,p,n),r[w]=I,r[L]=b,p in n||(n[p]=r),t(r,n)}):n[p]=((j=h())[d]=y(j,p,n),j[w]=I,j[L]=b,t(j,n)),b=true})(this,function(r,n){"use strict"; /* @license Copyright 2023 Bright_Leader @@ -23,4 +23,4 @@ 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. -*/function r(t){var n=typeof t;return!t||"object"!==n&&"function"!==n}function e(t){return'"'+t+'" (type: '+(null!==t?typeof t:t)+") is not an object type (an object or a function)!"}function i(t){return t===t}function o(t){return void 0===t||null===t}function u(t){return"number"===typeof t}function f(t,n){return tn?t:n}function l(t){return"function"===typeof t}function s(t){return'"'+t+'" (type: '+(null!==t?typeof t:t)+") is not a function!"}function a(t){return t!==t}function h(t){return"symbol"===typeof t}function w(){return function(){return this}}if(r(t))throw e(t);var y=2147483647,p=-2147483648,d=function(t){return u(t)&&(t<=y&&t>=p?t|0===t:t%1===0)},L=1/0,k=-1/0,b=function(t){return t!==L&&t!==k},I=function(t){return u(t)&&i(t)&&b(t)},m=function(t){return I(t)?t-t%1:0|t},g=4294967295,j=function(t){return d(t)&&t>=0&&t<=g},O=function(t){return d(t)&&t<=y&&t>=p},x=function(t,n,r){var e,i;var o=f(e=m(t),i=m(n)),u=c(e,i),l=m(r),s=u-o+1;return e=i=null,m(o!==u?l>u?(l-o)%s+o:l=u)return-1;for(f>=0?c=f:(c=u+f)<0&&(c=0);c=0?f(c,u-1):u+c;l>=0;){if(l in i&&i[l]===t)return l;l-=1}return u=c=l=null,-1},J=true,X=function(t,n){if(!l(t))throw s(t);var i=this;if(r(i))throw e(i);var u,f,c,a;for(u=v(i[K]),f=o(n),c=0;c=0;)(a=f in i)&&(c=i[f]),f-=1;if(!a)throw Y}for(;f>=0;)f in i&&(c=t(c,i[f],f,i)),f-=1;return o=u=f=a=null,c},nt=9007199254740991,rt=function(t){var n=m(t);return n<=0?0:n===L?nt:f(n,nt)},et=function(t,n){if(!l(t))throw s(t);var i=this;if(r(i))throw e(i);var u,f,c,a;for(u=rt(i[K]),f=o(n),c=0;c0;)h in o?G(o,s,o[h],J,J,J):delete o[s],h+=L,s+=L,p-=1;return u=l=s=a=h=w=y=p=d=L=null,o},ft=function(t,n,i){var o=this;if(r(o))throw e(o);var u,l,s,a,h;for(u=rt(o[K]),s=(l=m(n))<0?c(u+l,0):f(l,u),h=(a=i===it?u:m(i))<0?c(u+a,0):f(a,u);s=0?f=u:(f=o+u)<0&&(f=0);f=(u=rt(n[K])))return G(t,bt,it,J,C,J),new st(it,J);if(G(t,It,i+1,J,C,J),o===pt)return new st(i,C);if(f=n[i],o===dt)c=f;else{if(o!==Lt)throw"Unsupported array iteration kind: "+o;(c=new M(2))[0]=i,c[1]=f}return new st(c,C)},null,null,C,C,C);return wt(n,"toStringTag","Array Iterator",C,C,J),G(n,bt,null,J,C,C),G(n,It,0,J,C,C),G(n,mt,dt,J,C,C),G(t,A,n,J,C,C),t}(),jt=function(t,n){if(r(t))throw e(t);var i=new gt;return G(i,bt,t,J,C,J),G(i,It,0,J,C,J),G(i,mt,n,J,C,J),i},Ot=function(t){return function(){var n=this;if(r(n))throw e(n);return jt(n,t)}},xt=Ot(Lt),vt=Ot(pt),St=Ot(dt),At=function(){var t=function(t,n,r){return U[E](W,r,t)===n};return function(n){if(r(n))throw e(n);return U[E](Q,n,t)}}(),Et=function(t,n){if(r(t))throw e(t);var i,o;for(i=0,o=U[E](W,t,n);-1!==o;)i+=1,o=U[E](W,t,n,o+1);return o=null,i},Ft=function(t,n){if(r(t))throw e(t);var i=new M;var o,u;for(o=0,u=U[E](W,t,n);-1!==u;)i[o]=u,o+=1,u=U[E](W,t,n,u+1);return o=u=null,i},Rt=function(){var t=R.create,n=l(t);return function(){var e;try{if(!n)throw t;if(r(e=t(null)))throw e;return e}catch(t){return new R}}}(),Mt=function(t,n,i,o,u){if(r(t))throw e(t);if(r(n))throw e(n);var f;for(f in n)U[E](q,n,f)&&G(t,f,n[f],i,o,u);return f=null,t},Pt=function(){var t=M[A],n="toString",i="toLocaleString",o="concat",u="join",f="pop",c="push",s="reverse",a="shift",h="slice",w="sort",y="splice",p="unshift",d=t[o],L=t[u],k=t[f],b=t[c],I=t[s],m=t[a],g=t[h],j=t[w],O=t[y],x=t[p],v=l(R.seal),S=(v?t:N)[n],E=(v?t:N)[i],F=function(t){if(r(t))throw e(t);return t[n]=S,t[i]=E,t[o]=d,t[u]=L,t[f]=k,t[c]=b,t[s]=I,t[a]=m,t[h]=g,t[w]=j,t[y]=O,t[p]=x,t},P=function(t){if(r(t))throw e(t);return t.indexOf=W,t.lastIndexOf=D,t.every=X,t.some=Z,t.forEach=z,t.map=H,t.filter=Q,t.reduce=$,t.reduceRight=tt,t},U="copyWithin",q="entries",V="fill",_="find",B="findIndex",T="keys",Y="values",nt=function(t){if(r(t))throw e(t);var n,i,o;for(n=0,o=(i=[U,q,V,_,B,T,Y])[K];nn?r:n}function a(r){return"function"===typeof r}function c(r){return r!==r}function s(r){return"symbol"===typeof r}function l(){return function(){return this}}var y,h,v,p,d,w,L,k,b,I,m,g,j,O,x,S,A,E,F,R,M,P,N,U,q,C,V,K,_,B,T,W,D,J,X,Z,z,G,H,Q,Y,$,rr,nr,tr,er,ir,ur,or,fr,ar,cr,sr,lr,yr,hr,vr,pr,dr,wr,Lr,kr,br,Ir,mr,gr,jr,Or,xr,Sr,Ar,Er,Fr,Rr,Mr,Pr,Nr,Ur,qr,Cr,Vr,Kr,_r,Br,Tr,Wr,Dr,Jr,Xr,Zr,zr,Gr,Hr,Qr,Yr,$r,rn,nn,tn,en,un,on,fn,an,cn,sn,ln,yn,hn,vn,pn,dn,wn,Ln,kn,bn,In,mn,gn,jn,On,xn,Sn,An,En,Fn,Rn=function(){function r(r){return'"'+r+'" (type: '+(null!==r?typeof r:r)+") is not an object type (an object or a function)!"}return function(n){if(t(n))throw r(n);return n}}();return Rn(r),y=2147483647,h=-2147483648,v=function(r){return u(r)&&(r<=y&&r>=h?r|0===r:r%1===0)},p=1/0,d=-1/0,w=function(r){return r!==p&&r!==d},L=function(r){return u(r)&&e(r)&&w(r)},k=function(r){return L(r)?r-r%1:0|r},b=4294967295,I=function(r){return v(r)&&r>=0&&r<=b},m=function(r){return v(r)&&r<=y&&r>=h},g=function(r,n,t){var e=k(r),i=k(n),u=o(e,i),a=f(e,i),c=k(t),s=a-u+1;return k(u!==a?c>a?(c-u)%s+u:c=o)return-1;for(t>=0?e=t:(e=o+t)<0&&(e=0);e=0?o(t,f-1):f+t;e>=0;){if(e in u&&u[e]===r)return e;e-=1}return-1},D=true,J=function(r,n){var t,e,u,o,f;for(K(r),t=Rn(this),e=j(t[C]),u=i(n),o=0;o=0;)(f=u in t)&&(o=t[u]),u-=1;if(!f)throw Q}for(;u>=0;)u in t&&(o=r(o,t[u],u,t)),u-=1;return o},rr=9007199254740991,nr=function(r){var n=k(r);return n<=0?0:n===p?rr:o(n,rr)},tr=function(r,n){var t,e,u,o,f;for(K(r),t=Rn(this),e=nr(t[C]),u=i(n),o=0;o0;)h in u?z(u,y,u[h],D,D,D):delete u[y],h+=i,y+=i,v-=1;return u},or=function(r,n,t){for(var e=Rn(this),i=nr(e[C]),u=k(n),a=t===er?i:k(t),c=u<0?f(i+u,0):o(u,i),s=a<0?f(i+a,0):o(a,i);c=0?e=t:(e=u+t)<0&&(e=0);e=nr(r[C]))return z(o,Lr,er,D,U,D),new cr(er,D);if(z(o,kr,n+1,D,U,D),e===pr)return new cr(n,U);if(i=r[n],e===dr)u=i;else{if(e!==wr)throw"Unsupported array iteration kind: "+e;(u=new F(2))[0]=n,u[1]=i}return new cr(u,U)},null,null,U,U,U);return hr(n,"toStringTag","Array Iterator",U,U,D),z(n,Lr,null,D,U,U),z(n,kr,0,D,U,U),z(n,br,dr,D,U,U),z(r,x,n,D,U,U),r}(),mr=function(r,n){Rn(r);var t=new Ir;return z(t,Lr,r,D,U,D),z(t,kr,0,D,U,D),z(t,br,n,D,U,D),t},jr=(gr=function(r){return function(){return mr(Rn(this),r)}})(wr),Or=gr(pr),xr=gr(dr),Wr=function(r,n,t){return P[S](T,t,r)===n},Sr=function(r){return P[S](H,r,Wr)},Ar=function(r,n){var t,e;for(t=0,e=P[S](T,r,n);-1!==e;)t+=1,e=P[S](T,r,n,e+1);return t},Er=function(r,n){for(var t=new F,e=0,i=P[S](T,r,n);-1!==i;)t[e]=i,e+=1,i=P[S](T,r,n,i+1);return t},Dr=E.create,Jr=a(Dr),Fr=function(){try{return Rn(Jr&&Dr(null))}catch(r){return new E}},Rr=function(r,n,t,e,i){var u;for(u in Rn(r),Rn(n),n)P[S](N,n,u)&&z(r,u,n[u],t,e,i);return r},Xr=F[x],Zr="toString",zr="toLocaleString",Hr="join",Qr="pop",Yr="push",$r="reverse",rn="shift",nn="slice",tn="sort",en="splice",un="unshift",on=Xr[Gr="concat"],fn=Xr[Hr],an=Xr[Qr],cn=Xr[Yr],sn=Xr[$r],ln=Xr[rn],yn=Xr[nn],hn=Xr[tn],vn=Xr[en],pn=Xr[un],dn=a(E.seal),wn=(dn?Xr:M)[Zr],Ln=(dn?Xr:M)[zr],kn=function(r){return Rn(r)[Zr]=wn,r[zr]=Ln,r[Gr]=on,r[Hr]=fn,r[Qr]=an,r[Yr]=cn,r[$r]=sn,r[rn]=ln,r[nn]=yn,r[tn]=hn,r[en]=vn,r[un]=pn,r},bn=function(r){return Rn(r).indexOf=T,r.lastIndexOf=W,r.every=J,r.some=X,r.forEach=Z,r.map=G,r.filter=H,r.reduce=Y,r.reduceRight=$,r},In="copyWithin",mn="entries",gn="fill",jn="find",On="findIndex",xn="keys",Sn="values",An=function(r){var n,t,e;for(Rn(r),n=0,e=(t=[In,mn,gn,jn,On,xn,Sn])[C];n= 1686226515971 +- Bright.js date >= 1687485630671 Release information: -- http://gitee.com/MengZian/bright-browser/releases/tag/20230608 -- http://gitcode.net/MengZian/bright-browser/-/releases/20230608 +- http://gitee.com/MengZian/bright-browser/releases/tag/20230623 +- http://gitcode.net/MengZian/bright-browser/-/releases/20230623 */ -(function(n,t){"use strict";function e(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not an object type (an object or a function)!"}var r,i,u,o,f,c,a,l,s,h,w,p,v,d,m,y,E,N="function",T=function(n){var t=typeof n;return!n||"object"!==t&&t!==N};if(T(n))throw e(n);i="prototype",u=e[r="constructor"],o={}[r],f=u[i],c=o[i],l=f[a="call"],s=c.hasOwnProperty,h=function(n,t,r){if(T(r))throw e(r);var i,u;return i=l[a](s,r,t),u=r[t],function(){return r[t]===n&&(!i&&l[a](s,r,t)?delete r[t]:r[t]=u,i=l[a](s,r,t),t in r&&r[t]!==n&&(u=r[t])),n}},w="Bright",p="DOMOperation",v="relinquish",d="useRequireJS",(y=typeof define===N&&typeof(m=define)===N&&typeof requirejs===N&&!T(m.amd))?m(["exports",w],function(r){if(T(r))throw e(r);return r[v]=h(r,p,n),r[d]=y,p in n||(n[p]=r),t(r,n,{Bright:arguments[1]})}):n[p]=((E=new o)[v]=h(E,p,n),E[d]=y,t(E,n,{Bright:n[w]}))})(this,function(n,t,e){"use strict"; +(function n(e,t){"use strict";var r,u,i,o,c,a,f,s,l,v,p,d,m,y,h,E,N,w,T,D,g,O,C="function",b=function(n){var e=typeof n;return!n||"object"!==e&&e!==C},x=function(){function n(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not an object type (an object or a function)!"}return function(e){if(b(e))throw n(e);return e}}();x(e),i={}[r="constructor"],o=n[r][u="prototype"],c=i[u],f=o[a="call"],s=c.hasOwnProperty,l=function(n,e,t){var r,u;return x(t),r=f[a](s,t,e),u=t[e],function(){return t[e]===n&&(!r&&f[a](s,t,e)?delete t[e]:t[e]=u,r=f[a](s,t,e),e in t&&t[e]!==n&&(u=t[e])),n}},T=i.create,D=typeof T===C,v=function(){try{return x(D&&T(null))}catch(n){return new i}},p="Bright",d="DOMOperation",m="relinquish",y="useRequireJS",h="isAsynchronous",w=typeof define===C&&typeof(E=define)===C&&typeof requirejs===C&&!b(E.amd),N=false,w?E(["exports",p],function(n){x(n)[m]=l(n,d,e),n[y]=w,n[h]=N,d in e||(e[d]=n);var r=v();return r[p]=arguments[1],t(n,e,r)}):e[d]=((O=v())[m]=l(O,d,e),O[y]=w,O[h]=N,(g=v())[p]=e[p],t(O,e,g)),N=true})(this,function(n,e,t){"use strict"; /* @license Copyright 2023 Bright_Leader @@ -26,4 +26,4 @@ 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. -*/function r(n){var t=typeof n;return!n||"object"!==t&&"function"!==t}function i(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not an object type (an object or a function)!"}function u(n){var t=typeof n;return!!n&&("object"===t||"function"===t)}function o(n){return void 0===n||null===n}function f(n){return null!==n&&void 0!==n}function c(n){return"function"===typeof n}function a(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a DOM element ( http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614 )!"}function l(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a DOM node ( http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247 )!"}function s(){throw"This feature is unsupported!"}var h,w,p,v,d,m,y,E,N,T,D,g,O,C,x,b,S,A,M,_,L,I,P,B,R,F,j,k,U,q,V,G,Y,Q,W,X,H,J,z,K,Z,$,nn,tn,en,rn,un,on,fn,cn,an,ln,sn,hn,wn,pn,vn,dn,mn,yn,En,Nn,Tn,Dn,gn,On,Cn,xn,bn,Sn,An,Mn,_n,Ln,In,Pn,Bn,Rn,Fn,jn,kn,Un,qn,Vn,Gn,Yn,Qn,Wn,Xn,Hn,Jn,zn,Kn,Zn;if(r(n))throw i(n);if(r(t))throw i(t);if(t.window!==t)throw"This script may not currently be in browser environment!";if(r(e))throw i(e);if(r(h=e.Bright))throw i(h);return p="prototype",v="call",d=true,m=false,y=r[w="constructor"],E={}[w],N=[][w],T=y[p],D=E[p],g=N[p],O=T[v],C=T.apply,x=D.hasOwnProperty,b=function(n){return u(n)&&n[w]===N},S=/(?:)/[w],A=""[w][p],M=D.toString,n.cspUnsafeEval=(Cn=A.match,function(){var n;try{return!(c(n=new y("x,y","return x+y;"))&&3===n(1,2))}catch(t){return o(n)&&u(t)&&("[object Error]"===O[v](M,t)||b(O[v](Cn,t,new S("unsafe-eval|CSP","g"))))}finally{n=null}}),n.xmlInnerText=function(){function n(n){switch(n){case"<":return"<";case"&":return"&";case">":return">";case"'":return"'";case'"':return"""}return n}var t=A.replace;return function(e){return f(e)?O[v](t,e,new S("\\x3C|\\x26|\\x3E|\\x27|\\x22","g"),n):""}}(),_=function(){function n(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a function!"}return function(t){if(c(t))return t;throw n(t)}}(),xn=_(h.isArrayLike),L=function(n){return u(n)&&O[v](C,xn,this,arguments)},bn=_(h.isPlainObject),I=function(n){return u(n)&&O[v](C,bn,this,arguments)},P=t.Element,B=t.Document,R=t.Node,F=P[p],j=B[p],k=R[p],U=k.ELEMENT_NODE||1,q=k.ATTRIBUTE_NODE||2,V=k.TEXT_NODE||3,G=k.CDATA_SECTION_NODE||4,Y=k.PROCESSING_INSTRUCTION_NODE||7,Q=k.COMMENT_NODE||8,W=k.DOCUMENT_NODE||9,X=k.DOCUMENT_FRAGMENT_NODE||11,H="nodeType",J="nodeName",z="nodeValue",K=function(n){var t;return n instanceof B&&(t=H)in n&&n[t]===W&&(t=J)in n&&"#document"===n[t]&&(t=z)in n&&null===n[t]},Z="attributes",$=function(n){var t;return n instanceof P&&(t=H)in n&&n[t]===U&&J in n&&(t=z)in n&&null===n[t]&&(t=Z)in n&&L(n[t])},nn="length",tn=t.document,en=function(){function e(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a text node ( http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772 )!"}var u,o=j.createTextNode,f=t.Text,a=c(f),l=function(n){var t,e;return n instanceof f&&L(n)&&(t=H)in n&&n[t]===V&&(t=J)in n&&"#text"===n[t]&&(t=z)in n&&(e="data")in n&&n[t]===n[e]},s=f[p],w=s.splitText,d=function(n,t){if(r(n))throw i(n);if(!l(n))throw e(n);return O[v](w,n,t)};return n.smartSplitTextNode=(u=_(h.roundInteger),function(n,t){if(r(n))throw i(n);return d(n,u(0,n[nn]-1,t))}),n.isTextNode=l,n.isNotATextNodeError=e,n.splitTextNode=d,function(n){return a?new f(n):O[v](o,tn,n)}}(),rn=_(h.arrayLikeFindIndex),un=_(h.arrayLikeFilter),on=F.getAttribute,fn=j.getElementsByTagName,n.getElementsByTagName=(Sn=function(n,t){return O[v](fn,K(t)?t:tn,n)},n.getElementById=function(n,t){var e,r;return(r=O[v](rn,e=Sn("*",t),function(t){var e;return $(t)&&(O[v](on,t,e="id")===n||e in t&&t[e]===n)}))>-1&&u(e)&&r in e?e[r]:e=r=null},n.getElementsByName=function(n,t){return O[v](un,Sn("*",t),function(t){var e;return $(t)&&(O[v](on,t,e="name")===n||e in t&&t[e]===n)})},Sn),n.createDocumentFragment=(An=j.createDocumentFragment,Mn=t.DocumentFragment,_n=c(Mn),n.isDocumentFragment=function(n){var t;return n instanceof Mn&&(t=H)in n&&n[t]===X&&(t=J)in n&&"#document-fragment"===n[t]&&(t=z)in n&&null===n[t]},function(){return _n?new Mn:O[v](An,tn)}),cn=function(n){return _(n),function t(e,i,u){var o,f;if(r(i))n(e,i,u);else if(L(i)){for(o=0,f=i[nn];o-1:c(t)&&O[v](b,Y(n),t)?d:m},n.getElementsByClassName=function(n,t){return O[v](un,O[v](fn,K(t)?t:tn,"*"),function(t){return u(t)&&M(t,n)})},M),e=(t=function(n){return _(n),function(t,e){return n(t,L(e)?e:O[v](On,arguments,1))}})((P=" ",function(n,t){if(r(n))throw i(n);var e;return e=q(O[v](U,Y(n),P),P,t,d),$(n)?O[v](En,n,V,e):n[G]=e,e=null,n})),B="",a=function(n){if(r(n))throw i(n);return $(n)?O[v](En,n,V,B):n[G]=B,n},l=t((R=g.splice,F=function(n,t){if(r(n))throw i(n);var u,o;return u=Y(n),r(t)?o=O[v](Q,u,t):c(t)&&(o=O[v](rn,u,t)),f(o)&&o>-1&&(O[v](R,u,o,1),a(n),e(n,u),o=null),u=null,n},function(n,t){if(r(n))throw i(n);var e,u;for(e=0,u=t[nn];e":return">";case"'":return"'";case'"':return"""}return n}var e=x.replace;return function(t){return o(t)?D[p](e,t,new b("\\x3C|\\x26|\\x3E|\\x27|\\x22","g"),n):""}}(),S=function(){function n(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a function!"}return function(e){if(c(e))return e;throw n(e)}}(),bn=S(s.isArrayLike),M=function(n){return u(n)&&D[p](g,bn,this,arguments)},xn=S(s.isPlainObject),L=function(n){return u(n)&&D[p](g,xn,this,arguments)},_=e.Element,I=e.Document,P=e.Node,R=_[v],k=I[v],B=P[v],F=B.ELEMENT_NODE||1,j=B.ATTRIBUTE_NODE||2,U=B.TEXT_NODE||3,q=B.CDATA_SECTION_NODE||4,V=B.PROCESSING_INSTRUCTION_NODE||7,G=B.COMMENT_NODE||8,Y=B.DOCUMENT_NODE||9,Q=B.DOCUMENT_FRAGMENT_NODE||11,W="nodeType",X="nodeName",H="nodeValue",J=function(n){var e;return n instanceof I&&(e=W)in n&&n[e]===Y&&(e=X)in n&&"#document"===n[e]&&(e=H)in n&&null===n[e]},z="attributes",K=function(n){var e;return n instanceof _&&(e=W)in n&&n[e]===F&&X in n&&(e=H)in n&&null===n[e]&&(e=z)in n&&M(n[e])},Z="length",$=e.document,nn=function(){function t(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a text node ( http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772 )!"}var r,u=k.createTextNode,i=e.Text,o=c(i),a=function(n){var e,t;return n instanceof i&&M(n)&&(e=W)in n&&n[e]===U&&(e=X)in n&&"#text"===n[e]&&(e=H)in n&&(t="data")in n&&n[e]===n[t]},f=i[v].splitText,l=function(n,e){if(!a(ee(n)))throw t(n);return D[p](f,n,e)};return n.smartSplitTextNode=(r=S(s.roundInteger),function(n,e){return l(ee(n),r(0,n[Z]-1,e))}),n.isTextNode=a,n.isNotATextNodeError=t,n.splitTextNode=l,function(n){return o?new i(n):D[p](u,$,n)}}(),en=S(s.arrayLikeFindIndex),tn=S(s.arrayLikeFilter),rn=R.getAttribute,un=k.getElementsByTagName,n.getElementsByTagName=(An=function(n,e){return D[p](un,J(e)?e:$,n)},n.getElementById=function(n,e){var t=An("*",e),r=D[p](en,t,function(e){var t;return K(e)&&(D[p](rn,e,t="id")===n||t in e&&e[t]===n)});return r>-1&&u(t)&&r in t?t[r]:null},n.getElementsByName=function(n,e){return D[p](tn,An("*",e),function(e){var t;return K(e)&&(D[p](rn,e,t="name")===n||t in e&&e[t]===n)})},An),n.createDocumentFragment=(Sn=k.createDocumentFragment,Mn=e.DocumentFragment,Ln=c(Mn),n.isDocumentFragment=function(n){var e;return n instanceof Mn&&(e=W)in n&&n[e]===Q&&(e=X)in n&&"#document-fragment"===n[e]&&(e=H)in n&&null===n[e]},function(){return Ln?new Mn:D[p](Sn,$)}),on=function(){function e(n){return'"'+n+'" (type: '+(null!==n?typeof n:n)+") is not a DOM element ( http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614 )!"}return n.isNotAnElementError=e,function(n){if(K(n))return n;throw e(n)}}(),cn="decorator",an=function n(e){S(e);var t=function n(t,u,i){var o,a;if(r(u))e(t,u,i);else if(M(u))for(o=0,a=u[Z];o-1:c(e)&&D[p](_,G(n),e)?m:d},n.getElementsByClassName=function(n,e){return D[p](tn,D[p](un,J(e)?e:$,"*"),function(e){return u(e)&&I(e,n)})},I),t=function(n,e){return K(ee(n))?D[p](Nn,n,q,e):n[V]=e,n},a=(e=function n(e){S(e);var t=function(n,t){return e(n,M(t)?t:D[p](On,arguments,1))};return t[cn]=n,t})((P=" ",function(n,e){return t(ee(n),U(D[p](j,G(n),P),P,e,m))})),f=function(n){return t(n,"")},v=e((R=T.splice,k=function(n,e){var t,u=G(ee(n));return r(e)?t=D[p](Y,u,e):c(e)&&(t=D[p](en,u,e)),o(t)&&t>-1&&(D[p](R,u,t,1),f(n),a(n,u)),n},function(n,e){var t,r;for(ee(n),t=0,r=e[Z];t= 1686226515971 -- DOMOperation.js date >= 1686226584190 +- Bright.js date >= 1687485630671 +- DOMOperation.js date >= 1687494211485 */ (function exportFunction(globalObject,factory){"use strict"; /* @@ -41,22 +41,30 @@ http://www.ecma-international.org/wp-content/uploads/ECMA-262_6th_edition_june_2 return !value||(typeOfValue!=="object"&&typeOfValue!==typeFunction); }; - function valueIsPrimitiveError(value){ - return( - "\x22"+ - value+ - "\x22 (type:\x20"+ - (value!==null?typeof value:value)+ - ") is not an object type (an object or a function)!" - ); - } + const returnOrThrowObjectType=function(){ + + function valueIsPrimitiveError(value){ + return( + "\x22"+ + value+ + "\x22 (type:\x20"+ + (value!==null?typeof value:value)+ + ") is not an object type (an object or a function)!" + ); + } + + return function(value){ + if(isPrimitive(value))throw valueIsPrimitiveError(value); + else return value; + }; + }(); - if(isPrimitive(globalObject))throw valueIsPrimitiveError(globalObject); + returnOrThrowObjectType(globalObject); const constructor_key="constructor", prototype_key="prototype"; - const Function_constructor=valueIsPrimitiveError[constructor_key], + const Function_constructor=exportFunction[constructor_key], Object_constructor={}[constructor_key]; const Function_prototype=Function_constructor[prototype_key], @@ -68,7 +76,7 @@ http://www.ecma-international.org/wp-content/uploads/ECMA-262_6th_edition_june_2 Object_hasOwnProperty=Object_prototype.hasOwnProperty; const relinquishFunction=function(item,key,target){ - if(isPrimitive(target))throw valueIsPrimitiveError(target); + returnOrThrowObjectType(target); let targetOriginallyHasOwnTargetProperty, targetOriginalTargetPropertyValue; targetOriginallyHasOwnTargetProperty=Function_call[call_key](Object_hasOwnProperty,target,key); @@ -91,6 +99,23 @@ http://www.ecma-international.org/wp-content/uploads/ECMA-262_6th_edition_june_2 }; }; + const tryES5CreateNullPrototypeObject=function(){ + + const create=Object_constructor.create; + const createIsFunction=typeof create===typeFunction; + + return function(){ + try{ + return returnOrThrowObjectType( + createIsFunction&& + create(null) + ); + }catch(_){ + return new Object_constructor(); + } + }; + }(); + /* explicitly informs dependenc(y/ies) */ const dep0="Bright", dep1="DOMOperation"; @@ -98,7 +123,8 @@ http://www.ecma-international.org/wp-content/uploads/ECMA-262_6th_edition_june_2 const name="Slides"; const relinquish_key="relinquish", - useRequireJS_key="useRequireJS"; + useRequireJS_key="useRequireJS", + isAsynchronous_key="isAsynchronous"; /* eslint { "no-undef": [ @@ -112,7 +138,8 @@ http://www.ecma-international.org/wp-content/uploads/ECMA-262_6th_edition_june_2 ESLint [ http://eslint.org/ ] configurations */ - let define_; + let define_, + isAsynchronous; const useRequireJS=( typeof define===typeFunction&& /* eslint-disable-line no-undef */ typeof (define_=define)===typeFunction&& /* eslint-disable-line no-undef */ @@ -120,36 +147,38 @@ ESLint [ http://eslint.org/ ] configurations !isPrimitive(define_.amd) ); /* RequireJS included? [ http://requirejs.org/ ] (based on version 2.0.4 [ http://requirejs.org/docs/release/2.0.4/comments/require.js ] ) */ + isAsynchronous=false; + useRequireJS?( define_( [dep0,dep1], function(){ const args=arguments; - const product=factory( - { - "Bright":args[0], - "DOMOperation":args[1] - }, - globalObject - ); + const dependencies=tryES5CreateNullPrototypeObject(); + let index; + index=-1; + dependencies[dep0]=args[index+=1]; + dependencies[dep1]=args[index+=1]; + const product=factory(dependencies,globalObject); product[relinquish_key]=relinquishFunction(product,name,globalObject); product[useRequireJS_key]=useRequireJS; + product[isAsynchronous_key]=isAsynchronous; name in globalObject||(globalObject[name]=product); return product; } ) ):(globalObject[name]=function(){ - const product=factory( - { - "Bright":globalObject[dep0], - "DOMOperation":globalObject[dep1] - }, - globalObject - ); + const dependencies=tryES5CreateNullPrototypeObject(); + dependencies[dep0]=globalObject[dep0]; + dependencies[dep1]=globalObject[dep1]; + const product=factory(dependencies,globalObject); product[relinquish_key]=relinquishFunction(product,name,globalObject); product[useRequireJS_key]=useRequireJS; + product[isAsynchronous_key]=isAsynchronous; return product; }()); + + isAsynchronous=true; return; })( this, @@ -174,6 +203,8 @@ function isPrimitive(value){ return !value||(typeOfValue!=="object"&&typeOfValue!=="function"); } +const returnOrThrowObjectType=function(){ + function valueIsPrimitiveError(value){ return( "\x22"+ @@ -184,7 +215,13 @@ function valueIsPrimitiveError(value){ ); } -if(isPrimitive(dependencies))throw valueIsPrimitiveError(dependencies); + return function(value){ + if(isPrimitive(value))throw valueIsPrimitiveError(value); + else return value; + }; +}(); + +returnOrThrowObjectType(dependencies); /* helper function(s) */ @@ -212,11 +249,8 @@ This functions comes in handy when checking foreign items from dependencies. }; }(); -const Bright=dependencies.Bright, - DOMOperation=dependencies.DOMOperation; - -if(isPrimitive(Bright))throw valueIsPrimitiveError(Bright); -if(isPrimitive(DOMOperation))throw valueIsPrimitiveError(DOMOperation); +const Bright=returnOrThrowObjectType(dependencies.Bright), + DOMOperation=returnOrThrowObjectType(dependencies.DOMOperation); function isObjectType(value){ const typeOfValue=typeof value; @@ -251,7 +285,7 @@ const defineProperty=Object_constructor.defineProperty; const definePropertyIsFunction=isFunction(defineProperty); return function(target,propertyName,propertyValue,isWritable,isEnumerable,isConfigurable){ - if(isPrimitive(target))throw valueIsPrimitiveError(target); + returnOrThrowObjectType(target); definePropertyIsFunction?defineProperty( target, propertyName, @@ -270,7 +304,6 @@ const definePropertyIsFunction=isFunction(defineProperty); function getDefaultAllowedElementNames(){ return [ - "html", /* per http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd */ "head", "title", @@ -347,49 +380,7 @@ function getDefaultAllowedElementNames(){ "col", "tr", "th", - "td", - - "article", /* per http://html.spec.whatwg.org/multipage/indices.html#elements-3 */ - "aside", - "audio", - "bdi", - "canvas", - "data", - "datalist", - "details", - "dialog", - "embed", - "figcaption", - "figure", - "footer", - "header", - "hgroup", - "iframe", - "main", - "mark", - "math", - "menu", - "meter", - "nav", - "output", - "picture", - "progress", - "rp", - "rt", - "ruby", - "s", - "search", - "section", - "slot", - "source", - "summary", - "svg", - "template", - "time", - "track", - "u", - "video", - "wbr" + "td" ]; } @@ -443,7 +434,7 @@ function constructorRequireNewError(value){ return function constructorFn(configObject){ const self=this; if(!(self instanceof constructorFn))throw constructorRequireNewError(constructorFn); - if(isPrimitive(configObject))throw valueIsPrimitiveError(configObject); + returnOrThrowObjectType(configObject); let i_var,len,j0,j1; for( @@ -481,7 +472,6 @@ function constructorRequireNewError(value){ True,False,True ); - i_var=len=j0=j1=null; return self; }; }(); @@ -573,8 +563,8 @@ function isStringPrimitive(value){ const createElementNS=function(namespaceURI,qualifiedName){ const args=arguments; - let newElement, - i_var,len,j0; + let i_var,len,j0, + newElement; if(bDocument_createElementNS_isFunction){ i_var=namespaceURI; /* borrows this variable */ switch(True){ @@ -598,7 +588,6 @@ const createElementNS=function(namespaceURI,qualifiedName){ isObjectType(j0=args[i_var])&& (i_var%2===0?smartSetDOMProperties:attributesSetter)(newElement,j0) ); - i_var=len=j0=null; return newElement; }else return Function_call[call_key]( /* fallback solution */ Function_apply, @@ -636,7 +625,7 @@ const setElementAttributeNS=function(targetElement,namespaceURI,qualifiedName,va if(!isElement(targetElement))throw isNotAnElementError(targetElement); let doesntNeedFallback, /* This is for checking whether fallback solution is needed. */ namespaceURI_repaired; - label0:if(doesntNeedFallback=bElement_setAttributeNS_isFunction){ /* eslint-disable-line no-cond-assign */ + if(doesntNeedFallback=bElement_setAttributeNS_isFunction){ /* eslint-disable-line no-cond-assign */ namespaceURI_repaired=namespaceURI; switch(True){ case isEmpty(qualifiedName): @@ -659,17 +648,15 @@ const setElementAttributeNS=function(targetElement,namespaceURI,qualifiedName,va break; default: /* We can not handle this case. */ doesntNeedFallback=False; - break label0; } } - Function_call[call_key](bElement_setAttributeNS,targetElement,namespaceURI_repaired,qualifiedName,value); } - ( - doesntNeedFallback|| + doesntNeedFallback?Function_call[call_key]( + bElement_setAttributeNS,targetElement,namespaceURI_repaired,qualifiedName,value + ):( bElement_setAttribute_isFunction&& Function_call[call_key](bElement_setAttribute,targetElement,qualifiedName,value) ); - doesntNeedFallback=namespaceURI_repaired=null; return targetElement; }; @@ -704,7 +691,6 @@ so that we do not have to declare more vairables than we actually need. } } } - i_var=len=j0=null; return targetElement; }; @@ -821,7 +807,6 @@ const itemToElement=(function selfFn(item){ ) ); } - tempKey=j0=tempDocumentFragment=null; return newNode; }); @@ -832,10 +817,9 @@ const Array_concat=Array_prototype.concat; tryES5DefineProperty( Application_prototype, - "config", + "configure", function(configObject){ - const self=this; - if(isPrimitive(self))throw valueIsPrimitiveError(self); + const self=returnOrThrowObjectType(this); if(isPrimitive(configObject))return self; let tempKey,tempValue, tempCondition0; /* @@ -913,7 +897,6 @@ when the source object has a desired value. True,True,True ) ); - tempKey=tempValue=tempCondition0=null; return self; }, @@ -928,8 +911,7 @@ tryES5DefineProperty( "navigate", function(num){ - const self=this; - if(isPrimitive(self))throw valueIsPrimitiveError(self); + const self=returnOrThrowObjectType(this); let i_var,j0,j1, tempDocumentFragment; ( @@ -976,7 +958,6 @@ tryES5DefineProperty( True,True,True ); } - i_var=j0=j1=tempDocumentFragment=null; return self; }, @@ -1009,7 +990,7 @@ function sharedKeys(){ function sharedValues(){ return [ "Bright_Leader", - 1686745986487 + 1687522550870 ]; } diff --git a/user/slides-config.js b/user/slides-config.js index f58e7414d95fa4502cd5e852ba069ab3e4347ed9..6707fa94a6e79a6aedd114c9b4999cb8943dc9ac 100644 --- a/user/slides-config.js +++ b/user/slides-config.js @@ -558,6 +558,107 @@ object.resources=[ } ] }, + { + type:"document-fragment", + children:[ + { + type:"element", + name:"p", + props:{ + lang:"en" + }, + children:[ + { + type:"text", + text:"You can navigate to custom slide page as you wish." + } + ] + }, + { + type:"element", + name:"div", + children:[ + { + type:"element", + name:"input", + props:{ + type:"button", + value:"to front cover" + }, + style:{ + fontFamily:"inherit" + }, + on:{ + click:function(){ + object.app.navigate(0); + return; + } + } + }, + { + type:"element", + name:"input", + props:{ + type:"button", + value:"to previous page" + }, + style:{ + fontFamily:"inherit" + }, + on:{ + click:function(){ + var app=object.app; + app.navigate( + app.counter-1 + ); + return; + } + } + }, + { + type:"element", + name:"input", + props:{ + type:"button", + value:"to next page" + }, + style:{ + fontFamily:"inherit" + }, + on:{ + click:function(){ + var app=object.app; + app.navigate( + app.counter+1 + ); + return; + } + } + }, + { + type:"element", + name:"input", + props:{ + type:"button", + value:"to last page" + }, + style:{ + fontFamily:"inherit" + }, + on:{ + click:function(){ + var app=object.app; + app.navigate( + app.resources.length-1 + ); + return; + } + } + } + ] + } + ] + }, { type:"element", name:"div", @@ -824,10 +925,10 @@ object.resources=[ } ]; -object.moreAllowedElementNames=["rect","polygon","polyline"]; +object.moreAllowedElementNames=["svg","rect","polygon","polyline"]; object.author="Bright_Leader"; -object.date=1686750902249; +object.date=1687531568457; return object; }({},this);