@schukai/monster 1.15.0 → 1.15.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +6 -0
- package/README.md +5 -5
- package/dist/modules/constants.js +1 -1
- package/dist/modules/constraints/abstract.js +2 -2
- package/dist/modules/constraints/abstractoperator.js +2 -2
- package/dist/modules/constraints/andoperator.js +2 -2
- package/dist/modules/constraints/invalid.js +2 -2
- package/dist/modules/constraints/isarray.js +2 -2
- package/dist/modules/constraints/isobject.js +2 -2
- package/dist/modules/constraints/namespace.js +1 -1
- package/dist/modules/constraints/oroperator.js +2 -2
- package/dist/modules/constraints/valid.js +2 -2
- package/dist/modules/data/buildmap.js +2 -2
- package/dist/modules/data/diff.js +2 -2
- package/dist/modules/data/extend.js +2 -2
- package/dist/modules/data/namespace.js +1 -1
- package/dist/modules/data/pathfinder.js +2 -2
- package/dist/modules/data/pipe.js +2 -2
- package/dist/modules/data/transformer.js +2 -2
- package/dist/modules/dom/assembler.js +2 -2
- package/dist/modules/dom/attributes.js +2 -2
- package/dist/modules/dom/constants.js +2 -2
- package/dist/modules/dom/customcontrol.js +2 -2
- package/dist/modules/dom/customelement.js +2 -2
- package/dist/modules/dom/events.js +2 -2
- package/dist/modules/dom/locale.js +2 -2
- package/dist/modules/dom/namespace.js +1 -1
- package/dist/modules/dom/template.js +2 -2
- package/dist/modules/dom/theme.js +2 -2
- package/dist/modules/dom/updater.js +2 -2
- package/dist/modules/dom/util.js +2 -2
- package/dist/modules/i18n/locale.js +2 -2
- package/dist/modules/i18n/namespace.js +1 -1
- package/dist/modules/i18n/provider.js +2 -2
- package/dist/modules/i18n/providers/fetch.js +2 -2
- package/dist/modules/i18n/providers/namespace.js +1 -1
- package/dist/modules/i18n/translations.js +2 -2
- package/dist/modules/logging/handler/console.js +2 -2
- package/dist/modules/logging/handler/namespace.js +1 -1
- package/dist/modules/logging/handler.js +2 -2
- package/dist/modules/logging/logentry.js +2 -2
- package/dist/modules/logging/logger.js +2 -2
- package/dist/modules/logging/namespace.js +1 -1
- package/dist/modules/math/namespace.js +1 -1
- package/dist/modules/math/random.js +2 -2
- package/dist/modules/monster.js +2 -2
- package/dist/modules/namespace.js +2 -2
- package/dist/modules/text/formatter.js +2 -2
- package/dist/modules/text/namespace.js +1 -1
- package/dist/modules/types/base.js +2 -2
- package/dist/modules/types/basewithoptions.js +2 -2
- package/dist/modules/types/global.js +2 -2
- package/dist/modules/types/id.js +2 -2
- package/dist/modules/types/is.js +2 -2
- package/dist/modules/types/namespace.js +1 -1
- package/dist/modules/types/observer.js +2 -2
- package/dist/modules/types/observerlist.js +2 -2
- package/dist/modules/types/proxyobserver.js +2 -2
- package/dist/modules/types/queue.js +2 -2
- package/dist/modules/types/randomid.js +2 -2
- package/dist/modules/types/stack.js +2 -2
- package/dist/modules/types/tokenlist.js +2 -2
- package/dist/modules/types/typeof.js +2 -2
- package/dist/modules/types/uniquequeue.js +2 -2
- package/dist/modules/types/validate.js +2 -2
- package/dist/modules/types/version.js +2 -2
- package/dist/modules/util/clone.js +2 -2
- package/dist/modules/util/comparator.js +2 -2
- package/dist/modules/util/freeze.js +2 -2
- package/dist/modules/util/namespace.js +1 -1
- package/dist/monster.dev.js +7321 -7322
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -9
- package/package.json +1 -1
- package/source/constraints/abstract.js +1 -1
- package/source/constraints/abstractoperator.js +2 -2
- package/source/constraints/andoperator.js +7 -7
- package/source/constraints/invalid.js +4 -4
- package/source/constraints/isarray.js +6 -6
- package/source/constraints/isobject.js +6 -6
- package/source/constraints/namespace.js +2 -2
- package/source/constraints/oroperator.js +7 -7
- package/source/constraints/valid.js +6 -6
- package/source/data/buildmap.js +3 -3
- package/source/data/diff.js +8 -8
- package/source/data/extend.js +6 -6
- package/source/data/namespace.js +2 -2
- package/source/data/pathfinder.js +12 -12
- package/source/data/pipe.js +7 -7
- package/source/data/transformer.js +9 -9
- package/source/dom/assembler.js +6 -6
- package/source/dom/attributes.js +26 -27
- package/source/dom/constants.js +1 -1
- package/source/dom/customcontrol.js +80 -82
- package/source/dom/customelement.js +87 -87
- package/source/dom/events.js +7 -7
- package/source/dom/locale.js +4 -4
- package/source/dom/namespace.js +2 -2
- package/source/dom/template.js +23 -18
- package/source/dom/theme.js +7 -8
- package/source/dom/updater.js +18 -23
- package/source/dom/util.js +10 -10
- package/source/i18n/locale.js +5 -5
- package/source/i18n/namespace.js +1 -1
- package/source/i18n/provider.js +4 -4
- package/source/i18n/providers/fetch.js +7 -7
- package/source/i18n/translations.js +4 -4
- package/source/logging/handler/console.js +4 -4
- package/source/logging/handler/namespace.js +1 -1
- package/source/logging/handler.js +7 -7
- package/source/logging/logentry.js +4 -4
- package/source/logging/logger.js +4 -4
- package/source/logging/namespace.js +2 -2
- package/source/math/namespace.js +2 -2
- package/source/math/random.js +4 -4
- package/source/monster.js +42 -44
- package/source/namespace.js +2 -2
- package/source/text/formatter.js +5 -5
- package/source/text/namespace.js +1 -1
- package/source/types/base.js +3 -3
- package/source/types/basewithoptions.js +7 -7
- package/source/types/global.js +6 -6
- package/source/types/id.js +5 -5
- package/source/types/is.js +21 -21
- package/source/types/namespace.js +2 -2
- package/source/types/observer.js +6 -6
- package/source/types/observerlist.js +3 -3
- package/source/types/proxyobserver.js +21 -21
- package/source/types/queue.js +4 -4
- package/source/types/randomid.js +5 -5
- package/source/types/stack.js +3 -3
- package/source/types/tokenlist.js +8 -8
- package/source/types/typeof.js +4 -4
- package/source/types/uniquequeue.js +7 -7
- package/source/types/validate.js +26 -26
- package/source/types/version.js +7 -7
- package/source/util/clone.js +5 -5
- package/source/util/comparator.js +6 -6
- package/source/util/freeze.js +6 -6
- package/source/util/namespace.js +2 -2
- package/test/cases/dom/template.js +40 -1
- package/test/cases/monster.js +1 -1
- package/test/web/monster-dev.html +3 -3
- package/test/web/monster.html +2 -2
- package/test/web/test.html +3 -3
- package/test/web/tests.js +2 -2
package/dist/monster.dev.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"monster.dev.js","mappings":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AAA;;AAAA;AAEb;AAED;AACJ;AACA;AACA;AACA;AACA;;;;;WACI,iBAAQG,KAAR,EAAe;AACX,aAAOC,OAAO,CAACE,MAAR,CAAeH,KAAf,CAAP;AACH;;;;EAjB4BI;;AAoBjC7B,gEAAiB,CAAC,qBAAD,EAAwBsB,kBAAxB,CAAjB;;;;;;;;;;;;;ACvCa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMO;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACI,wBAAW;AACP,aAAOC,IAAI,CAACC,SAAL,CAAe,IAAf,CAAP;AACH;;;;iCARcC;;AAanBhC,gEAAiB,CAAC,eAAD,EAAkB6B,IAAlB,CAAjB;;;;;;;;;;;;;;;;;;;;;;AChDa;AAEb;AACA;AACA;;;;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASI,UAAT,CAAoBR,KAApB,EAA2B;AACvB,MAAIA,KAAK,KAAK7B,SAAd,EAAyB,OAAO,KAAP;AACzB,MAAI6B,KAAK,KAAK,IAAd,EAAoB,OAAO,KAAP;AACpB,SAAO,QAAOA,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAGS,MAAM,CAACC,QAAV,CAAZ,MAAoC,UAA3C;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,WAAT,CAAqBX,KAArB,EAA4B;AACxB,MAAIY,IAAJ;;AAEA,MAAIZ,KAAK,KAAK7B,SAAV,IAAuB6B,KAAK,KAAK,IAAjC,IAAyCA,KAAK,KAAKa,GAAvD,EAA4D;AACxD,WAAO,IAAP;AACH;;AAEDD,EAAAA,IAAI,WAAUZ,KAAV,CAAJ;;AAEA,MAAIY,IAAI,KAAK,QAAT,IAAqBA,IAAI,KAAK,QAA9B,IAA0CA,IAAI,KAAK,SAAnD,IAAgEA,IAAI,KAAK,QAA7E,EAAuF;AACnF,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASE,QAAT,CAAkBd,KAAlB,EAAyB;AACrB,SAAQ,qBAAoBA,KAApB,CAAD,GAA8B,IAA9B,GAAqC,KAA5C;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASe,SAAT,CAAmBf,KAAnB,EAA0B;AAEtB,MAAIA,KAAK,KAAK,IAAV,IAAkBA,KAAK,KAAK,KAAhC,EAAuC;AACnC,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASgB,QAAT,CAAkBhB,KAAlB,EAAyB;AACrB,MAAIA,KAAK,KAAK7B,SAAV,IAAuB,OAAO6B,KAAP,KAAiB,QAA5C,EAAsD;AAClD,WAAO,KAAP;AACH;;AACD,SAAO,IAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASF,QAAT,CAAkBE,KAAlB,EAAyB;AAErB,MAAIT,OAAO,CAACS,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAIW,WAAW,CAACX,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,QAAOA,KAAP,MAAiB,QAArB,EAA+B;AAC3B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASiB,UAAT,CAAoBjB,KAApB,EAA2BkB,QAA3B,EAAqC;AAEjC,MAAI,CAACpB,QAAQ,CAACE,KAAD,CAAb,EAAsB,OAAO,KAAP;AACtB,MAAI,CAACmB,UAAU,CAACD,QAAD,CAAf,EAA2B,OAAO,KAAP;AAC3B,MAAI,CAACA,QAAQ,CAAClC,cAAT,CAAwB,WAAxB,CAAL,EAA2C,OAAO,KAAP;AAC3C,SAAQgB,KAAK,YAAYkB,QAAlB,GAA8B,IAA9B,GAAqC,KAA5C;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS3B,OAAT,CAAiBS,KAAjB,EAAwB;AACpB,MAAIV,KAAK,CAACC,OAAN,CAAcS,KAAd,CAAJ,EAA0B;AACtB,WAAO,IAAP;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASmB,UAAT,CAAoBnB,KAApB,EAA2B;AACvB,MAAIT,OAAO,CAACS,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAIW,WAAW,CAACX,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,OAAOA,KAAP,KAAiB,UAArB,EAAiC;AAC7B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASoB,SAAT,CAAmBpB,KAAnB,EAA0B;AACtB,SAAOqB,MAAM,CAACD,SAAP,CAAiBpB,KAAjB,CAAP;AACH;;AAGDzB,gEAAiB,CAAC,eAAD,EAAkBoC,WAAlB,EAA+BI,SAA/B,EAA0CC,QAA1C,EAAoDlB,QAApD,EAA8DP,OAA9D,EAAuE4B,UAAvE,EAAmFX,UAAnF,EAA+FY,SAA/F,EAA0GN,QAA1G,CAAjB;;;;;;;;;;;;;;AC7Ya;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMQ;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQtB,KAAR,EAAe;AACX,aAAOC,OAAO,CAACC,OAAR,CAAgBF,KAAhB,CAAP;AACH;;;;EAVeH;;AAcpBtB,gEAAiB,CAAC,qBAAD,EAAwB+C,KAAxB,CAAjB;;;;;;;;;;;;;;ACxDa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMC;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQvB,KAAR,EAAe;AACX,aAAOC,OAAO,CAACE,MAAR,CAAeH,KAAf,CAAP;AACH;;;;EAViBH;;AActBtB,gEAAiB,CAAC,qBAAD,EAAwBgD,OAAxB,CAAjB;;;;;;;;;;;;;;ACxDa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMC;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,4BAAYC,QAAZ,EAAsBC,QAAtB,EAAgC;AAAA;;AAAA;;AAC5B;;AAEA,QAAI,EAAED,QAAQ,YAAY5B,4DAAtB,KAA6C,EAAE6B,QAAQ,YAAY7B,4DAAtB,CAAjD,EAA4F;AACxF,YAAM,IAAI8B,SAAJ,CAAc,iDAAd,CAAN;AACH;;AAED,UAAKF,QAAL,GAAgBA,QAAhB;AACA,UAAKC,QAAL,GAAgBA,QAAhB;AAR4B;AAU/B;;;EAlB0B7B;;AAuB/BtB,gEAAiB,CAAC,qBAAD,EAAwBiD,gBAAxB,CAAjB;;;;;;;;;;;;;;ACtCa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMI;;;;;;;;;;;;;;AAEF;A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sBhC,KAAtB,CAAD,EAA+B,KAAK0B,QAAL,CAAcM,OAAd,CAAsBhC,KAAtB,CAA/B,CAAZ,CAAP;AACH;;;;EAVqBwB;;AAc1BjD,gEAAiB,CAAC,qBAAD,EAAwB4D,WAAxB,CAAjB;;;;;;;;;;;;;;;AChEa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACME;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQrC,KAAR,EAAe;AACX,UAAIT,qDAAO,CAACS,KAAD,CAAX,EAAoB;AAChB,eAAOC,OAAO,CAACC,OAAR,CAAgBF,KAAhB,CAAP;AACH;;AAED,aAAOC,OAAO,CAACE,MAAR,CAAeH,KAAf,CAAP;AACH;;;;EAdiBH;;AAkBtBtB,gEAAiB,CAAC,qBAAD,EAAwB8D,OAAxB,CAAjB;;;;;;;;;;;;;;;;;;;;;;;;;AChEa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;;AACA,IAAMM,GAAG,GAAG,GAAZ;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,EAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,EAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,IAAI,GAAG,EAAb;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,IAAI,GAAG,CAAb;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,CAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,CAAd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I2B,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASkE,iBAAT,CAA2BlE,KAA3B,EAAkC;AAC9B,MAAI,CAACW,mDAAW,CAACX,KAAD,CAAhB,EAAyB;AACrB,UAAM,IAAI2B,SAAJ,CAAc,0BAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASmE,eAAT,CAAyBnE,KAAzB,EAAgC;AAC5B,MAAI,CAACe,iDAAS,CAACf,KAAD,CAAd,EAAuB;AACnB,UAAM,IAAI2B,SAAJ,CAAc,wBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASwC,cAAT,CAAwBxC,KAAxB,EAA+B;AAC3B,MAAI,CAACgB,gDAAQ,CAAChB,KAAD,CAAb,EAAsB;AAClB,UAAM,IAAI2B,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASuC,cAAT,CAAwBvC,KAAxB,EAA+B;AAC3B,MAAI,CAACF,gDAAQ,CAACE,KAAD,CAAb,EAAsB;AAClB,UAAM,IAAI2B,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASoE,gBAAT,CAA0BpE,KAA1B,EAAiCkB,QAAjC,EAA2C;AACvC,MAAI,CAACD,kDAAU,CAACjB,KAAD,EAAQkB,QAAR,CAAf,EAAkC;AAC9B,QAAImD,CAAC,GAAG,EAAR;;AACA,QAAIvE,gDAAQ,CAACoB,QAAD,CAAR,IAAsBC,kDAAU,CAACD,QAAD,CAApC,EAAgD;AAC5CmD,MAAAA,CAAC,GAAGnD,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAG,MAAH,CAAZ;AACH;;AAED,QAAImD,CAAJ,EAAO;AACHA,MAAAA,CAAC,GAAG,MAAMA,CAAV;AACH;;AAED,UAAM,IAAI1C,SAAJ,CAAc,gCAAgC0C,CAA9C,CAAN;AACH;;AACD,SAAOrE,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASsE,aAAT,CAAuBtE,KAAvB,EAA8B;AAC1B,MAAI,CAACT,+CAAO,CAACS,KAAD,CAAZ,EAAqB;AACjB,UAAM,IAAI2B,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASuE,cAAT,CAAwBvE,KAAxB,EAA+B;AAC3B,MAAI,CAACc,gDAAQ,CAACd,KAAD,CAAb,EAAsB;AAClB,UAAM,IAAI2B,SAAJ,CAAc,wBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASwE,gBAAT,CAA0BxE,KAA1B,EAAiC;AAC7B,MAAI,CAACmB,kDAAU,CAACnB,KAAD,CAAf,EAAwB;AACpB,UAAM,IAAI2B,SAAJ,CAAc,yBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASsC,eAAT,CAAyBtC,KAAzB,EAAgC;AAC5B,MAAI,CAACoB,iDAAS,CAACpB,KAAD,CAAd,EAAuB;AACnB,UAAM,IAAI2B,SAAJ,CAAc,yBAAd,CAAN;AACH;;AACD,SAAO3B,KAAP;AACH;;AAEDzB,gEAAiB,CAAC,eAAD,EAAkB2F,iBAAlB,EAAqCC,eAArC,EAAsD3B,cAAtD,EAAsED,cAAtE,EAAsF+B,aAAtF,EAAqGE,gBAArG,EAAuHP,gBAAvH,EAAyI3B,eAAzI,CAAjB;;;;;;;;;;;;;;;;;ACjaa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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cAApB,CAAjB;;;;;;;ACxCa;AAEb;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AACA,IAAM1G,SAAS,GAAC,iBAAhB;;;;;;;;;;;;;;;ACda;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACM4G;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAYC,MAAZ,EAAoB;AAAA;;AAAA;;AAChB;AACA,UAAKA,MAAL,GAAcxC,kEAAc,CAACwC,MAAD,CAA5B;AACA,UAAKC,UAAL,GAAkB,IAAlB;AACA,UAAKC,WAAL,GAAmB,GAAnB;AAJgB;AAKnB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;WACI,mBAAUC,IAAV,EAAgBC,KAAhB,EAAuB;AAEnB,UAAIA,KAAK,KAAKhH,SAAd,EAAyB;AACrBgH,QAAAA,KAAK,GAAGD,IAAR;AACH;;AAED,WAAKF,UAAL,GAAkBxC,kEAAc,CAAC0C,IAAD,CAAhC;AACA,WAAKD,WAAL,GAAmBzC,kEAAc,CAAC2C,KAAD,CAAjC;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,gBAAOC,IAAP,EAAa;AACT,aAAOC,SAAS,CAACC,IAAV,CAAe,IAAf,EAAqB9C,kEAAc,CAAC4C,IAAD,CAAnC,CAAP;AACH;;;;EAnDmBhF;AAuDxB;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASiF,SAAT,CAAmBD,IAAnB,EAAyB;AACrB,MAAMvD,IAAI,GAAG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EJ3G,KAFI,CAAP;AAGH;;;;EA7CcI;;AAgDnB7B,gEAAiB,CAAC,cAAD,EAAiBsG,IAAjB,CAAjB;;;;;;;;;;;;;;;;;;;;AC5Ga;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMmB;;;;;AACF;AACJ;AACA;AACA;AACI,uBAAYmB,UAAZ,EAAwB;AAAA;;AAAA;;AACpB;AACA3E,IAAAA,kEAAc,CAAC2E,UAAD,CAAd;AAEA,UAAKpD,IAAL,GAAYqD,WAAW,CAACD,UAAD,CAAvB;AACA,UAAKtB,OAAL,GAAe,MAAK9B,IAAL,CAAUsD,KAAV,EAAf;AACA,UAAKC,SAAL,GAAiB,IAAIC,GAAJ,EAAjB;AANoB;AAQvB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;WACI,qBAAYtI,IAAZ,EAAkBoH,QAAlB,EAA4BC,OAA5B,EAAqC;AACjC9D,MAAAA,kEAAc,CAACvD,IAAD,CAAd;AACAuF,MAAAA,oEAAgB,CAA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AS,GAAG,GAAlB;AACA;AACA;AACA;AACA;;AACA,IAAMiG,QAAQ,GAAG,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMhF;;;;;AAEF;AACJ;AACA;AACA;AACI,sBAAYnC,MAAZ,EAAoB;AAAA;;AAAA;;AAChB;AACA,UAAKA,MAAL,GAAcA,MAAd;AACA,UAAKoH,QAAL,GAAgBD,QAAhB;AAHgB;AAInB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;WACI,qBAAYE,QAAZ,EAAsB;AAClB5J,MAAAA,kEAAc,CAAC4J,QAAD,CAAd;AACA,WAAKD,QAAL,GAAgBC,QAAhB;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,gBAAOC,IAAP,EAAa;AACT,aAAOC,eAAe,CAAChH,IAAhB,CAAqB,IAArB,EAA2B,KAAKP,MAAhC,EAAwCvC,kEAAc,CAAC6J,IAAD,CAAtD,CAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,gBAAOA,IAAP,EAAarM,KAAb,EAAoB;AAChBwC,MAAAA,kEAAc,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;AAChC,QAAI2J,KAAK,GAAG5J,OAAO,CAAC0B,YAAR,CAAqBuH,+DAArB,CAAZ;;AACA,QAAIW,KAAJ,EAAW;AACPhZ,MAAAA,IAAI,GAAGgZ,KAAP;AACH;AACJ;;AAED,SAAO,IAAII,KAAJ,CAAUpZ,IAAV,CAAP;AAEH;;AAEDV,gEAAiB,CAAC,aAAD,EAAgB8Z,KAAhB,EAAuBX,gBAAvB,CAAjB;;;;;;;;;;;;;;;;;AClGa;AAEb;AACA;AACA;;;;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASvJ,WAAT,GAAuB;AAAA;;AACnB,MAAIzC,QAAQ,iBAAG3E,2DAAS,EAAZ,+CAAG,WAAc,UAAd,CAAf;;AACA,MAAI,QAAO2E,QAAP,MAAoB,QAAxB,EAAkC;AAC9B,UAAM,IAAItN,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAOsN,QAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS4M,SAAT,GAAqB;AAAA;;AACjB,MAAIvP,MAAM,kBAAGhC,2DAAS,EAAZ,gDAAG,YAAc,QAAd,CAAb;;AACA,MAAI,QAAOgC,MAAP,MAAkB,QAAtB,EAAgC;AAC5B,UAAM,IAAI3K,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAO2K,MAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASwP,6BAAT,CAAuCC,IAAvC,EAA6C;AACzChW,EAAAA,kEAAc,CAACgW,IAAD,CAAd;AAEA,MAAM9M,QAAQ,GAAGyC,WAAW,EAA5B;AACA,MAAMkE,QAAQ,GAAG3G,QAAQ,CAAC+M,aAAT,CAAuB,UAAvB,CAAjB;AACApG,EAAAA,QAAQ,CAACU,SAAT,GAAqByF,IAArB;AAEA,SAAOnG,QAAQ,CAACwF,OAAhB;AACH;;AAGDtZ,gEAAiB,CAAC,aAAD,EAAgB+Z,SAAhB,EAA2BnK,WAA3B,EAAwCoK,6BAAxC,CAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzMa;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASG,qBAAT,CAA+BrK,OAA/B,EAAwC;AACpC,SAAOsK,sBAAsB,CAACtK,OAAD,EAAUmJ,+DAAV,CAA7B;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASoB,eAAT,CAAyBvK,OAAz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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,mBAAT,GAA+B;AAE3B,MAAMlO,QAAQ,GAAGyC,qDAAW,EAA5B;AAEA,MAAIqK,IAAI,GAAG9M,QAAQ,CAACoG,aAAT,CAAuB,MAAvB,CAAX;;AACA,MAAI0G,IAAI,YAAYlK,WAAhB,IAA+BkK,IAAI,CAAC1I,YAAL,CAAkB,MAAlB,CAAnC,EAA8D;AAC1D,QAAI+J,MAAM,GAAGrB,IAAI,CAACzI,YAAL,CAAkB,MAAlB,CAAb;;AACA,QAAI8J,MAAJ,EAAY;AACR,aAAO,IAAIH,wDAAJ,CAAgBG,MAAhB,CAAP;AACH;AACJ;;AAED,SAAOH,4DAAW,CAACC,gBAAD,CAAlB;AACH;;AAEDpb,gEAAiB,CAAC,aAAD,EAAgBqb,mBAAhB,CAAjB;;;;;;;;;;;;;;;;;ACzDa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AACA,IAAME,gBAAgB,GAAGrZ,MAAM,CAAC,YAAD,CAA/B;AAEA;AACA;AACA;;AACA,IAAMsZ,kBAAkB,GAAGtZ,MAAM,CAAC,cAAD,CAAjC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMuZ;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI,kBAAYC,QAAZ,EAAsBC,MAAtB,EAA8BC,MA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AO4U,UAAP;;AAE9B,QAAInb,CAAC,CAACS,MAAF,KAAa,CAAjB,EAAoB;AAChB,YAAM,IAAIxB,KAAJ,CAAU,oBAAV,CAAN;AACH;;AAED,UAAK2b,kBAAL,IAA2B5a,CAAC,CAAC4G,IAAF,CAAO,GAAP,CAA3B;AAxBiE;AA0BpE;AAED;AACJ;AACA;;;;;SACI,eAAmB;AACf,aAAO,KAAKgU,kBAAL,CAAP;AACH;AAED;AACJ;AACA;;;;SACI,eAAe;AACX,aAAO,KAAKD,gBAAL,EAAuBG,QAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAa;AACT,aAAO,KAAKH,gBAAL,EAAuBI,MAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAa;AACT,aAAO,KAAKJ,gBAAL,EAAuBK,MAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAe;AACX,aAAO,KAAKL,gBAAL,EAAuBM,QAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAc;AACV,aAAO,KAAKN,gBAAL,EAAuBO,OAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAiB;AACb,aAAO,KAAKP,gBAAL,EAAuBS,YAA9B;AACH;AAGD;AACJ;AACA;;;;WACI,oBAAW;AACP,aAAO,KAAK,KAAKC,YAAjB;AACH;AAED;AACJ;AACA;;;;WACI,kBAAS;AACL,aAAOvT,qDAAK,CAAC,KAAK6S,gBAAL,CAAD,CAAZ;AACH;;;;EArGgB1Z;AA2GrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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EAAiByb,MAAjB,EAAyBN,WAAzB,CAAjB;;;;;;;;;;;;;;;AChUa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;;AACA,IAAMiC,cAAc,GAAGlb,MAAM,CAAC,gBAAD,CAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMmb;;;;;AAEF;AACJ;AACA;AACA;AACI,2BAAc;AAAA;;AAAA;;AACV;;AAEA,QAAI,OAAO,MAAK,iBAAL,CAAP,KAAmC,UAAvC,EAAmD;AAC/C;AACA,YAAKD,cAAL,IAAuB,MAAKE,eAAL,EAAvB;AACH;;AANS;AAQb;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;SACI,eAAe;AACX,aAAOJ,uDAAM,CAAC,EAAD,mEAAb;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;;AAKI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACI,mBAAY;AACR,YAAMrd,KAAK,CAAC,2DAAD,CAAX;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;SACI,aAAU4B,KAAV,EAAiB;AACb,YAAM5B,KAAK,CAAC,2DAAD,CAAX;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,sBAAa4B,KAAb,EAAoB8b,KAApB,EAA2B;AACvBC,MAAAA,WAAW,CAACzW,IAAZ,CAAiB,IAAjB,EAAuB0W,YAAvB,CAAoChc,KAApC,EAA2C8b,KAA3C;AACH;AAED;AACJ;AACA;AACA;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ACA;;AACA,IAAM0F,gBAAgB,GAAG1c,MAAM,CAAC,kBAAD,CAA/B;AAEA;AACA;AACA;;AACA,IAAM2c,oBAAoB,GAAG3c,MAAM,CAAC,sBAAD,CAAnC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMib;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACA;AACI,2BAAc;AAAA;;AAAA;;AACV;AACA,UAAKsB,kBAAL,IAA2B,IAAItP,kEAAJ,CAAkB;AAAC,iBAAW+N,uDAAM,CAAC,EAAD,EAAK,MAAK4B,QAAV,EAAoBC,wBAAwB,CAAChY,IAAzB,+BAApB;AAAlB,KAAlB,CAA3B;AACAiY,IAAAA,kBAAkB,CAACjY,IAAnB;;AACA,UAAK6X,gBAAL;;AAJU;AAKb;AAED;AACJ;AACA;AACA;AACA;AACA;;;;;WACI,wBAAejI,QAAf,EAAyB;AACrB,WAAK8H,kBAAL,EAAyBxO,cAAzB,CAAwC0G,QAAxC;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,wBAAeA,QAAf,EAAyB;AACrB,WAAK8H,kBAAL,EAAyBQ,cAAzB,CAAwCtI,QAAxC;AACA,aAAO,IAA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASI,QAAT,CAAkBhY,OAAlB,EAA2B8M,QAA3B,EAAqCmL,aAArC,EAAoDC,WAApD,EAAiEC,MAAjE,EAAyE;AAErEriB,EAAAA,kEAAc,CAACgX,QAAD,CAAd;AACA,MAAM5R,MAAM,GAAG,IAAIL,GAAJ,EAAf;AAEA,MAAIud,MAAM,GAAG,IAAI5d,sDAAJ,CAAewF,OAAf,CAAb;AAEA,MAAIvG,GAAG,GAAG2e,MAAM,CAAC9a,MAAP,CAAcwP,QAAd,CAAV;;AACA,MAAI,EAAErT,GAAG,YAAYoB,GAAjB,CAAJ,EAA2B;AACvB,WAAOK,MAAP;AACH;;AAEDzB,EAAAA,GAAG,CAACkL,OAAJ,CAAY,UAACjL,CAAD,EAAIgC,CAAJ,EAAON,CAAP,EAAa;AACrB,QAAI3G,wDAAU,CAAC0jB,MAAD,CAAd,EAAwB;AACpB,UAAIA,MAAM,CAACvf,IAAP,CAAYwC,CAAZ,EAAe1B,CAAf,EAAkBgC,CAAlB,MAAyB,IAA7B,EAAmC;AACtC;;AAEDA,IAAAA,CAAC,GAAG2c,KAAK,CAAC3e,CAAD,EAAIwe,WAAJ,EAAiBxc,CAAjB,CAAT;AACAhC,IAAAA,CAAC,GAAG2e,KAAK,CAAC3e,CAAD,EAAIue,aAA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,EAAiBmmB,QAAjB,CAAjB;;;;;;UChLA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AAEa;;CAIb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEApmB,kEAAA,CAAwBA,kDAAxB;AAEA,IAAI8mB,QAAJ;;AACA,IAAI;AACAA,EAAAA,QAAQ,GAAG9mB,wEAAA,CAA8B,qBAA9B,CAAX;AACH,CAFD,CAEE,OAAOmB,CAAP,EAAU,CAEX;;AAED,IAAI,CAAC2lB,QAAL,EAAeA,QAAQ,GAAG,SAAX;AAEf9mB,kEAAA,GAA0B8mB,QAA1B,IAAsC9mB,kDAAtC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///../../../../packages/monster/source/namespace.js","webpack:///../../../../packages/monster/source/constraints/isobject.js","webpack:///../../../../packages/monster/source/constraints/abstract.js","webpack:///../../../../packages/monster/source/types/base.js","webpack:///../../../../packages/monster/source/types/is.js","webpack:///../../../../packages/monster/source/constraints/valid.js","webpack:///../../../../packages/monster/source/constraints/invalid.js","webpack:///../../../../packages/monster/source/constraints/abstractoperator.js","webpack:///../../../../packages/monster/source/constraints/oroperator.js","webpack:///../../../../packages/monster/source/constraints/andoperator.js","webpack:///../../../../packages/monster/source/constraints/isarray.js","webpack:///../../../../packages/monster/source/logging/logger.js","webpack:///../../../../packages/monster/source/types/validate.js","webpack:///../../../../packages/monster/source/logging/handler.js","webpack:///../../../../packages/monster/source/logging/logentry.js","webpack:///../../../../packages/monster/source/logging/handler/console.js","webpack:///../../../../packages/monster/source/logging/namespace.js","webpack:///../../../../packages/monster/source/text/formatter.js","webpack:///../../../../packages/monster/source/data/pipe.js","webpack:///../../../../packages/monster/source/data/transformer.js","webpack:///../../../../packages/monster/source/types/global.js","webpack:///../../../../packages/monster/source/types/id.js","webpack:///../../../../packages/monster/source/util/clone.js","webpack:///../../../../packages/monster/source/data/pathfinder.js","webpack:///../../../../packages/monster/source/types/stack.js","webpack:///../../../../packages/monster/source/dom/updater.js","webpack:///../../../../packages/monster/source/types/observer.js","webpack:///../../../../packages/monster/source/types/tokenlist.js","webpack:///../../../../packages/monster/source/types/uniquequeue.js","webpack:///../../../../packages/monster/source/types/queue.js","webpack:///../../../../packages/monster/source/types/proxyobserver.js","webpack:///../../../../packages/monster/source/types/observerlist.js","webpack:///../../../../packages/monster/source/data/diff.js","webpack:///../../../../packages/monster/source/dom/constants.js","webpack:///../../../../packages/monster/source/dom/template.js","webpack:///../../../../packages/monster/source/dom/theme.js","webpack:///../../../../packages/monster/source/dom/util.js","webpack:///../../../../packages/monster/source/dom/attributes.js","webpack:///../../../../packages/monster/source/dom/locale.js","webpack:///../../../../packages/monster/source/i18n/locale.js","webpack:///../../../../packages/monster/source/dom/customcontrol.js","webpack:///../../../../packages/monster/source/data/extend.js","webpack:///../../../../packages/monster/source/types/typeof.js","webpack:///../../../../packages/monster/source/dom/customelement.js","webpack:///../../../../packages/monster/source/constants.js","webpack:///../../../../packages/monster/source/dom/assembler.js","webpack:///../../../../packages/monster/source/dom/events.js","webpack:///../../../../packages/monster/source/i18n/providers/fetch.js","webpack:///../../../../packages/monster/source/i18n/provider.js","webpack:///../../../../packages/monster/source/types/basewithoptions.js","webpack:///../../../../packages/monster/source/i18n/translations.js","webpack:///../../../../packages/monster/source/types/version.js","webpack:///../../../../packages/monster/source/types/randomid.js","webpack:///../../../../packages/monster/source/math/random.js","webpack:///../../../../packages/monster/source/util/comparator.js","webpack:///../../../../packages/monster/source/util/freeze.js","webpack:///../../../../packages/monster/source/data/buildmap.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///../../../../packages/monster/source/monster.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"window\"] = factory();\n\telse\n\t\troot[\"window\"] = factory();\n})(self, function() {\nreturn ","'use strict';\n\n/**\n * Main namespace for Monster.\n *\n * @namespace Monster\n * @author schukai GmbH\n */\n\n\n/**\n * namespace class objects form the basic framework of the namespace administration.\n *\n * all functions, classes and objects of the library hang within the namespace tree.\n *\n * via `obj instanceof Monster.Namespace` it is also easy to check whether it is an object or a namespace.\n *\n * @memberOf Monster\n * @copyright schukai GmbH\n * @since 1.0.0\n */\nclass Namespace {\n\n /**\n *\n * @param namespace\n * @param obj\n */\n constructor(namespace) {\n if (namespace === undefined || typeof namespace !== 'string') {\n throw new Error(\"namespace is not a string\")\n }\n this.namespace = namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n getNamespace() {\n return this.namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.getNamespace();\n }\n}\n\n/**\n * @type {Namespace}\n * @global\n */\nexport const Monster = new Namespace(\"Monster\");\n\n/**\n * To expand monster, the `Monster.assignToNamespace()` method can be used.\n *\n * you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.\n *\n * To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/namespace.js';\n * function hello() {\n * console.log('Hello World!');\n * }\n * Monster.assignToNamespace(\"Monster.X\", hello)\n * Monster.X.hello(); // ↦ Hello World!\n * </script>\n *\n * ```\n *\n * @param {string} ns\n * @param {function} obj\n * @return {current}\n * @memberOf Monster\n * @throws {Error} no functions have been passed.\n * @throws {Error} the name of the class or function cannot be resolved.\n * @throws {Error} the first argument is not a function or class.\n * @throws {Error} exception\n * @since 1.0.0\n */\nfunction assignToNamespace(ns, ...obj) {\n let current = namespaceFor(ns.split(\".\"));\n\n if (obj.length === 0) {\n throw new Error('no functions have been passed.');\n }\n\n for (let i = 0, l = obj.length; i < l; i++) {\n current[objectName(obj[i])] = obj[i];\n }\n\n return current\n}\n\n/**\n *\n * @param {class|function} fn\n * @returns {string}\n * @private\n * @throws {Error} the name of the class or function cannot be resolved.\n * @throws {Error} the first argument is not a function or class.\n * @throws {Error} exception\n */\nfunction objectName(fn) {\n try {\n\n if (typeof fn !== 'function') {\n throw new Error(\"the first argument is not a function or class.\");\n }\n\n if (fn.hasOwnProperty('name')) {\n return fn.name;\n }\n\n if (\"function\" === typeof fn.toString) {\n let s = fn.toString();\n let f = s.match(/^\\s*function\\s+([^\\s(]+)/);\n if (Array.isArray(f) && typeof f[1] === 'string') {\n return f[1];\n }\n let c = s.match(/^\\s*class\\s+([^\\s(]+)/);\n if (Array.isArray(c) && typeof c[1] === 'string') {\n return c[1];\n }\n }\n\n } catch (e) {\n throw new Error(\"exception \" + e);\n }\n\n throw new Error(\"the name of the class or function cannot be resolved.\");\n}\n\n/**\n *\n * @param parts\n * @returns {Namespace}\n * @private\n */\nfunction namespaceFor(parts) {\n let space = Monster, ns = 'Monster';\n\n for (let i = 0; i < parts.length; i++) {\n\n if (\"Monster\" === parts[i]) {\n continue;\n }\n\n ns += '.' + parts[i];\n\n if (!space.hasOwnProperty(parts[i])) {\n space[parts[i]] = new Namespace(ns);\n }\n\n space = space[parts[i]];\n }\n\n return space;\n}\n\n\nassignToNamespace('Monster', assignToNamespace);\nexport {assignToNamespace}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {AbstractConstraint} from \"./abstract.js\";\nimport {isObject} from \"../types/is.js\";\n\n/**\n * You can call the method via the monster namespace `new Monster.Constraint.IsObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/isobject.js';\n * console.log(new Monster.Constraint.IsObject())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/isobject.js';\n * console.log(new IsObject())\n * </script>\n * ```\n * \n * @example\n *\n * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/isobject.js';\n *\n * new IsObject()\n * .isValid({})\n * .then(()=>console.log(true));\n * // ↦ true\n *\n *\n * new IsObject()\n * .isValid(99)\n * .catch(e=>console.log(e));\n * // ↦ 99\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass IsObject extends AbstractConstraint {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n if (isObject(value)) {\n return Promise.resolve(value);\n }\n\n return Promise.reject(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', IsObject);\nexport {Monster, IsObject}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from '../types/base.js';\n\n\n/**\n * The abstract constraint defines the api for all constraints. mainly the method isValid() is defined.\n *\n * derived classes must implement the method isValid().\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass AbstractConstraint extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n }\n\n /**\n * this method must return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.reject(value);\n }\n}\n\nassignToNamespace('Monster.Constraints', AbstractConstraint);\nexport {Monster, AbstractConstraint}","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\n\n/**\n * This is the base class from which all monster classes are derived.\n *\n * You can call the method via the monster namespace `new Monster.Types.Base()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/base.js';\n * console.log(new Monster.Types.Base())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/base.js';\n * console.log(new Base())\n * </script>\n * ```\n *\n * The class was formerly called Object.\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Base extends Object {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this);\n };\n\n\n}\n\nassignToNamespace('Monster.Types', Base);\nexport {Monster, Base}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\n\n/**\n * With this function you can check if a value is iterable\n *\n * You can call the method via the monster namespace `Monster.Types.isPrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isIterable(null)) // ↦ false\n * console.log(Monster.Types.isIterable('hello')) // ↦ true\n * console.log(Monster.Types.isIterable([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isIterable(null)) // ↦ false\n * console.log(isIterable('hello')) // ↦ true\n * console.log(isIterable([])) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.2.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isIterable(value) {\n if (value === undefined) return false;\n if (value === null) return false;\n return typeof value?.[Symbol.iterator] === 'function';\n}\n\n\n/**\n * Checks whether the value passed is a primitive (string, number, boolean, NaN, undefined, null or symbol)\n *\n * You can call the method via the monster namespace `Monster.Types.isPrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isPrimitive('2')) // ↦ false\n * console.log(Monster.Types.isPrimitive([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isPrimitive('2')) // ↦ true\n * console.log(isPrimitive([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isPrimitive(value) {\n var type;\n\n if (value === undefined || value === null || value === NaN) {\n return true;\n }\n\n type = typeof value;\n\n if (type === 'string' || type === 'number' || type === 'boolean' || type === 'symbol') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks whether the value passed is a symbol\n *\n * You can call the method via the monster namespace `Monster.Types.isSymbol()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isSymbol('2')) // ↦ false\n * console.log(Monster.Types.isSymbol(Symbol('test')) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isSymbol(Symbol('a'))) // ↦ true\n * console.log(isSymbol([]) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isSymbol(value) {\n return ('symbol' === typeof value) ? true : false;\n}\n\n/**\n * Checks whether the value passed is a boolean\n *\n * You can call the method via the monster namespace `Monster.Types.isBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isBoolean('2')) // ↦ false\n * console.log(Monster.Types.isBoolean([])) // ↦ false\n * console.log(Monster.Types.isBoolean(true)) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isBoolean('2')) // ↦ false\n * console.log(isBoolean([])) // ↦ false\n * console.log(isBoolean(2>4)) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isBoolean(value) {\n\n if (value === true || value === false) {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a string\n *\n * you can call the method via the monster namespace `Monster.Types.isString()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isString('2')) // ↦ true\n * console.log(Monster.Types.isString([])) // ↦ false\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isString('2')) // ↦ true\n * console.log(isString([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isString(value) {\n if (value === undefined || typeof value !== 'string') {\n return false;\n }\n return true;\n}\n\n/**\n * checks whether the value passed is a object\n *\n * you can call the method via the monster namespace `Monster.Types.isObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isObject('2')) // ↦ false\n * console.log(Monster.Types.isObject([])) // ↦ false\n * console.log(Monster.Types.isObject({})) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isObject('2')) // ↦ false\n * console.log(isObject([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isObject(value) {\n\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'object') {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a object and instance of instance\n *\n * you can call the method via the monster namespace `Monster.Types.isInstance()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isInstance('2')) // ↦ false\n * console.log(Monster.Types.isInstance([])) // ↦ false\n * console.log(Monster.Types.isInstance({})) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isInstance('2')) // ↦ false\n * console.log(isInstance([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @param {*} instance\n * @returns {boolean}\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isInstance(value, instance) {\n\n if (!isObject(value)) return false;\n if (!isFunction(instance)) return false;\n if (!instance.hasOwnProperty('prototype')) return false;\n return (value instanceof instance) ? true : false;\n\n}\n\n/**\n * checks whether the value passed is a array\n *\n * you can call the method via the monster namespace `Monster.Types.isArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isArray('2')) // ↦ false\n * console.log(Monster.Types.isArray([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isArray('2')) // ↦ false\n * console.log(isArray([])) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isArray(value) {\n if (Array.isArray(value)) {\n return true;\n }\n return false;\n}\n\n/**\n * checks whether the value passed is a function\n *\n * you can call the method via the monster namespace `Monster.Types.isFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isFunction(()=>{})) // ↦ true\n * console.log(Monster.Types.isFunction('2')) // ↦ false\n * console.log(Monster.Types.isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isFunction(()=>{})) // ↦ true\n * console.log(isFunction('2')) // ↦ false\n * console.log(isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isFunction(value) {\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'function') {\n return true;\n }\n\n return false;\n\n}\n\n/**\n * checks whether the value passed is an integer\n *\n * you can call the method via the monster namespace `Monster.Types.isFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(Monster.Types.isInteger(()=>{})) // ↦ true\n * console.log(Monster.Types.isInteger('2')) // ↦ false\n * console.log(Monster.Types.isInteger(2)) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n * console.log(isInteger(()=>{})) // ↦ true\n * console.log(isInteger('2')) // ↦ false\n * console.log(isInteger(2)) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isInteger(value) {\n return Number.isInteger(value);\n}\n\n\nassignToNamespace('Monster.Types', isPrimitive, isBoolean, isString, isObject, isArray, isFunction, isIterable, isInteger, isSymbol);\nexport {\n Monster,\n isPrimitive,\n isBoolean,\n isString,\n isObject,\n isInstance,\n isArray,\n isFunction,\n isIterable,\n isInteger,\n isSymbol\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { AbstractConstraint} from \"./abstract.js\";\n\n/**\n * The valid constraint allows an always valid query to be performed. this constraint is mainly intended for testing.\n *\n * You can call the method via the monster namespace `new Monster.Constraint.Valid()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/valid.js';\n * new Monster.Constraint.Valid();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/valid.js';\n * new Valid();\n * </script>\n * ```\n * \n * @example\n *\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/valid.js';\n *\n * new Valid().isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ true\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass Valid extends AbstractConstraint {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.resolve(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', Valid);\nexport {Monster, Valid}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * The invalid constraint allows an always invalid query to be performed. this constraint is mainly intended for testing.\n *\n * You can call the method via the monster namespace `new Monster.Constraint.Invalid()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/invalid.js';\n * new Monster.Constraint.Invalid();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/invalid.js';\n * new Invalid();\n * </script>\n * ```\n *\n * @example\n *\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/invalid.js';\n *\n * new Invalid().isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ false\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass Invalid extends AbstractConstraint {\n\n /**\n * this method return a rejected promise\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.reject(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', Invalid);\nexport {Monster, Invalid}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * Operators allow you to link constraints together. for example, you can check whether a value is an object or an array. each operator has two operands that are linked together.\n * \n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass AbstractOperator extends AbstractConstraint {\n\n /**\n *\n * @param {AbstractConstraint} operantA\n * @param {AbstractConstraint} operantB\n * @throws {TypeError} \"parameters must be from type AbstractConstraint\"\n */\n constructor(operantA, operantB) {\n super();\n\n if (!(operantA instanceof AbstractConstraint) || !(operantB instanceof AbstractConstraint)) {\n throw new TypeError(\"parameters must be from type AbstractConstraint\")\n }\n\n this.operantA = operantA;\n this.operantB = operantB;\n\n }\n\n\n}\n\nassignToNamespace('Monster.Constraints', AbstractOperator);\nexport {Monster, AbstractOperator}","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { AbstractOperator} from \"./abstractoperator.js\";\n\n/**\n * The OrOperator is used to link several constraints. The constraint is fulfilled if one of the constraints is fulfilled.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraint/oroperator.js';\n * new Monster.Constraint.OrOperator();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraint/oroperator.js';\n * new OrOperator();\n * </script>\n * ```\n *\n * @example\n *\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/valid.js';\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/invalid.js';\n * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/oroperator.js';\n *\n * new OrOperator(\n * new Valid(), new Invalid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ true\n *\n * new OrOperator(\n * new Invalid(), new Invalid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ false\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass OrOperator extends AbstractOperator {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n var self = this;\n\n return new Promise(function (resolve, reject) {\n let a, b;\n\n self.operantA.isValid(value)\n .then(function () {\n resolve();\n }).catch(function () {\n a = false;\n /** b has already been evaluated and was not true */\n if (b === false) {\n reject();\n }\n });\n\n self.operantB.isValid(value)\n .then(function () {\n resolve();\n }).catch(function () {\n b = false;\n /** b has already been evaluated and was not true */\n if (a === false) {\n reject();\n }\n });\n });\n }\n\n\n}\n\nassignToNamespace('Monster.Constraints', OrOperator);\nexport {Monster, OrOperator}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {AbstractOperator} from \"./abstractoperator.js\";\n\n/**\n * The AndOperator is used to link several contraints. The constraint is fulfilled if all constraints of the operators are fulfilled.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/andoperator.js';\n * new Monster.Constraint.AndOperator();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/andoperator.js';\n * new AndOperator();\n * </script>\n * ```\n * \n * @example\n *\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/valid.js';\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/invalid.js';\n * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/andoperator.js';\n *\n * new AndOperator(\n * new Valid(), new Valid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ true\n *\n * new AndOperator(\n * new Invalid(), new Valid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ false\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass AndOperator extends AbstractOperator {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.all([this.operantA.isValid(value), this.operantB.isValid(value)]);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', AndOperator);\nexport {Monster, AndOperator}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { AbstractConstraint} from \"./abstract.js\";\nimport {isArray} from \"../types/is.js\";\n\n/**\n * You can call the method via the monster namespace `new Monster.Constraint.IsObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/isarray.js';\n * console.log(new Monster.Constraint.IsArray())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/isarray.js';\n * console.log(new IsArray())\n * </script>\n * ```\n * \n * @example\n *\n * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/constraints/isarray.js';\n *\n * new IsArray()\n * .isValid([])\n * .then(()=>console.log(true));\n * // ↦ true\n *\n * new IsArray()\n * .isValid(99)\n * .catch(e=>console.log(e));\n * // ↦ 99\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass IsArray extends AbstractConstraint {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n if (isArray(value)) {\n return Promise.resolve(value);\n }\n\n return Promise.reject(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', IsArray);\nexport {Monster, IsArray}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {validateInteger, validateObject, validateString} from '../types/validate.js';\nimport {Handler} from '../logging/handler.js';\nimport {LogEntry} from '../logging/logentry.js';\nimport {Base} from '../types/base.js';\n\n\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst ALL = 255;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst TRACE = 64;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst DEBUG = 32;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst INFO = 16;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst WARN = 8;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst ERROR = 4;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst FATAL = 2;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst OFF = 0;\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Logger()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/logger.js';\n * console.log(new Monster.Logging.Logger())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/logger.js';\n * console.log(new Logger())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass Logger extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.handler = new Set;\n }\n\n /**\n *\n * @param {Handler} handler\n * @returns {Logger}\n * @throws {Error} the handler must be an instance of Handler\n */\n addHandler(handler) {\n validateObject(handler)\n if (!(handler instanceof Handler)) {\n throw new Error(\"the handler must be an instance of Handler\")\n }\n\n this.handler.add(handler)\n return this;\n }\n\n /**\n *\n * @param {Handler} handler\n * @returns {Logger}\n * @throws {Error} the handler must be an instance of Handler\n */\n removeHandler(handler) {\n validateObject(handler)\n if (!(handler instanceof Handler)) {\n throw new Error(\"the handler must be an instance of Handler\")\n }\n\n this.handler.delete(handler);\n return this;\n }\n\n /**\n * log Trace message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logTrace() {\n triggerLog.apply(this, [TRACE, ...arguments]);\n return this;\n };\n\n /**\n * log Debug message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logDebug() {\n triggerLog.apply(this, [DEBUG, ...arguments]);\n return this;\n };\n\n /**\n * log Info message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logInfo() {\n triggerLog.apply(this, [INFO, ...arguments]);\n return this;\n };\n\n /**\n * log Warn message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logWarn() {\n triggerLog.apply(this, [WARN, ...arguments]);\n return this;\n };\n\n /**\n * log Error message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logError() {\n triggerLog.apply(this, [ERROR, ...arguments]);\n return this;\n };\n\n /**\n * log Fatal message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logFatal() {\n triggerLog.apply(this, [FATAL, ...arguments]);\n return this;\n };\n\n\n /**\n * Labels\n *\n * @param {integer} level\n * @returns {string}\n */\n getLabel(level) {\n validateInteger(level);\n\n if (level === ALL) return 'ALL';\n if (level === TRACE) return 'TRACE';\n if (level === DEBUG) return 'DEBUG';\n if (level === INFO) return 'INFO';\n if (level === WARN) return 'WARN';\n if (level === ERROR) return 'ERROR';\n if (level === FATAL) return 'FATAL';\n if (level === OFF) return 'OFF';\n\n return 'unknown';\n };\n\n /**\n * Level\n *\n * @param {string} label\n * @returns {integer}\n */\n getLevel(label) {\n validateString(label);\n\n if (label === 'ALL') return ALL;\n if (label === 'TRACE') return TRACE;\n if (label === 'DEBUG') return DEBUG;\n if (label === 'INFO') return INFO;\n if (label === 'WARN') return WARN;\n if (label === 'ERROR') return ERROR;\n if (label === 'FATAL') return FATAL;\n if (label === 'OFF') return OFF;\n\n return 0;\n };\n\n\n}\n\nassignToNamespace('Monster.Logging', Logger);\nexport {Monster, Logger, ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF};\n\n\n/**\n * Log triggern\n *\n * @param {integer} loglevel\n * @param {*} args\n * @returns {Logger}\n * @private\n */\nfunction triggerLog(loglevel, ...args) {\n var logger = this;\n\n for (let handler of logger.handler) {\n handler.log(new LogEntry(loglevel, args))\n }\n\n return logger;\n\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {\n isPrimitive,\n isBoolean,\n isString,\n isObject,\n isArray,\n isFunction,\n isIterable,\n isInstance,\n isInteger,\n isSymbol\n} from './is.js';\n\n/**\n * This method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validatePrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateIterable('2')) // ↦ TypeError\n * console.log(Monster.Types.validateIterable([])) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateIterable('2')) // ↦ TypeError\n * console.log(validateIterable([])) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.2.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n * @see {@link isPrimitive}\n * @see {@link Monster/Types/isPrimitive}\n * @see {@link Monster/Types#isPrimitive}\n */\nfunction validateIterable(value) {\n if (!isIterable(value)) {\n throw new TypeError('value is not iterable')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validatePrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validatePrimitive('2')) // ↦ value\n * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validatePrimitive('2')) // ↦ value\n * console.log(validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n * @see {@link isPrimitive}\n * @see {@link Monster/Types/isPrimitive}\n * @see {@link Monster/Types#isPrimitive}\n */\nfunction validatePrimitive(value) {\n if (!isPrimitive(value)) {\n throw new TypeError('value is not a primitive')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the boolean type. this function is identical to isBoolean() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateBoolean(true)) // ↦ value\n * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError\n * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateBoolean(false)) // ↦ value\n * console.log(validateBoolean('2')) // ↦ TypeError\n * console.log(validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n\n * @throws {TypeError} value is not primitive\n */\nfunction validateBoolean(value) {\n if (!isBoolean(value)) {\n throw new TypeError('value is not a boolean')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the string type. this function is identical to isString() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateString()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateString('2')) // ↦ value\n * console.log(Monster.Types.validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateString('2')) // ↦ value\n * console.log(validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a string\n */\nfunction validateString(value) {\n if (!isString(value)) {\n throw new TypeError('value is not a string')\n }\n return value\n}\n\n\n/**\n * This method checks if the type matches the object type. this function is identical to isObject() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateObject({})) // ↦ value\n * console.log(Monster.Types.validateObject('2')) // ↦ TypeError\n * console.log(Monster.Types.validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateObject({})) // ↦ value\n * console.log(validateObject('2')) // ↦ TypeError\n * console.log(validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a object\n */\nfunction validateObject(value) {\n if (!isObject(value)) {\n throw new TypeError('value is not a object')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the object instance.\n *\n * You can call the method via the monster namespace `Monster.Types.validateInstance()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateInstance({}, Object)) // ↦ value\n * console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError\n * console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateInstance({}, Object)) // ↦ value\n * console.log(validateInstance('2', Object)) // ↦ TypeError\n * console.log(validateInstance([], Object)) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an instance of\n */\nfunction validateInstance(value, instance) {\n if (!isInstance(value, instance)) {\n let n = \"\";\n if (isObject(instance) || isFunction(instance)) {\n n = instance?.['name']\n }\n\n if (n) {\n n = \" \" + n;\n }\n\n throw new TypeError('value is not an instance of' + n)\n }\n return value\n}\n\n/**\n * This method checks if the type matches the array type. this function is identical to isArray() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateArray('2')) // ↦ TypeError\n * console.log(Monster.Types.validateArray([])) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateArray('2')) // ↦ TypeError\n * console.log(validateArray([])) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an array\n */\nfunction validateArray(value) {\n if (!isArray(value)) {\n throw new TypeError('value is not an array')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the symbol type. this function is identical to isSymbol() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateSymbol()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError\n * console.log(Monster.Types.validateSymbol([])) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateSymbol('2')) // ↦ TypeError\n * console.log(validateSymbol()) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an symbol\n */\nfunction validateSymbol(value) {\n if (!isSymbol(value)) {\n throw new TypeError('value is not an symbol')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the function type. this function is identical to isFunction() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateFunction(()=>{})) // ↦ value\n * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError\n * console.log(Monster.Types.validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateFunction(()=>{})) // ↦ value\n * console.log(validateFunction('2')) // ↦ TypeError\n * console.log(validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a function\n */\nfunction validateFunction(value) {\n if (!isFunction(value)) {\n throw new TypeError('value is not a function')\n }\n return value\n}\n\n/**\n * This method checks if the type is an integer. this function is identical to isInteger() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateInteger()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateInteger(true)) // ↦ TypeError\n * console.log(Monster.Types.validateInteger('2')) // ↦ TypeError\n * console.log(Monster.Types.validateInteger(2)) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/validate.js';\n * console.log(validateInteger(true)) // ↦ TypeError\n * console.log(validateInteger('2')) // ↦ TypeError\n * console.log(validateInteger(2)) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an integer\n */\nfunction validateInteger(value) {\n if (!isInteger(value)) {\n throw new TypeError('value is not an integer')\n }\n return value\n}\n\nassignToNamespace('Monster.Types', validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction, validateIterable, validateInteger);\nexport {\n Monster,\n validatePrimitive,\n validateBoolean,\n validateString,\n validateObject,\n validateInstance,\n validateArray,\n validateFunction,\n validateIterable,\n validateInteger,\n validateSymbol\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN} from \"./logger.js\";\nimport {LogEntry} from \"./logentry.js\";\nimport {validateInstance, validateInteger} from \"../types/validate.js\";\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Handler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/handler.js';\n * console.log(new Monster.Logging.Handler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/handler.js';\n * console.log(new Handler())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass Handler extends Base {\n constructor() {\n super();\n\n /**\n * Loglevel\n * \n * @type {integer} \n */\n this.loglevel = OFF;\n }\n\n /**\n * this is the central log function. this method must be\n * overwritten by derived handlers with their own logic.\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {LogEntry} entry\n * @returns {boolean}\n */\n log(entry) {\n validateInstance(entry, LogEntry);\n\n if (this.loglevel < entry.getLogLevel()) {\n return false;\n }\n\n return true;\n }\n\n /**\n * set loglevel\n *\n * @param {integer} loglevel\n * @returns {Handler}\n * @since 1.5.0\n */\n setLogLevel(loglevel) {\n validateInteger(loglevel)\n this.loglevel = loglevel;\n return this;\n }\n\n /**\n * get loglevel\n *\n * @returns {integer}\n * @since 1.5.0\n */\n getLogLevel() {\n return this.loglevel;\n }\n\n /**\n * Set log level to All\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setAll() {\n this.setLogLevel(ALL);\n return this;\n };\n\n /**\n * Set log level to Trace\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setTrace() {\n this.setLogLevel(TRACE);\n return this;\n };\n\n /**\n * Set log level to Debug\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setDebug() {\n this.setLogLevel(DEBUG);\n return this;\n };\n\n /**\n * Set log level to Info\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setInfo() {\n this.setLogLevel(INFO);\n return this;\n };\n\n /**\n * Set log level to Warn\n *\n * @returns {undefined}\n * @since 1.5.0\n */\n setWarn() {\n this.setLogLevel(WARN);\n return this;\n };\n\n /**\n * Set log level to Error\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setError() {\n this.setLogLevel(ERROR);\n return this;\n };\n\n /**\n * Set log level to Fatal\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setFatal() {\n this.setLogLevel(FATAL);\n return this;\n };\n\n\n /**\n * Set log level to Off\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setOff() {\n this.setLogLevel(OFF);\n return this;\n };\n\n\n}\n\n\nassignToNamespace('Monster.Logging', Handler);\nexport {Monster, Handler};\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {validateInteger} from '../types/validate.js';\nimport {Base} from '../types/base.js';\n\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.LogEntry()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/logentry.js';\n * console.log(new Monster.Logging.LogEntry())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/logentry.js';\n * console.log(new LogEntry())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass LogEntry extends Base {\n /**\n *\n * @param {int} loglevel\n * @param {*} args\n */\n constructor(loglevel, ...args) {\n super();\n validateInteger(loglevel);\n\n this.loglevel = loglevel\n this.arguments = args\n }\n\n /**\n *\n * @returns {integerr}\n */\n getLogLevel() {\n return this.loglevel\n }\n\n /**\n *\n * @returns {array}\n */\n getArguments() {\n return this.arguments\n }\n\n}\n\nassignToNamespace('Monster.Logging', LogEntry);\nexport {Monster, LogEntry}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from '../../types/base.js';\nimport {Handler} from '../../logging/handler.js';\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Handler.ConsoleHandler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/handler/console.js';\n * console.log(new Monster.Logging.Handler.ConsoleHandler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/logging/handler/console.js';\n * console.log(new ConsoleHandler())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging/Handler\n */\nclass ConsoleHandler extends Base {\n constructor() {\n super();\n }\n}\n\n\nassignToNamespace('Monster.Logging', ConsoleHandler);\nexport {Monster, Handler};\n","'use strict';\n\n/**\n * Namespace for logging.\n * \n * @namespace Monster/Logging\n * @author schukai GmbH\n */\n\n\n/**\n * @private\n * @type {string}\n */\nconst namespace=\"Monster.Logging\";","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Pipe} from \"../data/pipe.js\";\nimport {Base} from \"../types/base.js\";\nimport {validateObject, validateString} from \"../types/validate.js\";\n\n\n/**\n * Messages can be formatted with the formatter. To do this, an object with the values must be passed to the formatter. The message can then contain placeholders.\n *\n * Look at the example below. The placeholders use the logic of Pipe.\n *\n * You can call the method via the monster namespace `new Monster.Text.Formatter()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/text/formatter.js';\n * console.log(new Monster.Text.Formatter())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/text/formatter.js';\n * console.log(new Formatter())\n * </script>\n * ```\n *\n * @example\n *\n * new Formatter({\n * a: {\n * b: {\n * c: \"Hello\"\n * },\n * d: \"world\",\n * }\n * }).format(\"${a.b.c} ${a.d | ucfirst}!\");\n *\n * // ↦ Hello World!\n *\n * @since 1.12.0\n * @copyright schukai GmbH\n * @memberOf Monster/Text\n */\nclass Formatter extends Base {\n\n /**\n * Default values for the markers are `${` and `}`\n *\n * @param {object} object\n * @throws {TypeError} value is not a object\n */\n constructor(object) {\n super();\n this.object = validateObject(object);\n this.openMarker = '${';\n this.closeMarker = '}';\n }\n\n /**\n * Set new Marker\n *\n * Default values for the markers are `${` and `}`\n *\n * ```\n * formatter.setMarker('#'); // open and close are both #\n * formatter.setMarker('[',']');\n * formatter.setMarker('i18n{','}');\n * ```\n *\n * @param {string} open\n * @param {string} close\n * @return {Formatter}\n * @since 1.12.0\n * @throws {TypeError} value is not a string\n */\n setMarker(open, close) {\n\n if (close === undefined) {\n close = open;\n }\n\n this.openMarker = validateString(open);\n this.closeMarker = validateString(close);\n return this;\n }\n\n /**\n *\n * @param {string} text\n * @return {string}\n * @throws {TypeError} value is not a string\n */\n format(text) {\n return tokenizer.call(this, validateString(text))\n }\n\n}\n\n/**\n * @private\n * @since 1.12.0\n * @param text\n * @return {string}\n */\nfunction tokenizer(text) {\n const self = this;\n\n let formatted = [];\n\n while (true) {\n\n\n let startIndex = text.indexOf(self.openMarker);\n // no marker \n if (startIndex === -1) {\n formatted.push(text);\n break;\n } else if (startIndex > 0) {\n formatted.push(text.substring(0, startIndex))\n text = text.substring(startIndex)\n }\n\n let endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker)+self.openMarker.length;\n\n if (endIndex === -1) {\n throw new Error(\"syntax error in formatter template\")\n return;\n }\n\n let command = \"path:\" + text.substring(self.openMarker.length, endIndex);\n\n formatted.push(validateString(new Pipe(command).run(self.object)));\n\n text = text.substring(endIndex + self.closeMarker.length);\n\n }\n\n return formatted.join('');\n}\n\nassignToNamespace('Monster.Text', Formatter);\nexport {Monster, Formatter}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Transformer} from './transformer.js';\nimport {Base} from '../types/base.js';\nimport {validateFunction, validateString} from '../types/validate.js';\n\n\nconst DELIMITER = '|';\n\n/**\n * The pipe class makes it possible to combine several processing steps.\n *\n * You can call the method via the monster namespace `new Monster.Data.Pipe()`.\n *\n * ```\n * <script type=\"module\"> \n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pipe.js';\n * console.log(new Monster.Data.Pipe())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pipe.js';\n * console.log(new Pipe())\n * </script>\n * ```\n *\n * A pipe consists of commands whose input and output are connected with the pipe symbol `|`.\n *\n * With the Pipe, processing steps can be combined. Here, the value of an object is accessed via the pathfinder (path command).\n * the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.\n *\n * @example\n * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pipe.js';\n *\n * let obj = {\n * a: {\n * b: {\n * c: {\n * d: \"world\"\n * }\n * }\n * }\n * }\n *\n * console.log(new Pipe('path:a.b.c.d | toupper | prefix:Hello\\\\ ').run(obj));\n * // ↦ Hello WORLD\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Pipe extends Base {\n\n /**\n *\n * @param {string} pipe a pipe consists of commands whose input and output are connected with the pipe symbol `|`.\n * @throws {TypeError}\n */\n constructor(pipe) {\n super();\n validateString(pipe);\n this.pipe = pipe.split(DELIMITER).map((v) => {\n return new Transformer(v);\n });\n\n\n }\n\n /**\n *\n * @param {string} name\n * @param {function} callback\n * @param {object} context\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback, context) {\n\n for (const [, t] of Object.entries(this.pipe)) {\n t.setCallback(name, callback, context);\n }\n\n return this;\n }\n\n /**\n * run a pipe\n *\n * @param {*} value\n * @returns {*}\n */\n run(value) {\n return this.pipe.reduce((accumulator, transformer, currentIndex, array) => {\n return transformer.run(accumulator);\n }, value);\n }\n}\n\nassignToNamespace('Monster.Data', Pipe);\nexport {Monster, Pipe}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {getGlobal} from \"../types/global.js\";\nimport {\n validateString,\n validatePrimitive,\n validateFunction,\n validateInteger,\n validateObject\n} from '../types/validate.js';\nimport {isObject, isString, isArray} from '../types/is.js';\nimport {ID} from '../types/id.js';\nimport {clone} from \"../util/clone.js\";\nimport {Pathfinder} from \"./pathfinder.js\";\n\n/**\n * The transformer class is a swiss army knife for manipulating values. especially in combination with the pipe, processing chains can be built up.\n *\n * You can call the method via the monster namespace `new Monster.Data.Transformer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/transformer.js';\n * console.log(new Monster.Data.Transformer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/transformer.js';\n * console.log(new Transformer())\n * </script>\n * ```\n *\n * A simple example is the conversion of all characters to lowercase. for this purpose the command tolower must be used.\n *\n * ```\n * let t = new Transformer('tolower').run('ABC'); // ↦ abc\n * ```\n *\n * **all commands**\n *\n * in the following table all commands, parameters and existing aliases are described.\n *\n * | command | parameter | alias | description |\n * |:-------------|:---------------------------|:------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | base64 | | | Converts the value to base64 |\n * | call | function,param1:param2:... | | Calling a callback function. The function can be defined in three places: either globally, in the context `addCallback` or in the passed object |\n * | default | | | If the value is undefined the first argument is returned, otherwise the value. (since 1.12.0) |\n * | empty | | | Return empty String \"\" |\n * | fromjson | | | Type conversion from a JSON string (since 1.12.0) |\n * | if | statement1:statement2 | ? | Is the ternary operator, the first parameter is the valid statement, the second is the false part. To use the current value in the queue, you can set the value keyword. On the other hand, if you want to have the static string \"value\", you have to put one backslash \\\\ in front of it and write value. the follow values are true: 'on', true, 'true' |\n * | index | key:default | property, key | Fetches a value from an object, an array, a map or a set |\n * | length | | count | Length of the string or entries of an array or object |\n * | nop | | | Do nothing |\n * | path | path | | The access to an object is done via a Pathfinder object |\n * | plaintext | | plain | All HTML tags are removed (*) |\n * | prefix | text | | Adds a prefix |\n * | rawurlencode | | | URL coding |\n * | static | | none | The Arguments value is used and passed to the value. Special characters \\ <space> and : can be quotet by a preceding \\. |\n * | substring | start:length | | Returns a substring |\n * | suffix | text | | Adds a suffix |\n * | tointeger | | | Type conversion to an integer value |\n * | tojson | | | Type conversion to a JSON string (since 1.8.0) |\n * | tolower | | strtolower, tolowercase | The input value is converted to lowercase letters |\n * | tostring | | | Type conversion to a string |\n * | toupper | | strtoupper, touppercase | The input value is converted to uppercase letters |\n * | trim | | | Remove spaces at the beginning and end |\n * | ucfirst | | | First character large |\n * | ucwords | | | Any word beginning large |\n * | undefined | | | Return undefined |\n * | uniqid | | | Creates a string with a unique value (**) |\n *\n * (*) for this functionality the extension [jsdom](https://www.npmjs.com/package/jsdom) must be loaded in the nodejs context.\n *\n * ```\n * // polyfill\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n * \n * [\n * 'self',\n * 'document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (global[key] = window[key]));\n * }\n * ```\n *\n * (**) for this command the crypt library is necessary in the nodejs context.\n *\n * ```\n * import * as Crypto from \"@peculiar/webcrypto\";\n * global['crypto'] = new Crypto.Crypto();\n * ```\n *\n * @example\n *\n * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/transformer.js';\n *\n * const transformer = new Transformer(\"tolower\")\n *\n * console.log(transformer.run(\"HELLO\"))\n * // ↦ hello\n *\n * console.log(transformer.run(\"WORLD\"))\n * // ↦ world\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Transformer extends Base {\n /**\n *\n * @param {string} definition\n */\n constructor(definition) {\n super();\n validateString(definition);\n\n this.args = disassemble(definition);\n this.command = this.args.shift()\n this.callbacks = new Map();\n\n }\n\n /**\n *\n * @param {string} name\n * @param {function} callback\n * @param {object} context\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback, context) {\n validateString(name)\n validateFunction(callback)\n\n if (context !== undefined) {\n validateObject(context);\n }\n\n this.callbacks.set(name, {\n callback: callback,\n context: context,\n });\n\n return this;\n }\n\n /**\n *\n * @param {*} value\n * @returns {*}\n * @throws {Error} unknown command\n * @throws {TypeError} unsupported type\n * @throws {Error} type not supported\n */\n run(value) {\n return transform.apply(this, [value])\n }\n}\n\nassignToNamespace('Monster.Data', Transformer);\nexport {Monster, Transformer}\n\n/**\n *\n * @param {string} command\n * @returns {array}\n * @private\n */\nfunction disassemble(command) {\n\n validateString(command);\n\n let placeholder = new Map;\n const regex = /((?<pattern>\\\\(?<char>.)){1})/mig;\n\n // The separator for args must be quotable\n // undefined string which should not occur normally and is also not a regex\n let result = command.matchAll(regex)\n\n for (let m of result) {\n let g = m?.['groups'];\n if (!isObject(g)) {\n continue;\n }\n\n let p = g?.['pattern'];\n let c = g?.['char'];\n\n if (p && c) {\n let r = '__' + new ID().toString() + '__';\n placeholder.set(r, c);\n command = command.replace(p, r);\n }\n\n }\n let parts = command.split(':');\n\n parts = parts.map(function (value) {\n let v = value.trim();\n for (let k of placeholder) {\n v = v.replace(k[0], k[1]);\n }\n return v;\n\n\n });\n\n return parts\n}\n\n/**\n * tries to make a string out of value and if this succeeds to return it back\n *\n * @param {*} value\n * @returns {string}\n * @private\n */\nfunction convertToString(value) {\n\n if (isObject(value) && value.hasOwnProperty('toString')) {\n value = value.toString();\n }\n\n validateString(value)\n return value;\n}\n\n/**\n *\n * @param {*} value\n * @returns {*}\n * @private\n * @throws {Error} unknown command\n * @throws {TypeError} unsupported type\n * @throws {Error} type not supported\n */\nfunction transform(value) {\n\n let args = clone(this.args);\n let key\n\n switch (this.command) {\n\n case 'static':\n return this.args.join(':');\n\n case 'tolower':\n case 'strtolower':\n case 'tolowercase':\n validateString(value)\n return value.toLowerCase();\n\n case 'toupper':\n case 'strtoupper':\n case 'touppercase':\n validateString(value)\n return value.toUpperCase();\n\n case 'tostring':\n return \"\" + value;\n\n case 'tointeger':\n let n = parseInt(value);\n validateInteger(n);\n return n\n\n case 'tojson':\n return JSON.stringify(value);\n\n case 'fromjson':\n return JSON.parse(value);\n\n case 'trim':\n validateString(value)\n return value.trim();\n\n case 'rawurlencode':\n validateString(value)\n return encodeURIComponent(value)\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A');\n\n\n case 'call':\n\n /**\n * callback-definition\n * function callback(value, ...args) {\n * return value;\n * }\n */\n\n let callback;\n let callbackName = args.shift();\n let context = getGlobal();\n\n if (isObject(value) && value.hasOwnProperty(callbackName)) {\n callback = value[callbackName];\n } else if (this.callbacks.has(callbackName)) {\n let s = this.callbacks.get(callbackName);\n callback = s?.['callback'];\n context = s?.['context'];\n } else if (typeof window === 'object' && window.hasOwnProperty(callbackName)) {\n callback = window[callbackName];\n }\n validateFunction(callback);\n\n args.unshift(value);\n return callback.call(context, ...args);\n\n case 'plain':\n case 'plaintext':\n validateString(value);\n let doc = new DOMParser().parseFromString(value, 'text/html');\n return doc.body.textContent || \"\";\n\n case 'if':\n case '?':\n\n validatePrimitive(value);\n\n let trueStatement = (args.shift() || undefined);\n let falseStatement = (args.shift() || undefined);\n\n if (trueStatement === 'value') {\n trueStatement = value;\n }\n if (trueStatement === '\\\\value') {\n trueStatement = 'value';\n }\n if (falseStatement === 'value') {\n falseStatement = value;\n }\n if (falseStatement === '\\\\value') {\n falseStatement = 'value';\n }\n\n let condition = ((value !== undefined && value !== '' && value !== 'off' && value !== 'false' && value !== false) || value === 'on' || value === 'true' || value === true);\n return condition ? trueStatement : falseStatement;\n\n\n case 'ucfirst':\n validateString(value);\n\n let firstchar = value.charAt(0).toUpperCase();\n return firstchar + value.substr(1);\n case 'ucwords':\n validateString(value);\n\n return value.replace(/^([a-z\\u00E0-\\u00FC])|\\s+([a-z\\u00E0-\\u00FC])/g, function (v) {\n return v.toUpperCase();\n });\n\n case 'count':\n case 'length':\n\n if ((isString(value) || isObject(value) || isArray(value)) && value.hasOwnProperty('length')) {\n return value.length;\n }\n\n throw new TypeError(\"unsupported type \" + typeof value);\n\n case 'base64':\n convertToString(value);\n return btoa(value);\n\n case 'empty':\n return '';\n\n case 'undefined':\n return undefined;\n\n case 'prefix':\n validateString(value);\n let prefix = args?.[0];\n return prefix + value;\n\n case 'suffix':\n validateString(value);\n let suffix = args?.[0];\n return value + suffix;\n\n case 'uniqid':\n return (new ID()).toString();\n\n case 'key':\n case 'property':\n case 'index':\n\n key = (args.shift() || 'undefined');\n let defaultValue = (args.shift() || '');\n\n if (value instanceof Map) {\n if (!value.has(key)) {\n return defaultValue;\n }\n return value.get(key);\n }\n\n if (isObject(value) || isArray(value)) {\n\n if (value?.[key]) {\n return value?.[key];\n }\n\n return defaultValue;\n }\n\n throw new Error(\"type not supported\")\n\n case 'path':\n\n key = (args.shift() || 'undefined');\n return new Pathfinder(value).getVia(key);\n\n\n case 'substring':\n\n validateString(value);\n\n let start = parseInt(args[0]) || 0;\n let end = (parseInt(args[1]) || 0) + start;\n\n return value.substring(start, end);\n\n case 'nop':\n return value;\n\n case 'default':\n if (value !== undefined) {\n return value;\n }\n return args[0];\n\n default:\n throw new Error(\"unknown command \" + this.command)\n }\n\n return value;\n}\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {validateFunction, validateString, validateObject} from \"./validate.js\";\n\n/**\n * @type {objec}\n * @private\n */\nlet globalReference;\n\n/**\n * @private\n * @throws {Error} unsupported environment.\n */\n(function () {\n\n if (typeof globalThis === 'object') {\n globalReference = globalThis;\n return;\n }\n\n if (typeof self !== 'undefined') {\n globalReference = self;\n return;\n } else if (typeof window !== 'undefined') {\n globalReference = window;\n return;\n }\n\n Object.defineProperty(Object.prototype, '__monster__', {\n get: function () {\n return this;\n },\n configurable: true\n });\n\n if (typeof __monster__ === 'object') {\n __monster__.globalThis = __monster__;\n delete Object.prototype.__monster__;\n\n globalReference = globalThis;\n return;\n }\n\n try {\n globalReference = Function('return this')();\n } catch (e) {\n\n }\n\n throw new Error(\"unsupported environment.\")\n\n\n}());\n\n/**\n * Return globalThis\n *\n * If globalThis is not available, it will be polyfilled\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @returns {objec} globalThis\n */\nfunction getGlobal() {\n return globalReference;\n}\n\n/**\n * Return global object or throw Error\n *\n * You can call the method via the monster namespace `Monster.Types.getGlobalObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/global.js';\n * console.log(Monster.Types.getGlobalObject('document')) // ↦ { }\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/global.js';\n * console.log(getGlobalObject('document')) // ↦ { }\n * </script>\n * ```\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @param {string} name\n * @returns {objec}\n * @throws {Error} the object is not defined\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not a string\n */\nfunction getGlobalObject(name) {\n validateString(name);\n let o = globalReference?.[name];\n if (typeof o === 'undefined') throw new Error('the object ' + name + ' is not defined');\n validateObject(o);\n return o;\n}\n\n/**\n * Return global function or throw Error\n *\n * You can call the method via the monster namespace `Monster.Types.getGlobalFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/global.js';\n * console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/global.js';\n * console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }\n * </script>\n * ```\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @param {string} name\n * @returns {objec}\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n * @throws {TypeError} value is not a string\n */\nfunction getGlobalFunction(name) {\n validateString(name);\n let f = globalReference?.[name];\n if (typeof f === 'undefined') throw new Error('the function ' + name + ' is not defined');\n validateFunction(f);\n return f;\n}\n\n\nassignToNamespace('Monster.Types', getGlobal, getGlobalObject, getGlobalFunction);\nexport {Monster, getGlobal, getGlobalObject, getGlobalFunction}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from './base.js';\nimport {validateString} from \"./validate.js\";\n\n/**\n * @private\n * @type {Map<string, integer>}\n */\nlet internalCounter = new Map;\n\n/**\n * With the id class, sequences of ids can be created. for this purpose, an internal counter is incremented for each prefix.\n * thus, the first id with the prefix `myid` will be `myid1` and the second id `myid2`.\n * The ids are the same for every call, for example on a web page.\n *\n * So the ids can also be used for navigation. you just have to take care that the order stays the same.\n *\n * You can call the method via the monster namespace `new Monster.Types.ID()`.\n *\n * ```\n * <script type=\"module\"> \n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/id.js';\n * console.log(new Monster.Types.ID())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/id.js';\n * console.log(new ID())\n * </script>\n * ```\n *\n * As of version 1.6.0 there is the new RandomID. this ID class is continuous from now on.\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ID extends Base {\n\n /**\n * create new object\n */\n constructor(prefix) {\n super();\n\n if (prefix === undefined) {\n prefix = \"id\";\n }\n\n validateString(prefix);\n\n if (!internalCounter.has(prefix)) {\n internalCounter.set(prefix, 1);\n }\n\n let count = internalCounter.get(prefix);\n this.id = prefix + count;\n\n internalCounter.set(prefix, ++count);\n }\n\n /**\n * @return {string}\n */\n toString() {\n return this.id;\n }\n\n}\n\nassignToNamespace('Monster.Types', ID);\nexport {Monster, ID}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {isObject, isFunction, isPrimitive, isArray} from '../types/is.js';\nimport {getGlobal} from '../types/global.js';\n\n\n/**\n * With this function, objects can be cloned.\n * The entire object tree is run through.\n *\n * Proxy, Element, HTMLDocument and DocumentFragment instances are not cloned.\n * Global objects such as windows are also not cloned,\n *\n * If an object has a method `getClone()`, this method is used to create the clone.\n *\n * You can call the method via the monster namespace `Monster.Util.clone()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/clone.js';\n * console.log(Monster.Util.clone({}))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/clone.js';\n * console.log(clone({}))\n * </script>\n * ```\n *\n * @param {*} obj object to be cloned\n * @returns {*}\n *\n * @since 1.0.0\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {Error} unable to clone obj! its type isn't supported.\n */\nfunction clone(obj) {\n\n // typeof null results in 'object'. https://2ality.com/2013/10/typeof-null.html\n if (null === obj) {\n return obj;\n }\n\n // Handle the two simple types, null and undefined\n if (isPrimitive(obj)) {\n return obj;\n }\n \n // Handle the two simple types, null and undefined\n if (isFunction(obj)) {\n return obj;\n }\n\n // Handle Array\n if (isArray(obj)) {\n let copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = clone(obj[i]);\n }\n\n return copy;\n }\n\n if (isObject(obj)) {\n\n\n // Handle Date\n if (obj instanceof Date) {\n let copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n\n /** Do not clone DOM nodes */\n if (typeof Element !== 'undefined' && obj instanceof Element) return obj;\n if (typeof HTMLDocument !== 'undefined' && obj instanceof HTMLDocument) return obj;\n if (typeof DocumentFragment !== 'undefined' && obj instanceof DocumentFragment) return obj;\n\n /** Do not clone global objects */\n if (obj === getGlobal()) return obj;\n if (typeof globalContext !== 'undefined' && obj === globalContext) return obj;\n if (typeof window !== 'undefined' && obj === window) return obj;\n if (typeof document !== 'undefined' && obj === document) return obj;\n if (typeof navigator !== 'undefined' && obj === navigator) return obj;\n if (typeof JSON !== 'undefined' && obj === JSON) return obj;\n\n // Handle Proxy-Object\n try {\n // try/catch because possible: TypeError: Function has non-object prototype 'undefined' in instanceof check\n if (obj instanceof Proxy) {\n return obj;\n }\n } catch (e) {\n }\n\n return cloneObject(obj)\n\n }\n\n throw new Error(\"unable to clone obj! its type isn't supported.\");\n}\n\n/**\n *\n * @param {object} obj\n * @returns {object}\n * @private\n */\nfunction cloneObject(obj) {\n var copy;\n\n /** Object has clone method */\n if (typeof obj.hasOwnProperty('getClone') && obj.getClone === 'function') {\n return obj.getClone();\n }\n\n copy = {};\n if (typeof obj.constructor === 'function' &&\n typeof obj.constructor.call === 'function') {\n copy = new obj.constructor();\n }\n\n for (let key in obj) {\n\n if (!obj.hasOwnProperty(key)) {\n continue;\n }\n\n if (Monster.Types.isPrimitive(obj[key])) {\n copy[key] = obj[key];\n continue;\n }\n\n copy[key] = clone(obj[key]);\n }\n\n return copy;\n}\n\nassignToNamespace('Monster.Util', clone);\nexport {Monster, clone}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {isObject, isArray, isInteger} from '../types/is.js';\nimport {validateString, validateInteger} from '../types/validate.js';\nimport {Base} from '../types/base.js';\nimport {Stack} from \"../types/stack.js\";\n\n/**\n * path separator\n *\n * @private\n * @type {string}\n */\nconst DELIMITER = '.';\n/**\n * @private\n * @type {string}\n */\nconst WILDCARD = '*';\n\n/**\n * You can call the method via the monster namespace `new Monster.Data.Pathfinder()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pathfinder.js';\n * console.log(new Monster.Data.Pathfinder())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pathfinder.js';\n * console.log(new Pathfinder())\n * </script>\n * ```\n *\n * With the help of the pathfinder, values can be read and written from an object construct.\n *\n * ```\n * new Pathfinder({\n * a: {\n * b: {\n * f: [\n * {\n * g: false,\n * }\n * ],\n * }\n * }\n * }).getVia(\"a.b.f.0.g\"); // ↦ false\n * ```\n *\n * if a value is not present or has the wrong type, a corresponding exception is thrown.\n *\n * ```\n * new Pathfinder({}).getVia(\"a.b.f.0.g\"); // ↦ Error\n * ```\n *\n * The `Pathfinder.exists()` method can be used to check whether access to the path is possible.\n *\n * ```\n * new Pathfinder({}).exists(\"a.b.f.0.g\"); // ↦ false\n * ```\n *\n * pathfinder can also be used to build object structures. to do this, the `Pathfinder.setVia()` method must be used.\n *\n * ```\n * obj = {};\n * new Pathfinder(obj).setVia('a.b.0.c', true); // ↦ {a:{b:[{c:true}]}}\n * ```\n *\n * @example\n *\n * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pathfinder.js';\n *\n * let value = new Pathfinder({\n * a: {\n * b: {\n * f: [\n * {\n * g: false,\n * }\n * ],\n * }\n * }\n * }).getVia(\"a.b.f.0.g\");\n *\n * console.log(value);\n * // ↦ false\n *\n * try {\n * new Pathfinder({}).getVia(\"a.b.f.0.g\"); \n * } catch(e) {\n * console.log(e.toString());\n * // ↦ Error: the journey is not at its end (b.f.0.g)\n * }\n *\n * @example\n *\n * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pathfinder.js';\n *\n * let p = new Pathfinder({\n * a: {\n * x: [\n * {c: 1}, {c: 2}\n * ],\n * y: true\n * },\n * b: {\n * x: [\n * {c: 1, d: false}, {c: 2}\n * ],\n * y: true\n * },\n * });\n *\n * let r = p.getVia(\"*.x.*.c\");\n * console.log(r);\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Pathfinder extends Base {\n\n /**\n * @param {array|object|Map|Set} value\n * @since 1.4.0\n **/\n constructor(object) {\n super();\n this.object = object;\n this.wildCard = WILDCARD;\n }\n\n /**\n * set wildcard\n *\n * @param {string} wildcard\n * @return {Pathfinder}\n * @since 1.7.0\n */\n setWildCard(wildcard) {\n validateString(wildcard);\n this.wildCard = wildcard;\n return this;\n }\n\n /**\n *\n * @param {string} path\n * @since 1.4.0\n * @returns {*}\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @throws {Error} unsupported action for this data type\n */\n getVia(path) {\n return getValueViaPath.call(this, this.object, validateString(path));\n }\n\n /**\n *\n * @param {string} path\n * @param {*} value\n * @returns {Pathfinder}\n * @since 1.4.0\n * @throws {TypeError} unsupported type\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @throws {Error} unsupported action for this data type\n */\n setVia(path, value) {\n validateString(path);\n setValueViaPath.call(this, this.object, path, value);\n return this;\n }\n\n /**\n * Delete Via Path\n *\n * @param {string} path\n * @returns {Pathfinder}\n * @since 1.6.0\n * @throws {TypeError} unsupported type\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @throws {Error} unsupported action for this data type\n */\n deleteVia(path) {\n validateString(path);\n deleteValueViaPath.call(this, this.object, path);\n return this;\n }\n\n /**\n *\n * @param {string} path\n * @return {bool}\n * @throws {TypeError} unsupported type\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @since 1.4.0\n */\n exists(path) {\n validateString(path);\n try {\n getValueViaPath.call(this, this.object, path, true);\n return true;\n } catch (e) {\n\n }\n\n return false;\n }\n\n}\n\nassignToNamespace('Monster.Data', Pathfinder);\nexport {Monster, Pathfinder}\n\n/**\n *\n * @param {*} subject\n * @param {string} path\n * @param {string} check\n * @return {Map}\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @private\n */\nfunction iterate(subject, path, check) {\n\n const result = new Map;\n\n if (isObject(subject) || isArray(subject)) {\n for (const [key, value] of Object.entries(subject)) {\n result.set(key, getValueViaPath.call(this, value, path, check))\n }\n } else {\n let key = path.split(DELIMITER).shift();\n result.set(key, getValueViaPath.call(this, subject, path, check));\n }\n\n return result;\n\n\n}\n\n/**\n *\n * @param {*} subject\n * @param [string} path\n * @param [boolean} check \n * @returns {*}\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @private\n */\nfunction getValueViaPath(subject, path, check) {\n\n if (path === \"\") {\n return subject;\n }\n\n let parts = path.split(DELIMITER)\n let current = parts.shift();\n\n if (current === this.wildCard) {\n return iterate.call(this, subject, parts.join(DELIMITER), check);\n }\n\n if (isObject(subject) || isArray(subject)) {\n\n let anchor;\n if (subject instanceof Map || subject instanceof WeakMap) {\n anchor = subject.get(current);\n\n } else if (subject instanceof Set || subject instanceof WeakSet) {\n current = parseInt(current);\n validateInteger(current)\n anchor = [...subject]?.[current];\n\n } else if (typeof WeakRef === 'function' && subject instanceof WeakRef) {\n throw Error('unsupported action for this data type');\n\n } else if (isArray(subject)) {\n current = parseInt(current);\n validateInteger(current)\n anchor = subject?.[current];\n } else {\n anchor = subject?.[current];\n }\n\n if (isObject(anchor) || isArray(anchor)) {\n return getValueViaPath.call(this, anchor, parts.join(DELIMITER), check)\n }\n\n if (parts.length > 0) {\n throw Error(\"the journey is not at its end (\" + parts.join(DELIMITER) + \")\");\n }\n\n if (check === true && !subject.hasOwnProperty(current)) {\n throw Error('unknown value');\n }\n\n return anchor;\n\n }\n\n throw TypeError(\"unsupported type \" + typeof subject)\n\n}\n\n/**\n *\n * @param object\n * @param path\n * @param value\n * @returns {void}\n * @throws {TypeError} unsupported type\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @private\n */\nfunction setValueViaPath(object, path, value) {\n\n validateString(path);\n\n let parts = path.split(DELIMITER)\n let last = parts.pop();\n let subpath = parts.join(DELIMITER);\n\n let stack = new Stack()\n let current = subpath;\n while (true) {\n\n try {\n getValueViaPath.call(this, object, current, true)\n break;\n } catch (e) {\n\n }\n\n stack.push(current);\n parts.pop();\n current = parts.join(DELIMITER);\n\n if (current === \"\") break;\n }\n\n while (!stack.isEmpty()) {\n current = stack.pop();\n let obj = {};\n\n if (!stack.isEmpty()) {\n let n = stack.peek().split(DELIMITER).pop();\n if (isInteger(parseInt(n))) {\n obj = [];\n }\n\n }\n\n setValueViaPath.call(this, object, current, obj);\n }\n\n let anchor = getValueViaPath.call(this, object, subpath);\n\n if (!isObject(object) && !isArray(object)) {\n throw TypeError(\"unsupported type: \" + typeof object);\n }\n\n if (anchor instanceof Map || anchor instanceof WeakMap) {\n anchor.set(last, value);\n } else if (anchor instanceof Set || anchor instanceof WeakSet) {\n anchor.append(value)\n\n } else if (typeof WeakRef === 'function' && anchor instanceof WeakRef) {\n throw Error('unsupported action for this data type');\n\n } else if (isArray(anchor)) {\n last = parseInt(last);\n validateInteger(last)\n assignProperty(anchor, last, value);\n } else {\n assignProperty(anchor, last, value);\n }\n\n return;\n\n}\n\n/**\n * @private\n * @param {object} object\n * @param {string} key\n * @param {*} value\n */\nfunction assignProperty(object, key, value) {\n\n if (!object.hasOwnProperty(key)) {\n object[key]=value;\n return;\n }\n\n if (value === undefined) {\n delete object[key];\n }\n\n object[key]=value;\n return;\n}\n\n/**\n *\n * @param object\n * @param path\n * @returns {void}\n * @throws {TypeError} unsupported type\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @since 1.6.0\n * @private\n */\nfunction deleteValueViaPath(object, path) {\n\n const parts = path.split(DELIMITER)\n let last = parts.pop();\n const subpath = parts.join(DELIMITER);\n\n const anchor = getValueViaPath.call(this, object, subpath);\n\n if (anchor instanceof Map) {\n anchor.delete(last);\n } else if (anchor instanceof Set || anchor instanceof WeakMap || anchor instanceof WeakSet || (typeof WeakRef === 'function' && anchor instanceof WeakRef)) {\n throw Error('unsupported action for this data type');\n\n } else if (isArray(anchor)) {\n last = parseInt(last);\n validateInteger(last)\n delete anchor[last];\n } else {\n delete anchor[last];\n }\n\n return;\n\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from './base.js';\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.Queue()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/stack.js';\n * console.log(new Monster.Types.Stack())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/stack.js';\n * console.log(new Stack())\n * </script>\n * ```\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Stack extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.data = [];\n }\n\n\n /**\n * @return {boolean}\n */\n isEmpty() {\n return this.data.length === 0;\n }\n\n /**\n * looks at the object at the top of this stack without removing it from the stack.\n *\n * @return {*}\n */\n peek() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n return this.data?.[this.data.length - 1];\n }\n\n /**\n * pushes an item onto the top of this stack.\n *\n * @param {*} value\n * @returns {Queue}\n */\n push(value) {\n this.data.push(value)\n return this;\n }\n\n /**\n * remove all entries\n *\n * @returns {Queue}\n */\n clear() {\n this.data = [];\n return this;\n }\n\n /**\n * removes the object at the top of this stack and returns\n * that object as the value of this function. is the stack empty\n * the return value is undefined.\n *\n * @return {*}\n */\n pop() {\n if (this.isEmpty()) {\n return undefined;\n }\n return this.data.pop();\n }\n\n\n}\n\nassignToNamespace('Monster.Types', Stack);\nexport {Monster, Stack}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Pathfinder} from \"../data/pathfinder.js\";\nimport {Pipe} from \"../data/pipe.js\";\nimport {Base} from \"../types/base.js\";\nimport {isInstance, isArray, isIterable} from \"../types/is.js\";\nimport {Observer} from \"../types/observer.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\nimport {validateInstance, validateArray} from \"../types/validate.js\";\nimport {clone} from \"../util/clone.js\";\nimport {Diff} from \"../data/diff.js\";\nimport {\n ATTRIBUTE_UPDATER_REPLACE,\n ATTRIBUTE_UPDATER_ATTRIBUTES,\n ATTRIBUTE_UPDATER_INSERT,\n ATTRIBUTE_UPDATER_REMOVE,\n ATTRIBUTE_UPDATER_INSERT_REFERENCE,\n ATTRIBUTE_UPDATER_BIND\n} from \"../dom/constants.js\";\nimport {findDocumentTemplate} from \"./template.js\";\nimport {getDocument} from \"./util.js\";\n\n\n/**\n * The updater class connects an object with the dom. in this way, structures and contents in the DOM can be programmatically adapted via attributes.\n *\n * For example, to include a string from an object, the attribute `data-monster-replace` can be used.\n *\n * you can call the method via the monster namespace `new Monster.DOM.Updater()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';\n * console.log(new Monster.DOM.Updater())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';\n * console.log(new Updater())\n * </script>\n * ```\n *\n * @example\n *\n * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';\n *\n * // First we prepare the html document.\n * // This is done here via script, but can also be inserted into the document as pure html.\n * // To do this, simply insert the tag <h1 data-monster-replace=\"path:headline\"></h1>.\n * const body = document.querySelector('body');\n * const headline = document.createElement('h1');\n * headline.setAttribute('data-monster-replace','path:headline')\n * body.appendChild(headline);\n *\n * // the data structure\n * let obj = {\n * headline: \"Hello World\",\n * };\n *\n * // Now comes the real magic. we pass the updater the parent HTMLElement\n * // and the desired data structure.\n * const updater = new Updater(body, obj);\n * updater.run();\n *\n * // Now you can change the data structure and the HTML will follow these changes.\n * const subject = updater.getSubject();\n * subject['headline'] = \"Hello World!\"\n *\n * @since 1.8.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} the value is not iterable\n * @throws {Error} pipes are not allowed when cloning a node.\n * @throws {Error} no template was found with the specified key.\n * @throws {Error} the maximum depth for the recursion is reached.\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not an instance of HTMLElement\n */\nclass Updater extends Base {\n\n /**\n * @since 1.8.0\n * @param {HTMLElement} element\n * @param {object|ProxyObserver|undefined} subject\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not an instance of HTMLElement\n */\n constructor(element, subject) {\n super();\n\n /**\n * @type {HTMLElement}\n */\n this.element = validateInstance(element, HTMLElement);\n\n if (subject === undefined) subject = {}\n let a = subject;\n if (!isInstance(subject, ProxyObserver)) {\n subject = new ProxyObserver(subject);\n }\n\n this.last = {};\n this.callbacks = new Map();\n this.callbacks.set('checkstate', getCheckStateCallback.call(this));\n\n /**\n * @type {object}\n */\n this.subject = subject.attachObserver(new Observer(() => {\n\n const s = this.subject.getRealSubject();\n\n const diff = Diff(this.last, s)\n this.last = clone(s);\n\n for (const [, change] of Object.entries(diff)) {\n removeElement.call(this, change);\n insertElement.call(this, change);\n updateContent.call(this, change);\n updateAttributes.call(this, change);\n }\n }));\n\n this.eventTypes = ['keyup', 'click', 'change', 'drop', 'touchend', 'input'];\n\n }\n\n /**\n * Defaults: 'keyup', 'click', 'change', 'drop', 'touchend'\n *\n * @see https://developer.mozilla.org/de/docs/Web/Events\n * @since 1.9.0\n * @param {Array} types\n * @return {Updater}\n */\n setEventTypes(types) {\n this.eventTypes = validateArray(types);\n return this;\n }\n\n /**\n *\n * @since 1.9.0\n * @return {Updater}\n */\n enableEventProcessing() {\n this.disableEventProcessing();\n\n for (const type of this.eventTypes) {\n this.element.addEventListener(type, getControlEventHandler.call(this));\n }\n\n return this;\n\n }\n\n /**\n *\n * @since 1.9.0\n * @return {Updater}\n */\n disableEventProcessing() {\n\n for (const type of this.eventTypes) {\n this.element.removeEventListener(type, getControlEventHandler.call(this));\n }\n\n return this;\n\n }\n\n // /**\n // * \n // * @param {string} path\n // * @param {*} value\n // * @param {boolean} notifyAnyway\n // * @return {Updater}\n // * @since 1.15.0\n // */\n // setVia(path, value, notifyAnyway) {\n // if(isBoolean(notifyAnyway)&¬ifyAnyway===true) {\n // // the key __init__has no further meaning and is only \n // // used to create the diff for empty objects.\n // new Pathfinder(this.last).setVia(path, {'__init__': true});\n // \n // }\n //\n // new Pathfinder(this.subject.getSubject()).setVia(path, value);\n // return this;\n // }\n\n /**\n * Let the magic begin\n *\n * The run method must be called for the update to start working.\n *\n * @return {Promise}\n */\n run() {\n // the key __init__has no further meaning and is only \n // used to create the diff for empty objects.\n this.last = {'__init__': true};\n return this.subject.notifyObservers();\n }\n\n /**\n * If you have passed a ProxyObserver in the constructor, you will get the same object here.\n * However, if you have passed a simple object, you will get the ProxyObserver here.\n *\n * For changes the ProxyObserver must be used.\n *\n * @since 1.8.0\n * @return {ProxyObserver}\n */\n getSubject() {\n return this.subject.getSubject();\n }\n\n /**\n * This method can be used to register commands that can be called via call: instruction.\n * This can be used to provide a pipe with its own functionality.\n *\n * @param {string} name\n * @param {function} callback\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback) {\n this.callbacks.set(name, callback);\n return this;\n }\n\n}\n\n/**\n * @private\n * @since 1.9.0\n * @return {function}\n */\nfunction getCheckStateCallback() {\n const self = this;\n\n return function (current) {\n\n if (this instanceof HTMLInputElement) {\n if (['radio', 'checkbox'].indexOf(this.type) !== -1) {\n return (this.value + \"\" === current + \"\") ? 'true' : undefined\n }\n } else if (this instanceof HTMLOptionElement) {\n\n if (isArray(current) && current.indexOf(this.value) !== -1) {\n return 'true'\n }\n return undefined;\n\n\n }\n }\n}\n\n/**\n * @private\n */\nconst symbol = Symbol('EventHandler');\n\n/**\n * @private\n * @return {function}\n */\nfunction getControlEventHandler() {\n\n const self = this;\n\n if (self[symbol]) {\n return self[symbol];\n }\n\n const pathfinder = new Pathfinder(this.subject.getSubject());\n\n /**\n * @throws {Error} the bind argument must start as a value with a path.\n * @throws {Error} unsupported object\n * @param {Event} event\n */\n self[symbol] = (event) => {\n const element = event.target;\n\n if (!element.hasAttribute(ATTRIBUTE_UPDATER_BIND)) {\n return;\n }\n\n let path = element.getAttribute(ATTRIBUTE_UPDATER_BIND);\n\n if (path.indexOf('path:') !== 0) {\n throw new Error('the bind argument must start as a value with a path.');\n }\n\n path = path.substr(5);\n\n let value;\n\n if (element instanceof HTMLInputElement) {\n switch (element.type) {\n\n case 'checkbox':\n value = element.checked ? element.value : undefined;\n break;\n default:\n value = element.value;\n break;\n\n\n }\n } else if (element instanceof HTMLTextAreaElement) {\n value = element.value;\n\n } else if (element instanceof HTMLSelectElement) {\n\n switch (element.type) {\n case 'select-one':\n value = element.value;\n break;\n case 'select-multiple':\n value = element.value;\n\n let options = element?.selectedOptions;\n if (options === undefined) options = element.querySelectorAll(\":scope option:checked\");\n value = Array.from(options).map(({value}) => value);\n\n break;\n }\n\n\n // values from customelements \n } else if ((element?.constructor?.prototype && !!Object.getOwnPropertyDescriptor(element.constructor.prototype, 'value')?.['get']) || element.hasOwnProperty('value')) {\n value = element?.['value'];\n } else {\n throw new Error(\"unsupported object\");\n }\n\n const copy = clone(self.subject.getRealSubject());\n const pf = new Pathfinder(copy);\n pf.setVia(path, value);\n\n const diff = new Diff(copy, self.subject.getRealSubject());\n\n if (diff.length > 0) {\n pathfinder.setVia(path, value);\n }\n\n }\n\n return self[symbol];\n\n\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {object} change\n * @return {void}\n */\nfunction removeElement(change) {\n for (const [, element] of this.element.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_REMOVE + ']').entries()) {\n element.parentNode.removeChild(element);\n }\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {object} change\n * @return {void}\n * @throws {Error} the value is not iterable\n * @throws {Error} pipes are not allowed when cloning a node.\n * @throws {Error} no template was found with the specified key.\n * @throws {Error} the maximum depth for the recursion is reached.\n */\nfunction insertElement(change) {\n const self = this;\n const subject = self.subject.getRealSubject();\n const document = getDocument();\n\n let mem = new WeakSet;\n let wd = 0;\n\n\n while (true) {\n let found = false;\n wd++;\n\n let p = clone(change?.['path']);\n if (!isArray(p)) return this;\n\n while (p.length > 0) {\n const current = p.join('.');\n const list = this.element.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_INSERT + '*=\"path:' + current + '\"]').entries()\n\n for (const [, containerElement] of list) {\n\n if (mem.has(containerElement)) continue;\n mem.add(containerElement)\n\n found = true;\n\n const attributes = containerElement.getAttribute(ATTRIBUTE_UPDATER_INSERT);\n let def = attributes.trim();\n let i = def.indexOf(' ');\n let key = def.substr(0, i).trim();\n let refPrefix = key + '-';\n let cmd = def.substr(i).trim();\n\n // this case is actually excluded by the query but is nevertheless checked again here\n if (cmd.indexOf('|') > 0) {\n throw new Error(\"pipes are not allowed when cloning a node.\");\n }\n\n let pipe = new Pipe(cmd);\n this.callbacks.forEach((f, n) => {\n pipe.setCallback(n, f);\n })\n\n let value = pipe.run(subject)\n let dataPath = cmd.split(':').pop();\n\n let insertPoint;\n if (containerElement.hasChildNodes()) {\n insertPoint = containerElement.lastChild;\n }\n\n if (!isIterable(value)) {\n throw new Error('the value is not iterable');\n }\n\n let available = new Set;\n\n for (const [i, obj] of Object.entries(value)) {\n let ref = refPrefix + i;\n let currentPath = dataPath + \".\" + i;\n\n available.add(ref);\n let refElement = containerElement.querySelector('[' + ATTRIBUTE_UPDATER_INSERT_REFERENCE + '=\"' + ref + '\"]');\n\n if (refElement instanceof HTMLElement) {\n insertPoint = refElement;\n continue;\n }\n\n appendNewDocumentFragment(containerElement, key, ref, currentPath);\n }\n\n let nodes = containerElement.querySelectorAll('[' + ATTRIBUTE_UPDATER_INSERT_REFERENCE + '*=\"' + refPrefix + '\"]');\n for (const [, node] of Object.entries(nodes)) {\n if (!available.has(node.getAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {\n containerElement.removeChild(node);\n }\n }\n }\n\n p.pop();\n }\n\n if (found === false) break;\n if (wd++ > 200) {\n throw new Error('the maximum depth for the recursion is reached.');\n }\n\n }\n\n\n}\n\n/**\n *\n * @private\n * @since 1.8.0\n * @param {HTMLElement} container\n * @param {string} key\n * @param {string} ref\n * @param {string} path\n * @throws {Error} no template was found with the specified key.\n */\nfunction appendNewDocumentFragment(container, key, ref, path) {\n\n let rootNode = container.getRootNode();\n if (!rootNode) {\n rootNode = getDocument();\n }\n\n let template = findDocumentTemplate(key, rootNode);\n\n let nodes = template.createDocumentFragment();\n for (const [, node] of Object.entries(nodes.childNodes)) {\n if (node instanceof HTMLElement) {\n\n applyRecursive(node, key, path);\n node.setAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE, ref);\n }\n\n container.appendChild(node);\n }\n}\n\n/**\n * @private\n * @since 1.10.0\n * @param {HTMLElement} node\n * @param {string} key\n * @param {string} path\n * @return {void}\n */\nfunction applyRecursive(node, key, path) {\n\n if (node instanceof HTMLElement) {\n\n if (node.hasAttribute(ATTRIBUTE_UPDATER_REPLACE)) {\n let value = node.getAttribute(ATTRIBUTE_UPDATER_REPLACE);\n node.setAttribute(ATTRIBUTE_UPDATER_REPLACE, value.replace(\"path:\" + key, \"path:\" + path));\n }\n\n if (node.hasAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES)) {\n let value = node.getAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES);\n node.setAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES, value.replace(\"path:\" + key, \"path:\" + path));\n }\n\n for (const [, child] of Object.entries(node.childNodes)) {\n applyRecursive(child, key, path);\n }\n }\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {object} change\n * @return {void}\n */\nfunction updateContent(change) {\n const self = this;\n const subject = self.subject.getRealSubject();\n\n let p = clone(change?.['path']);\n runUpdateContent.call(this, this.element, p, subject);\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {HTMLElement} container\n * @param {array} parts\n * @param {object} subject\n * @return {void}\n */\nfunction runUpdateContent(container, parts, subject) {\n if (!isArray(parts)) return;\n parts = clone(parts);\n\n let mem = new WeakSet;\n\n while (parts.length > 0) {\n const current = parts.join('.');\n parts.pop();\n\n // Unfortunately, static data is always changed as well, since it is not possible to react to changes here.\n for (const [, element] of container.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_REPLACE + '^=\"path:' + current + '\"], [' + ATTRIBUTE_UPDATER_REPLACE + '^=\"static:\"]').entries()) {\n\n if (mem.has(element)) continue;\n mem.add(element)\n\n const attributes = element.getAttribute(ATTRIBUTE_UPDATER_REPLACE)\n let cmd = attributes.trim();\n\n let pipe = new Pipe(cmd);\n this.callbacks.forEach((f, n) => {\n pipe.setCallback(n, f);\n })\n\n let value = pipe.run(subject)\n\n if (value instanceof HTMLElement) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n element.addNode(value);\n } else {\n element.innerHTML = value;\n }\n\n }\n }\n\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {string} path\n * @param {object} change\n * @return {void}\n */\nfunction updateAttributes(change) {\n const subject = this.subject.getRealSubject();\n let p = clone(change?.['path']);\n runUpdateAttributes.call(this, this.element, p, subject);\n}\n\n/**\n * @private\n * @param {HTMLElement} container\n * @param {array} parts\n * @param {object} subject\n * @return {void}\n */\nfunction runUpdateAttributes(container, parts, subject) {\n\n const self = this;\n\n if (!isArray(parts)) return;\n parts = clone(parts);\n\n let mem = new WeakSet;\n\n while (parts.length > 0) {\n const current = parts.join('.');\n parts.pop();\n\n for (const [, element] of container.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_ATTRIBUTES + '*=\"path:' + current + '\"]').entries()) {\n\n if (mem.has(element)) continue;\n mem.add(element)\n\n const attributes = element.getAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES)\n\n for (let [, def] of Object.entries(attributes.split(','))) {\n def = def.trim();\n let i = def.indexOf(' ');\n let name = def.substr(0, i).trim();\n let cmd = def.substr(i).trim();\n\n let pipe = new Pipe(cmd);\n\n self.callbacks.forEach((f, n) => {\n pipe.setCallback(n, f, element);\n })\n\n let value = pipe.run(subject)\n\n if (value === undefined) {\n element.removeAttribute(name)\n\n } else if (element.getAttribute(name) !== value) {\n element.setAttribute(name, value);\n }\n\n handleInputControlAttributeUpdate.call(this, element, name, value);\n\n\n }\n }\n\n }\n\n}\n\n/**\n * @private\n * @param {HTMLElement|*} element\n * @param {string} name\n * @param {string|number|undefined} value\n * @return {void}\n */\n\nfunction handleInputControlAttributeUpdate(element, name, value) {\n const self = this;\n\n if (element instanceof HTMLSelectElement) {\n\n\n switch (element.type) {\n case 'select-multiple':\n\n for (const [index, opt] of Object.entries(element.options)) {\n if (value.indexOf(opt.value) !== -1) {\n opt.selected = true;\n } else {\n opt.selected = false;\n }\n }\n\n break;\n case 'select-one':\n // Only one value may be selected\n\n for (const [index, opt] of Object.entries(element.options)) {\n if (opt.value === value) {\n element.selectedIndex = index;\n break;\n }\n }\n\n break;\n }\n\n\n } else if (element instanceof HTMLInputElement) {\n switch (element.type) {\n\n case 'radio':\n if (name === 'checked' && value !== undefined) {\n element.checked = true;\n } else {\n element.checked = false;\n }\n\n break;\n\n case 'checkbox':\n if (name === 'checked' && value !== undefined) {\n element.checked = true;\n } else {\n element.checked = false;\n }\n\n break;\n case 'text':\n default:\n if (name === 'value') {\n element.value = (value === undefined ? \"\" : value);\n }\n\n break;\n\n\n }\n } else if (element instanceof HTMLTextAreaElement) {\n if (name === 'value') {\n element.value = (value === undefined ? \"\" : value);\n }\n }\n\n}\n\nassignToNamespace('Monster.DOM', Updater);\nexport {Monster, Updater}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {TokenList} from './tokenlist.js';\nimport {isObject} from './is.js';\nimport {Base} from './base.js';\nimport {UniqueQueue} from './uniquequeue.js';\n\n/**\n * An observer manages a callback function\n *\n * You can call the method via the monster namespace `new Monster.Types.Observer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/observer.js';\n * console.log(new Monster.Types.Observer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/observer.js';\n * console.log(new Observer())\n * </script>\n * ```\n *\n * The update method is called with the subject object as this pointer. For this reason the callback should not\n * be an arrow function, because it gets the this pointer of its own context.\n *\n * ```\n * <script>\n * new Observer(()=>{\n * // this is not subject\n * })\n *\n * new Observer(function() {\n * // this is subject\n * })\n * </script>\n * ```\n *\n * Additional arguments can be passed to the callback. To do this, simply specify them.\n *\n * ```\n * <script>\n * Observer(function(a, b, c) {\n * console.log(a, b, c); // ↦ \"a\", 2, true \n * }, \"a\", 2, true)\n * </script>\n * ```\n *\n * The callback function must have as many parameters as arguments are given.\n *\n * @example\n *\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/observer.js';\n *\n * const observer = new Observer(function(a, b, c) {\n * console.log(this, a, b, c); // ↦ \"a\", 2, true \n * }, \"a\", 2, true);\n *\n * observer.update({value:true}).then(()=>{});\n * // ↦ {value: true} \"a\" 2 true\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Observer extends Base {\n\n /**\n *\n * @param {function} callback\n * @param {*} args\n */\n constructor(callback, ...args) {\n super();\n\n if (typeof callback !== 'function') {\n throw new Error(\"observer callback must be a function\")\n }\n\n this.callback = callback;\n this.arguments = args;\n this.tags = new TokenList;\n this.queue = new UniqueQueue();\n }\n\n /**\n *\n * @param {string} tag\n * @returns {Observer}\n */\n addTag(tag) {\n this.tags.add(tag);\n return this;\n }\n\n /**\n *\n * @param {string} tag\n * @returns {Observer}\n */\n removeTag(tag) {\n this.tags.remove(tag);\n return this;\n }\n\n /**\n *\n * @returns {Array}\n */\n getTags() {\n return this.tags.entries()\n }\n\n /**\n *\n * @param {string} tag\n * @returns {boolean}\n */\n hasTag(tag) {\n return this.tags.contains(tag)\n }\n\n /**\n *\n * @param {object} subject\n * @returns {Promise}\n */\n update(subject) {\n let self = this;\n\n return new Promise(function (resolve, reject) {\n if (!isObject(subject)) {\n reject(\"subject must be an object\");\n return;\n }\n\n self.queue.add(subject);\n\n setTimeout(() => {\n\n try {\n // the queue and the settimeout ensure that an object is not \n // informed of the same change more than once.\n if (self.queue.isEmpty()) {\n resolve();\n return;\n }\n\n let s = self.queue.poll();\n let result = self.callback.apply(s, self.arguments);\n\n if (isObject(result) && result instanceof Promise) {\n result.then(resolve).catch(reject);\n return;\n }\n\n resolve(result);\n\n } catch (e) {\n reject(e);\n }\n }, 0)\n\n });\n\n };\n\n}\n\nassignToNamespace('Monster.Types', Observer);\nexport {Monster, Observer}\n\n\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from './base.js';\nimport {isString, isIterable} from '../types/is.js';\nimport {validateString, validateFunction} from '../types/validate.js';\n\n/**\n * A tokenlist allows you to manage tokens (individual character strings such as css classes in an attribute string).\n *\n * The tokenlist offers various functions to manipulate values. For example, you can add, remove or replace a class in a CSS list.\n *\n * You can call the method via the monster namespace `new Monster.Types.TokenList()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/tokenlist.js';\n * console.log(new Monster.Types.TokenList(\"myclass row\"))\n * console.log(new Monster.Types.TokenList(\"myclass row\"))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/tokenlist.js';\n * console.log(new TokenList(\"myclass row\"))\n * console.log(new TokenList(\"myclass row\"))\n * </script>\n * ```\n *\n * This class implements the [iteration protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).\n *\n * ```\n * console.log(typeof new TokenList(\"myclass row\")[Symbol.iterator]); // \"function\"\n * ```\n *\n * @since 1.2.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass TokenList extends Base {\n\n /**\n *\n * @param {array|string|iteratable} init\n */\n constructor(init) {\n super();\n this.tokens = new Set();\n\n if (typeof init !== \"undefined\") {\n this.add(init);\n }\n\n }\n\n /**\n * Iterator protocol\n *\n * @returns {Symbol.iterator}\n */\n getIterator() {\n return this[Symbol.iterator]();\n }\n\n /**\n * Iterator\n *\n * @returns {{next: ((function(): ({value: *, done: boolean}))|*)}}\n */\n [Symbol.iterator]() {\n // Use a new index for each iterator. This makes multiple\n // iterations over the iterable safe for non-trivial cases,\n // such as use of break or nested looping over the same iterable.\n let index = 0;\n let entries = this.entries()\n\n return {\n next: () => {\n if (index < entries.length) {\n return {value: entries?.[index++], done: false}\n } else {\n return {done: true}\n }\n }\n }\n }\n\n /**\n * Returns true if it contains token, otherwise false\n *\n * ```\n * new TokenList(\"start middle end\").contains('start')); // ↦ true\n * new TokenList(\"start middle end\").contains('end')); // ↦ true\n * new TokenList(\"start middle end\").contains('xyz')); // ↦ false\n * new TokenList(\"start middle end\").contains(['end','start','middle'])); // ↦ true\n * new TokenList(\"start middle end\").contains(['end','start','xyz'])); // ↦ false\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {boolean}\n */\n contains(value) {\n if (isString(value)) {\n value = value.trim()\n let counter = 0;\n value.split(\" \").forEach(token => {\n if (this.tokens.has(token.trim()) === false) return false;\n counter++\n })\n return counter > 0 ? true : false;\n }\n\n if (isIterable(value)) {\n let counter = 0;\n for (let token of value) {\n validateString(token);\n if (this.tokens.has(token.trim()) === false) return false;\n counter++\n }\n return counter > 0 ? true : false;\n }\n\n return false;\n }\n\n /**\n * add tokens\n *\n * ```\n * new TokenList().add(\"abc xyz\").toString(); // ↦ \"abc xyz\"\n * new TokenList().add([\"abc\",\"xyz\"]).toString(); // ↦ \"abc xyz\"\n * new TokenList().add(undefined); // ↦ add nothing\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {TokenList}\n * @throws {TypeError} unsupported value\n */\n add(value) {\n if (isString(value)) {\n value.split(\" \").forEach(token => {\n this.tokens.add(token.trim());\n })\n } else if (isIterable(value)) {\n for (let token of value) {\n validateString(token);\n this.tokens.add(token.trim());\n }\n } else if (typeof value !== \"undefined\") {\n throw new TypeError(\"unsupported value\");\n }\n\n return this;\n }\n\n /**\n * remove all tokens\n *\n * @returns {TokenList}\n */\n clear() {\n this.tokens.clear();\n return this;\n }\n\n /**\n * Removes token\n *\n * ```\n * new TokenList(\"abc xyz\").remove(\"xyz\").toString(); // ↦ \"abc\"\n * new TokenList(\"abc xyz\").remove([\"xyz\"]).toString(); // ↦ \"abc\"\n * new TokenList(\"abc xyz\").remove(undefined); // ↦ remove nothing\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {TokenList}\n * @throws {TypeError} unsupported value\n */\n remove(value) {\n if (isString(value)) {\n value.split(\" \").forEach(token => {\n this.tokens.delete(token.trim());\n })\n } else if (isIterable(value)) {\n for (let token of value) {\n validateString(token);\n this.tokens.delete(token.trim());\n }\n } else if (typeof value !== \"undefined\") {\n throw new TypeError(\"unsupported value\");\n }\n\n return this;\n }\n\n /**\n * this method replaces a token with a new token.\n *\n * if the passed token exists, it is replaced with newToken and TokenList is returned.\n * if the token does not exist, newToken is not set and TokenList is returned.\n *\n * @param {string} token\n * @param {string} newToken\n * @returns {TokenList}\n */\n replace(token, newToken) {\n validateString(token);\n validateString(newToken);\n if (!this.contains(token)) {\n return this;\n }\n\n let a = Array.from(this.tokens)\n let i = a.indexOf(token);\n if (i === -1) return this;\n\n a.splice(i, 1, newToken);\n this.tokens = new Set();\n this.add(a);\n\n return this;\n\n\n }\n\n /**\n * Removes token from string. If token doesn't exist it's added.\n * \n * ```\n * new TokenList(\"abc def ghi\").toggle(\"def xyz\").toString(); // ↦ \"abc ghi xyz\"\n * new TokenList(\"abc def ghi\").toggle([\"abc\",\"xyz\"]).toString(); // ↦ \"def ghi xyz\"\n * new TokenList().toggle(undefined); // ↦ nothing\n * ```\n * \n * @param {array|string|iteratable} value\n * @returns {boolean}\n * @throws {TypeError} unsupported value\n */\n toggle(value) {\n\n if (isString(value)) {\n value.split(\" \").forEach(token => {\n toggleValue.call(this, token);\n })\n } else if (isIterable(value)) {\n for (let token of value) {\n toggleValue.call(this, token);\n }\n } else if (typeof value !== \"undefined\") {\n throw new TypeError(\"unsupported value\");\n }\n\n return this;\n\n }\n\n /**\n * returns an array with all tokens\n *\n * @returns {array}\n */\n entries() {\n return Array.from(this.tokens)\n }\n\n /**\n * executes the provided function with each value of the set\n *\n * @param {function} callback\n * @returns {TokenList}\n */\n forEach(callback) {\n validateFunction(callback);\n this.tokens.forEach(callback);\n return this;\n }\n\n /**\n * returns the individual tokens separated by a blank character\n *\n * @returns {string}\n */\n toString() {\n return this.entries().join(' ');\n }\n\n}\n\n/**\n * @private\n * @param token\n * @returns {toggleValue}\n * @throws {Error} must be called with TokenList.call\n */\nfunction toggleValue(token) {\n if (!(this instanceof TokenList)) throw Error(\"must be called with TokenList.call\")\n validateString(token);\n token = token.trim();\n if (this.contains(token)) {\n this.remove(token);\n return this;\n }\n this.add(token);\n return this;\n}\n\nassignToNamespace('Monster.Types', TokenList);\nexport {Monster, TokenList}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Queue} from \"./queue.js\";\nimport {validateObject} from \"./validate.js\";\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.Queue()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/uniquequeue.js';\n * console.log(new Monster.Types.UniqueQueue())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/uniquequeue.js';\n * console.log(new UniqueQueue())\n * </script>\n * ```\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass UniqueQueue extends Queue {\n\n /**\n *\n */\n constructor() {\n super();\n this.unique = new WeakSet();\n }\n\n /**\n * Add a new element to the end of the queue.\n *\n * @param {object} value\n * @returns {Queue}\n * @throws {TypeError} value is not a object\n */\n add(value) {\n \n validateObject(value);\n \n if (!this.unique.has(value)) {\n this.unique.add(value);\n super.add(value);\n }\n \n return this;\n }\n\n /**\n * remove all entries\n *\n * @returns {Queue}\n */\n clear() {\n super.clear();\n this.unique = new WeakSet;\n return this;\n }\n\n /**\n * Remove the element at the front of the queue\n * If the queue is empty, return undefined.\n *\n * @return {object}\n */\n poll() {\n\n if (this.isEmpty()) {\n return undefined;\n }\n let value = this.data.shift();\n this.unique.delete(value);\n return value;\n }\n\n\n}\n\nassignToNamespace('Monster.Types', UniqueQueue);\nexport {Monster, UniqueQueue}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from './base.js';\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.Queue()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/queue.js';\n * console.log(new Monster.Types.Queue())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/queue.js';\n * console.log(new Queue())\n * </script>\n * ```\n *\n * @example\n *\n * import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/queue.js';\n *\n * const queue = new Queue;\n *\n * queue.add(2);\n * queue.add(true);\n * queue.add(\"Hello\");\n * queue.add(4.5);\n *\n * console.log(queue.poll());\n * // ↦ 2\n * console.log(queue.poll());\n * // ↦ true\n * console.log(queue.poll());\n * // ↦ \"Hello\"\n * console.log(queue.poll());\n * // ↦ 4.5\n * console.log(queue.poll());\n * // ↦ undefined\n *\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Queue extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.data = [];\n }\n\n\n /**\n * @return {boolean}\n */\n isEmpty() {\n return this.data.length === 0;\n }\n\n /**\n * Read the element at the front of the queue without removing it.\n *\n * @return {*}\n */\n peek() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n return this.data[0];\n }\n\n /**\n * Add a new element to the end of the queue.\n *\n * @param {*} value\n * @returns {Queue}\n */\n add(value) {\n this.data.push(value)\n return this;\n }\n\n /**\n * remove all entries\n *\n * @returns {Queue}\n */\n clear() {\n this.data = [];\n return this;\n }\n\n /**\n * Remove the element at the front of the queue\n * If the queue is empty, return undefined.\n *\n * @return {*}\n */\n poll() {\n if (this.isEmpty()) {\n return undefined;\n }\n return this.data.shift();\n }\n\n\n}\n\nassignToNamespace('Monster.Types', Queue);\nexport {Monster, Queue}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from './base.js';\nimport {validateObject} from \"./validate.js\";\nimport {ObserverList} from \"./observerlist.js\";\nimport {Observer} from \"./observer.js\";\nimport {isObject, isArray, isPrimitive} from \"./is.js\";\n\n/**\n * An observer manages a callback function\n *\n * You can call create the class via the monster namespace `new Monster.Types.ProxyObserver()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/proxyobserver.js';\n * console.log(new Monster.Types.ProxyObserver())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this class individually.\n *\n * ```\n * <script type=\"module\">\n * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/proxyobserver.js';\n * console.log(new ProxyObserver())\n * </script>\n * ```\n *\n * with the ProxyObserver you can attach observer for observation. with each change at the object to be observed an update takes place.\n *\n * this also applies to nested objects.\n *\n * @example\n *\n * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/proxyobserver.js';\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/observer.js';\n * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/is.js';\n *\n * const o = new Observer(function () { \n * if (isObject(this) && this instanceof ProxyObserver) {\n * // do something (this ist ProxyObserver)\n * const subject = this.getSubject();\n * console.log(subject);\n * }\n * });\n *\n * let realSubject = {\n * a: {\n * b: {\n * c: true\n * },\n * d: 9\n * }\n * }\n *\n * const p = new ProxyObserver(realSubject);\n * p.attachObserver(o);\n * const s = p.getSubject();\n * s.a.b.c = false;\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ProxyObserver extends Base {\n\n /**\n *\n * @param {object} object\n * @throws {TypeError} value is not a object\n */\n constructor(object) {\n super();\n\n this.realSubject = validateObject(object);\n this.subject = new Proxy(object, getHandler.call(this));\n\n this.objectMap = new WeakMap();\n this.objectMap.set(this.realSubject, this.subject);\n\n this.proxyMap = new WeakMap();\n this.proxyMap.set(this.subject, this.realSubject);\n\n this.observers = new ObserverList;\n }\n\n /**\n * get the real object\n *\n * changes to this object are not noticed by the observers, so you can make a large number of changes and inform the observers later.\n *\n * @returns {object}\n */\n getSubject() {\n return this.subject\n }\n\n /**\n * get the proxied object\n *\n * @returns {object}\n */\n getRealSubject() {\n return this.realSubject\n }\n\n /**\n * attach a new observer\n *\n * @param {Observer} observer\n * @returns {ProxyObserver}\n */\n attachObserver(observer) {\n this.observers.attach(observer)\n return this;\n }\n\n /**\n * detach a observer\n *\n * @param {Observer} observer\n * @returns {ProxyObserver}\n */\n detachObserver(observer) {\n this.observers.detach(observer)\n return this;\n }\n\n /**\n * notify all observer\n *\n * @returns {Promise}\n */\n notifyObservers() {\n return this.observers.notify(this);\n }\n\n /**\n * @param {Observer} observer\n * @returns {boolean}\n */\n containsObserver(observer) {\n return this.observers.contains(observer)\n }\n\n}\n\nassignToNamespace('Monster.Types', ProxyObserver);\nexport {Monster, ProxyObserver}\n\n/**\n *\n * @returns {{defineProperty: (function(*=, *=, *=): *), setPrototypeOf: (function(*, *=): boolean), set: (function(*, *, *, *): boolean), get: ((function(*=, *=, *=): (undefined))|*), deleteProperty: ((function(*, *): (boolean))|*)}}\n * @private\n * @see {@link https://gitlab.schukai.com/-/snippets/49}\n */\nfunction getHandler() {\n\n const proxy = this;\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots\n const handler = {\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver\n get: function (target, key, receiver) {\n\n const value = Reflect.get(target, key, receiver);\n\n if (typeof key === \"symbol\") {\n return value;\n }\n\n if (isPrimitive(value)) {\n return value;\n }\n\n // set value as proxy if object or array\n if ((isArray(value) || isObject(value))) {\n if (proxy.objectMap.has(value)) {\n return proxy.objectMap.get(value);\n } else if (proxy.proxyMap.has(value)) {\n return value;\n } else {\n let p = new Proxy(value, handler);\n proxy.objectMap.set(value, p);\n proxy.proxyMap.set(p, value);\n return p;\n }\n\n }\n\n return value;\n\n },\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver \n set: function (target, key, value, receiver) {\n\n if(proxy.proxyMap.has(value)) {\n value= proxy.proxyMap.get(value);\n } \n \n if(proxy.proxyMap.has(target)) {\n target= proxy.proxyMap.get(target);\n }\n \n let current = Reflect.get(target, key, receiver);\n if(proxy.proxyMap.has(current)) {\n current= proxy.proxyMap.get(current);\n }\n \n if (current === value) {\n return true;\n }\n\n let result;\n let descriptor = Reflect.getOwnPropertyDescriptor(target, key);\n\n if (descriptor === undefined) {\n descriptor = {\n writable: true,\n enumerable: true,\n configurable: true\n }\n }\n\n descriptor['value'] = value;\n result = Reflect.defineProperty(target, key, descriptor);\n\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n\n return result;\n },\n\n \n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-delete-p\n deleteProperty: function (target, key) {\n if (key in target) {\n delete target[key];\n\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n\n return true;\n }\n return false;\n },\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc\n defineProperty: function (target, key, descriptor) {\n\n let result = Reflect.defineProperty(target, key, descriptor);\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n return result;\n },\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v\n setPrototypeOf: function (target, key) {\n let result = Reflect.setPrototypeOf(object1, key);\n\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n\n return result;\n }\n\n };\n\n\n return handler;\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from './base.js';\nimport {Observer} from \"./observer.js\";\nimport {validateInstance} from \"./validate.js\";\n\n/**\n * With the help of the ObserverList class, observer can be managed.\n *\n * You can call the method via the monster namespace `new Monster.Types.ObserverList()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/observerlist.js';\n * console.log(new Monster.Types.ObserverList())\n * console.log(new Monster.Types.ObserverList())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/observerlist.js';\n * console.log(ObserverList())\n * console.log(ObserverList())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ObserverList extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.observers = [];\n }\n\n /**\n *\n * @param {Observer} observer\n * @return {ObserverList}\n * @throws {TypeError} value is not an instance of Observer\n */\n attach(observer) {\n validateInstance(observer, Observer)\n\n this.observers.push(observer);\n return this;\n };\n\n /**\n *\n * @param {Observer} observer\n * @return {ObserverList}\n * @throws {TypeError} value is not an instance of Observer\n */\n detach(observer) {\n validateInstance(observer, Observer)\n\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n this.observers.splice(i, 1);\n }\n }\n\n return this;\n };\n\n /**\n *\n * @param {Observer} observer\n * @return {boolean}\n * @throws {TypeError} value is not an instance of Observer\n */\n contains(observer) {\n validateInstance(observer, Observer)\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n return true;\n }\n }\n return false;\n };\n\n /**\n *\n * @param subject\n * @return {Promise}\n */\n notify(subject) {\n\n let pomises = []\n\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n pomises.push(this.observers[i].update(subject));\n }\n\n return Promise.all(pomises);\n };\n\n}\n\nassignToNamespace('Monster.Types', ObserverList);\nexport {Monster, ObserverList}\n","'use strict';\n\n/**\n * @author schukai GmbH \n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { isArray, isObject} from \"../types/is.js\";\n\n/**\n * With the diff function you can perform the change of one object to another. The result shows the changes of the second object to the first object.\n *\n * The operator `add` means that something has been added to the second object. `delete` means that something has been deleted from the second object compared to the first object.\n *\n * You can call the method via the monster namespace `Monster.Data.Diff()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/diff.js';\n * console.log(Monster.Data.Diff(a, b))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/diff.js';\n * console.log(Diff(a, b))\n * </script>\n * ```\n *\n * @example\n * \n * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/diff.js';\n * \n * // given are two objects x and y.\n *\n * let x = {\n * a: 1,\n * b: \"Hello!\"\n * }\n *\n * let y = {\n * a: 2,\n * c: true\n * }\n *\n * // These two objects can be compared with each other.\n *\n * console.log(Diff(x, y));\n *\n * // the result is then the following\n *\n * //\n * // [\n * // {\n * // operator: 'update',\n * // path: [ 'a' ],\n * // first: { value: 1, type: 'number' },\n * // second: { value: 2, type: 'number' }\n * // },\n * // {\n * // operator: 'delete',\n * // path: [ 'b' ],\n * // first: { value: 'Hello!', type: 'string' }\n * // },\n * // {\n * // operator: 'add',\n * // path: [ 'c' ],\n * // second: { value: true, type: 'boolean' }\n * // }\n * // ]\n *\n * @param {*} first\n * @param {*} second\n * @return {array}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nfunction Diff(first, second) {\n return doDiff(first, second)\n}\n\n/**\n * @private\n * @param a\n * @param b\n * @param type\n * @return {Set<string>|Set<number>}\n */\nfunction getKeys(a, b, type) {\n if (isArray(type)) {\n const keys = a.length > b.length ? new Array(a.length) : new Array(b.length);\n keys.fill(0);\n return new Set(keys.map((_, i) => i));\n }\n\n return new Set(Object.keys(a).concat(Object.keys(b)));\n}\n\n/**\n * @private\n * @param a\n * @param b\n * @param path\n * @param diff\n * @return {array}\n */\nfunction doDiff(a, b, path, diff) {\n\n let typeA = typeof a\n let typeB = typeof b\n\n const currPath = path || [];\n const currDiff = diff || [];\n\n if (typeA === typeB && typeA === 'object') { // array is object too\n\n getKeys(a, b, typeA).forEach((v) => {\n\n if (!(Object.prototype.hasOwnProperty.call(a, v))) {\n currDiff.push(buildResult(a[v], b[v], 'add', currPath.concat(v)));\n } else if (!(Object.prototype.hasOwnProperty.call(b, v))) {\n currDiff.push(buildResult(a[v], b[v], 'delete', currPath.concat(v)));\n } else {\n doDiff(a[v], b[v], currPath.concat(v), currDiff);\n }\n });\n\n } else {\n\n const o = getOperator(a, b, typeA, typeB);\n if (o !== undefined) {\n currDiff.push(buildResult(a, b, o, path));\n }\n\n }\n\n return currDiff;\n\n}\n\n/**\n *\n * @param {*} a\n * @param {*} b\n * @param {string} operator\n * @param {array} path\n * @return {{path: array, operator: string}}\n * @private\n */\nfunction buildResult(a, b, operator, path) {\n\n const result = {\n operator,\n path,\n };\n\n if (operator !== 'add') {\n result.first = {\n value: a,\n type: typeof a\n };\n\n if (isObject(a)) {\n const name = Object.getPrototypeOf(a)?.constructor?.name;\n if (name !== undefined) {\n result.first.instance = name;\n }\n }\n }\n\n if (operator === 'add' || operator === 'update') {\n result.second = {\n value: b,\n type: typeof b\n };\n\n if (isObject(b)) {\n const name = Object.getPrototypeOf(b)?.constructor?.name;\n if (name !== undefined) {\n result.second.instance = name;\n }\n }\n\n }\n\n return result;\n}\n\n/**\n * @private\n * @param {*} a\n * @param {*} b\n * @return {boolean}\n */\nfunction isNotEqual(a, b) {\n\n if (typeof a !== typeof b) {\n return true;\n }\n\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() !== b.getTime();\n }\n\n return a !== b;\n}\n\n/**\n * @private\n * @param {*} a\n * @param {*} b\n * @return {string|undefined}\n */\nfunction getOperator(a, b) {\n\n /**\n * @type {string|undefined}\n */\n let operator;\n\n /**\n * @type {string}\n */\n let typeA = typeof a;\n\n /**\n * @type {string}\n */\n let typeB = typeof b;\n\n if (typeA === 'undefined' && typeB !== 'undefined') {\n operator = 'add';\n } else if (typeA !== 'undefined' && typeB === 'undefined') {\n operator = 'delete';\n } else if (isNotEqual(a, b)) {\n operator = 'update';\n }\n\n return operator;\n\n}\n\nassignToNamespace('Monster.Data', Diff);\nexport {Monster, Diff}\n","'use strict';\n\nimport {Monster, assignToNamespace} from '../namespace.js';\n/**\n * @author schukai GmbH\n */\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_PREFIX = 'data-monster-';\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';\n\n\n/**\n * default theme\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst DEFAULT_THEME = 'monster';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_THEME_PREFIX = ATTRIBUTE_PREFIX + 'theme-';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst ATTRIBUTE_THEME_NAME = ATTRIBUTE_THEME_PREFIX + 'name';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_ATTRIBUTES = ATTRIBUTE_PREFIX + 'attributes';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REPLACE = ATTRIBUTE_PREFIX + 'replace';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT = ATTRIBUTE_PREFIX + 'insert';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_PREFIX + 'insert-reference';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.9.0\n */\nconst ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.14.0\n */\nconst ATTRIBUTE_ROLE = ATTRIBUTE_PREFIX + 'role';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.9.0\n */\nconst ATTRIBUTE_OBJECTLINK = ATTRIBUTE_PREFIX + 'objectlink';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.10.0\n */\nconst OBJECTLINK_KEY_UPDATER = 'monsterUpdater';\n\n\nexport {\n Monster,\n ATTRIBUTE_PREFIX,\n ATTRIBUTE_OPTIONS,\n DEFAULT_THEME,\n ATTRIBUTE_THEME_PREFIX,\n ATTRIBUTE_ROLE,\n ATTRIBUTE_THEME_NAME,\n ATTRIBUTE_UPDATER_ATTRIBUTES,\n ATTRIBUTE_UPDATER_REPLACE,\n ATTRIBUTE_UPDATER_INSERT,\n ATTRIBUTE_UPDATER_INSERT_REFERENCE,\n ATTRIBUTE_UPDATER_REMOVE,\n ATTRIBUTE_UPDATER_BIND,\n ATTRIBUTE_OBJECTLINK,\n OBJECTLINK_KEY_UPDATER\n}","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from '../types/base.js';\nimport {validateString} from \"../types/validate.js\";\nimport {getGlobalFunction, getGlobalObject} from '../types/global.js';\nimport {validateInstance} from \"../types/validate.js\";\nimport {getDocumentTheme} from \"./theme.js\";\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Template()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/template.js';\n * console.log(new Monster.DOM.Template())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/template.js';\n * console.log(new Template())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Template extends Base {\n /**\n *\n * @param {HTMLTemplateElement} template\n * @throws {TypeError} value is not an instance of\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n */\n constructor(template) {\n super();\n const HTMLTemplateElement = getGlobalFunction('HTMLTemplateElement');\n validateInstance(template, HTMLTemplateElement);\n this.template = template;\n }\n\n /**\n *\n * @returns {HTMLTemplateElement}\n */\n getTemplateElement() {\n return this.template;\n }\n\n /**\n *\n * @return {DocumentFragment}\n * @throws {TypeError} value is not an instance of\n */\n createDocumentFragment() {\n return this.template.content.cloneNode(true);\n }\n\n}\n\n/**\n *\n *\n * you can call the method via the monster namespace `Monster.DOM.findDocumentTemplate()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/template.js';\n * console.log(Monster.DOM.findDocumentTemplate())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/template.js';\n * console.log(findDocumentTemplate())\n * </script>\n * ```\n *\n * @param {string} id\n * @param {Node} root\n * @return {Template}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} template id not found.\n * @throws {TypeError} value is not a string\n */\nfunction findDocumentTemplate(id, root) {\n validateString(id);\n \n if (!(root instanceof Node)) {\n root = getGlobalObject('document');\n }\n \n const HTMLTemplateElement = getGlobalFunction('HTMLTemplateElement');\n\n let theme = getDocumentTheme()\n let themedID = id + '-' + theme.getName();\n\n let template = root.getElementById(themedID);\n if (template instanceof HTMLTemplateElement) {\n return new Template(template);\n }\n\n template = root.getElementById(id);\n if (template instanceof HTMLTemplateElement) {\n return new Template(template);\n }\n \n if(root!==getGlobalObject('document')) {\n return findDocumentTemplate(id)\n }\n\n throw new Error(\"template \" + id + \" not found.\")\n}\n\n\nassignToNamespace('Monster.DOM', Template, findDocumentTemplate);\nexport {Monster, Template, findDocumentTemplate}\n\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from '../types/base.js';\nimport {validateString} from \"../types/validate.js\";\nimport {getGlobalObject} from '../types/global.js';\nimport {ATTRIBUTE_THEME_NAME, DEFAULT_THEME} from \"./constants.js\";\n\n\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.Theme()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/theme.js';\n * console.log(new Monster.DOM.Theme())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/theme.js';\n * console.log(new Theme())\n * </script>\n * ```\n * \n * @example\n *\n * import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/theme.js';\n *\n * const theme = getDocumentTheme();\n * console.log(theme.getName());\n * // ↦ monster\n *\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Theme extends Base {\n\n /**\n *\n * @param name\n * @throws {TypeError} value is not a string\n */\n constructor(name) {\n super();\n validateString(name);\n this.name = name;\n }\n\n /**\n *\n * @returns {string}\n */\n getName() {\n return this.name;\n }\n\n}\n\n/**\n * The theming used in the document can be defined via the html-tag.\n * The theming is specified via the attribute `data-monster-theme-name`.\n *\n * As name for a theme all characters are valid, which are also allowed for a HTMLElement-ID.\n *\n * ```\n * <html data-monster-theme-name=\"my-theme\">\n * ```\n *\n * the default theme name is `monster`.\n *\n * @return {Theme}\n * @since 1.7.0\n */\nfunction getDocumentTheme() {\n let document = getGlobalObject('document');\n let name = DEFAULT_THEME;\n\n let element = document.querySelector('html');\n if (element instanceof HTMLElement) {\n let theme = element.getAttribute(ATTRIBUTE_THEME_NAME);\n if (theme) {\n name = theme;\n }\n }\n\n return new Theme(name);\n\n}\n\nassignToNamespace('Monster.DOM', Theme, getDocumentTheme);\nexport {Monster, Theme, getDocumentTheme}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { getGlobal} from \"../types/global.js\";\nimport {validateString} from \"../types/validate.js\";\n\n\n/**\n * this method fetches the document object\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/util.js';\n * console.log(Monster.DOM.getDocument())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/util.js';\n * console.log(getDocument())\n * </script>\n * ```\n *\n * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).\n *\n * ```\n * import {JSDOM} from \"jsdom\"\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n *\n * [\n * 'self',\n * 'document',\n * 'Document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (getGlobal()[key] = window[key]));\n * }\n * ```\n *\n * @returns {object}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} not supported environment\n */\nfunction getDocument() {\n let document = getGlobal()?.['document'];\n if (typeof document !== 'object') { \n throw new Error(\"not supported environment\")\n }\n\n return document;\n}\n\n/**\n * this method fetches the window object\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/util.js';\n * console.log(Monster.DOM.getWindow())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/util.js';\n * console.log(getWindow(null))\n * </script>\n * ```\n *\n * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).\n *\n * ```\n * import {JSDOM} from \"jsdom\"\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n *\n * getGlobal()['window']=window;\n * \n * [\n * 'self',\n * 'document',\n * 'Document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (getGlobal()[key] = window[key]));\n * }\n * ```\n *\n * @returns {object}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} not supported environment\n */\nfunction getWindow() {\n let window = getGlobal()?.['window'];\n if (typeof window !== 'object') {\n throw new Error(\"not supported environment\")\n }\n\n return window;\n}\n\n\n/**\n *\n *\n * this method fetches the document object\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/util.js';\n * console.log(Monster.DOM.getDocumentFragmentFromString())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/util.js';\n * console.log(getDocumentFragmentFromString('<div></div>'))\n * </script>\n * ```\n *\n * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).\n *\n * ```\n * import {JSDOM} from \"jsdom\"\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n *\n * [\n * 'self',\n * 'document',\n * 'Document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (getGlobal()[key] = window[key]));\n * }\n * ```\n *\n * @returns {DocumentFragment}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} not supported environment\n * @throws {TypeError} value is not a string\n */\nfunction getDocumentFragmentFromString(html) {\n validateString(html);\n\n const document = getDocument();\n const template = document.createElement('template');\n template.innerHTML = html;\n \n return template.content;\n}\n\n\nassignToNamespace('Monster.DOM', getWindow, getDocument, getDocumentFragmentFromString);\nexport {Monster, getWindow, getDocument, getDocumentFragmentFromString}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {getGlobalFunction} from \"../types/global.js\";\nimport {isInstance} from \"../types/is.js\";\nimport {TokenList} from \"../types/tokenlist.js\";\nimport {validateInstance, validateString, validateSymbol} from \"../types/validate.js\";\nimport {ATTRIBUTE_OBJECTLINK} from \"./constants.js\";\n\n/**\n * get the closest object link of a node\n *\n * if a node is specified without a object link, a recursive search upwards is performed until the corresponding\n * object link is found, or undefined is returned.\n *\n * you can call the method via the monster namespace `Monster.DOM.getUpdaterFromNode()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';\n * console.log(Monster.DOM.findClosestObjectLink())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';\n * console.log(findClosestObjectLink())\n * </script>\n * ```\n *\n * @param {HTMLElement} element\n * @return {HTMLElement|undefined}\n * @since 1.10.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not an instance of HTMLElement\n */\nfunction findClosestObjectLink(element) {\n return findClosestByAttribute(element, ATTRIBUTE_OBJECTLINK);\n}\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.addToObjectLink()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.addToObjectLink();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * addToObjectLink();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @param {Object} object\n * @return {boolean}\n */\nfunction addToObjectLink(element, symbol, object) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n element[symbol] = new Set;\n }\n\n addAttributeToken(element, ATTRIBUTE_OBJECTLINK, symbol.toString());\n element[symbol].add(object);\n return element;\n\n}\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.removeObjectLink()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.removeObjectLink();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * removeObjectLink();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @return {boolean}\n */\nfunction removeObjectLink(element, symbol) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n return element\n }\n\n removeAttributeToken(element, ATTRIBUTE_OBJECTLINK, symbol.toString());\n delete element[symbol];\n return element;\n\n}\n\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.hasObjectLink()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.hasObjectLink();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * hasObjectLink();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @return {boolean}\n */\nfunction hasObjectLink(element, symbol) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n return false\n }\n\n return containsAttributeToken(element, ATTRIBUTE_OBJECTLINK, symbol.toString());\n\n}\n\n/**\n * The ObjectLink can be used to attach objects to HTMLElements. The elements are kept in a set under a unique\n * symbol and can be read via an iterator {@see getLinkedObjects}.\n *\n * In addition, elements with an objectLink receive the attribute `data-monster-objectlink`.\n *\n * With the method {@see addToObjectLink} the objects can be added.\n *\n * You can call the method via the monster namespace `new Monster.DOM.getLinkedObjects()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.getLinkedObjects();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * getLinkedObjects();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @return {Iterator}\n * @throws {Error} there is no object link for symbol\n */\nfunction getLinkedObjects(element, symbol) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n throw new Error('there is no object link for ' + symbol.toString());\n }\n\n return element?.[symbol][Symbol.iterator]();\n\n}\n\n\n/**\n * With this method tokens in an attribute can be switched on or off. For example, classes can be switched on and off in the elements class attribute.\n *\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.toggleAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.toggleAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * toggleAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {HTMLElement}\n */\nfunction toggleAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n element.setAttribute(key, token);\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).toggle(token).toString());\n\n return element\n}\n\n/**\n * this method can be used to add a token to an attribute. Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.addAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.addAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * addAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {HTMLElement}\n */\nfunction addAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n element.setAttribute(key, token);\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).add(token).toString());\n\n return element\n}\n\n/**\n * This function can be used to remove tokens from an attribute.\n *\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.removeAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.removeAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * removeAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {HTMLElement}\n */\nfunction removeAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).remove(token).toString());\n\n return element\n}\n\n/**\n * This method can be used to determine whether an attribute has a token.\n *\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.containsAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.containsAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * containsAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {boolean}\n */\nfunction containsAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return false;\n }\n\n return new TokenList(element.getAttribute(key)).contains(token);\n\n}\n\n/**\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.replaceAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.replaceAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * replaceAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} from\n * @param {string} to\n * @return {HTMLElement}\n */\nfunction replaceAttributeToken(element, key, from, to) {\n validateInstance(element, HTMLElement);\n validateString(from)\n validateString(to)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).replace(from, to).toString());\n\n return element\n}\n\n/**\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.clearAttributeTokens()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.clearAttributeTokens();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * clearAttributeTokens();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @return {HTMLElement}\n */\nfunction clearAttributeTokens(element, key) {\n validateInstance(element, HTMLElement);\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, \"\");\n\n return element\n}\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.findClosestByAttribute()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * Monster.DOM.findClosestByAttribute();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';\n * findClosestByAttribute();\n * </script>\n * ```\n *\n * @since 1.14.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @return {HTMLElement|undefined}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an instance of HTMLElement\n */\n\n/**\n * \n * @since 1.14.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string|undefined} value\n * @return {HTMLElement|undefined}\n */\nfunction findClosestByAttribute(element, key, value) {\n validateInstance(element, getGlobalFunction('HTMLElement'));\n\n if (element.hasAttribute(key) && element.getAttribute(key) === value) {\n return element;\n }\n\n let selector = validateString(key);\n if (value !== undefined) selector += \"=\" + validateString(value);\n let result = element.closest('[' + selector + ']');\n if (result instanceof HTMLElement) {\n return result;\n }\n return undefined;\n}\n\n// exports\nassignToNamespace('Monster.DOM', getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);\nexport {\n Monster,\n addToObjectLink,\n removeObjectLink,\n hasObjectLink,\n findClosestByAttribute,\n clearAttributeTokens,\n replaceAttributeToken,\n containsAttributeToken,\n removeAttributeToken,\n addAttributeToken,\n toggleAttributeToken,\n getLinkedObjects,\n findClosestObjectLink\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { parseLocale} from \"../i18n/locale.js\";\nimport {getDocument} from \"./util.js\";\n\n/**\n * @type {string}\n */\nconst DEFAULT_LANGUAGE = 'en';\n\n/**\n * With this function you can read the language version set by the document.\n * For this the attibute `lang` in the html tag is read. If no attribute is set, `en` is used as default.\n *\n * You can call the function via the monster namespace `new Monster.DOM.getLocaleOfDocument()`.\n *\n * ```\n * <script type=\"module\">\n * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/locale.js';\n * console.log(new Monster.DOM.getLocaleOfDocument())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/locale.js';\n * console.log(new getLocaleOfDocument())\n * </script>\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not a string\n * @throws {Error} unsupported locale\n */\nfunction getLocaleOfDocument() {\n\n const document = getDocument();\n\n let html = document.querySelector('html')\n if (html instanceof HTMLElement && html.hasAttribute('lang')) {\n let locale = html.getAttribute('lang');\n if (locale) {\n return new parseLocale(locale)\n }\n }\n\n return parseLocale(DEFAULT_LANGUAGE);\n}\n\nassignToNamespace('Monster.DOM', getLocaleOfDocument);\nexport {Monster, getLocaleOfDocument}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from \"../types/base.js\";\nimport {validateString} from \"../types/validate.js\";\nimport {clone} from \"../util/clone.js\";\n\n/**\n * @type {symbol}\n */\nconst propertiesSymbol = Symbol('properties');\n\n/**\n * @type {symbol}\n */\nconst localeStringSymbol = Symbol('localeString');\n\n/**\n * You can call the method via the monster namespace `new Monster.I18n.Locale()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/locale.js';\n * console.log(new Monster.I18n.Locale())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/locale.js';\n * console.log(new Locale())\n * </script>\n * ```\n *\n * RFC\n *\n * ```\n * A Language-Tag consists of:\n * langtag ; generated tag\n * -or- private-use ; a private use tag\n *\n * langtag = (language\n * [\"-\" script]\n * [\"-\" region]\n * *(\"-\" variant)\n * *(\"-\" extension)\n * [\"-\" privateuse])\n *\n * language = \"en\", \"ale\", or a registered value\n *\n * script = \"Latn\", \"Cyrl\", \"Hant\" ISO 15924 codes\n *\n * region = \"US\", \"CS\", \"FR\" ISO 3166 codes\n * \"419\", \"019\", or UN M.49 codes\n *\n * variant = \"rozaj\", \"nedis\", \"1996\", multiple subtags can be used in a tag\n *\n * extension = single letter followed by additional subtags; more than one extension\n * may be used in a language tag\n *\n * private-use = \"x-\" followed by additional subtags, as many as are required\n * Note that these can start a tag or appear at the end (but not\n * in the middle)\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Locale extends Base {\n\n /**\n * @param {string|undefined} language\n * @param {string|undefined} region\n * @param {string|undefined} script\n * @param {string|undefined} variants\n * @param {string|undefined} extlang\n * @param {string|undefined} privateUse\n * @throws {Error} unsupported locale\n */\n constructor(language, region, script, variants, extlang, privateUse) {\n super();\n\n this[propertiesSymbol] = {\n language: (language === undefined) ? undefined : validateString(language),\n script: (script === undefined) ? undefined : validateString(script),\n region: (region === undefined) ? undefined : validateString(region),\n variants: (variants === undefined) ? undefined : validateString(variants),\n extlang: (extlang === undefined) ? undefined : validateString(extlang),\n privateUse: (privateUse === undefined) ? undefined : validateString(privateUse),\n };\n\n let s = [];\n if (language !== undefined) s.push(language);\n if (script !== undefined) s.push(script);\n if (region !== undefined) s.push(region);\n if (variants !== undefined) s.push(variants);\n if (extlang !== undefined) s.push(extlang);\n if (privateUse !== undefined) s.push(privateUse);\n\n if (s.length === 0) {\n throw new Error('unsupported locale');\n }\n\n this[localeStringSymbol] = s.join('-');\n\n }\n\n /**\n * @return {string}\n */\n get localeString() {\n return this[localeStringSymbol];\n }\n\n /**\n * @return {string|undefined}\n */\n get language() {\n return this[propertiesSymbol].language;\n }\n\n /**\n * @return {string|undefined}\n */\n get region() {\n return this[propertiesSymbol].region;\n }\n\n /**\n * @return {string|undefined}\n */\n get script() {\n return this[propertiesSymbol].script;\n }\n\n /**\n * @return {string|undefined}\n */\n get variants() {\n return this[propertiesSymbol].variants;\n }\n\n /**\n * @return {string|undefined}\n */\n get extlang() {\n return this[propertiesSymbol].extlang;\n }\n\n /**\n * @return {string|undefined}\n */\n get privateUse() {\n return this[propertiesSymbol].privateValue;\n }\n\n\n /**\n * @return {string}\n */\n toString() {\n return \"\" + this.localeString;\n }\n\n /**\n * @return {object}\n */\n getMap() {\n return clone(this[propertiesSymbol])\n }\n\n\n}\n\n\n/**\n * Parse local according to rfc4646 standard\n *\n * Limitations: The regex cannot handle multiple variants or private.\n *\n * You can call the method via the monster namespace `Monster.I18n.createLocale()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/locale.js';\n * console.log(new Monster.I18n.createLocale())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/locale.js';\n * console.log(createLocale())\n * </script>\n * ```\n *\n * RFC\n *\n * ```\n * The syntax of the language tag in ABNF [RFC4234] is:\n *\n * Language-Tag = langtag\n * / privateuse ; private use tag\n * / grandfathered ; grandfathered registrations\n *\n * langtag = (language\n * [\"-\" script]\n * [\"-\" region]\n * *(\"-\" variant)\n * *(\"-\" extension)\n * [\"-\" privateuse])\n *\n * language = (2*3ALPHA [ extlang ]) ; shortest ISO 639 code\n * / 4ALPHA ; reserved for future use\n * / 5*8ALPHA ; registered language subtag\n *\n * extlang = *3(\"-\" 3ALPHA) ; reserved for future use\n *\n * script = 4ALPHA ; ISO 15924 code\n *\n * region = 2ALPHA ; ISO 3166 code\n * / 3DIGIT ; UN M.49 code\n *\n * variant = 5*8alphanum ; registered variants\n * / (DIGIT 3alphanum)\n *\n * extension = singleton 1*(\"-\" (2*8alphanum))\n *\n * singleton = %x41-57 / %x59-5A / %x61-77 / %x79-7A / DIGIT\n * ; \"a\"-\"w\" / \"y\"-\"z\" / \"A\"-\"W\" / \"Y\"-\"Z\" / \"0\"-\"9\"\n * ; Single letters: x/X is reserved for private use\n *\n * privateuse = (\"x\"/\"X\") 1*(\"-\" (1*8alphanum))\n *\n * grandfathered = 1*3ALPHA 1*2(\"-\" (2*8alphanum))\n * ; grandfathered registration\n * ; Note: i is the only singleton\n * ; that starts a grandfathered tag\n *\n * alphanum = (ALPHA / DIGIT) ; letters and numbers\n *\n * Figure 1: Language Tag ABNF\n * ```\n *\n * @param {string} locale\n * @returns {Locale}\n * @since 1.14.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @throws {TypeError} value is not a string\n * @throws {Error} unsupported locale\n */\nfunction parseLocale(locale) {\n\n locale = validateString(locale).replace(/_/g, \"-\");\n\n let language, region, variants, parts, script, extlang,\n regexRegular = \"(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)\",\n regexIrregular = \"(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)\",\n regexGrandfathered = \"(\" + regexIrregular + \"|\" + regexRegular + \")\",\n regexPrivateUse = \"(x(-[A-Za-z0-9]{1,8})+)\",\n regexSingleton = \"[0-9A-WY-Za-wy-z]\",\n regexExtension = \"(\" + regexSingleton + \"(-[A-Za-z0-9]{2,8})+)\",\n regexVariant = \"([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3})\",\n regexRegion = \"([A-Za-z]{2}|[0-9]{3})\",\n regexScript = \"([A-Za-z]{4})\",\n regexExtlang = \"([A-Za-z]{3}(-[A-Za-z]{3}){0,2})\",\n regexLanguage = \"(([A-Za-z]{2,3}(-\" + regexExtlang + \")?)|[A-Za-z]{4}|[A-Za-z]{5,8})\",\n regexLangtag = \"(\" + regexLanguage + \"(-\" + regexScript + \")?\" + \"(-\" + regexRegion + \")?\" + \"(-\" + regexVariant + \")*\" + \"(-\" + regexExtension + \")*\" + \"(-\" + regexPrivateUse + \")?\" + \")\",\n regexLanguageTag = \"^(\" + regexGrandfathered + \"|\" + regexLangtag + \"|\" + regexPrivateUse + \")$\",\n regex = new RegExp(regexLanguageTag), match;\n\n\n if ((match = regex.exec(locale)) !== null) {\n if (match.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n }\n\n if (match === undefined || match === null) {\n throw new Error('unsupported locale');\n }\n\n if (match[6] !== undefined) {\n language = match[6];\n\n parts = language.split('-');\n if (parts.length > 1) {\n language = parts[0];\n extlang = parts[1];\n }\n\n }\n\n if (match[14] !== undefined) {\n region = match[14];\n }\n\n if (match[12] !== undefined) {\n script = match[12];\n }\n\n if (match[16] !== undefined) {\n variants = match[16];\n }\n\n return new Locale(language, region, script, variants, extlang);\n\n}\n\n\nassignToNamespace('Monster.I18n', Locale, parseLocale);\nexport {Monster, Locale, parseLocale}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {extend} from \"../data/extend.js\";\nimport { CustomElement} from \"./customelement.js\";\n\n\n/**\n * @private\n * @type {symbol}\n */\nconst internalSymbol = Symbol('internalSymbol');\n\n/**\n * To define a new HTML control we need the power of CustomElement\n *\n * IMPORTANT: after defining a `CustomElement`, the `registerCustomElement` method must be called\n * with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.\n *\n * This control uses `attachInternals()` to integrate the control into a form.\n * If the target environment does not support this method, the [polyfill](https://www.npmjs.com/package/element-internals-polyfill ) can be used.\n *\n * You can create the object via the monster namespace `new Monster.DOM.CustomControl()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/customcontrol.js';\n * console.log(new Monster.DOM.CustomControl())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/customcontrol.js';\n * console.log(new CustomControl())\n * </script>\n * ```\n *\n * @see https://www.npmjs.com/package/element-internals-polyfill\n * @see https://github.com/WICG/webcomponents\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements\n * @since 1.14.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass CustomControl extends CustomElement {\n\n /**\n *\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n constructor() {\n super();\n\n if (typeof this['attachInternals'] === 'function') {\n // currently only supported by chrome\n this[internalSymbol] = this.attachInternals();\n }\n\n }\n\n /**\n * | option | description |\n * |----------------|---------------------------------|\n * | | |\n *\n * Derived classes can override and extend this method as follows.\n *\n * ```\n * get defaults() {\n * return extends{}, super.defaults, {\n * myValue:true\n * });\n * }\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals\n * @return {object}\n * @since 1.14.0\n */\n get defaults() {\n return extend({}, super.defaults);\n }\n\n /**\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals\n * @since 1.14.0\n * @return {boolean}\n */\n static get formAssociated() {\n return true;\n }\n\n /**\n * Must be overridden by a derived class and return the value of the control.\n *\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @since 1.14.0\n * @throws {Error} the value getter must be overwritten by the derived class\n */\n get value() {\n throw Error('the value getter must be overwritten by the derived class');\n }\n\n /**\n * Must be overridden by a derived class and return the value of the control.\n *\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @param {*} value\n * @since 1.14.0\n * @throws {Error} the value setter must be overwritten by the derived class\n */\n set value(value) {\n throw Error('the value setter must be overwritten by the derived class');\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * ```\n * // Use the control's name as the base name for submitted data\n * const n = this.getAttribute('name');\n * const entries = new FormData();\n * entries.append(n + '-first-name', this.firstName_);\n * entries.append(n + '-last-name', this.lastName_);\n * this.setFormValue(entries);\n * ```\n *\n * @param {File|string|FormData} value\n * @param {File|string|FormData} state\n * @since 1.14.0\n * @return {undefined}\n * @throws {DOMException} NotSupportedError\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue\n */\n setFormValue(value, state) {\n getInternal.call(this).setFormValue(value, state);\n }\n\n /**\n *\n * @param {object} flags\n * @param {string|undefined} message\n * @param {HTMLElement} anchor\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setValidity\n * @since 1.14.0\n * @return {undefined}\n * @throws {DOMException} NotSupportedError\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n setValidity(flags, message, anchor) {\n getInternal.call(this).setValidity(flags, message, anchor);\n }\n\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/checkValidity\n * @since 1.14.0\n * @return {boolean}\n * @throws {DOMException} NotSupportedError\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n checkValidity() {\n return getInternal.call(this)?.checkValidity();\n }\n\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {boolean}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/reportValidity\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n * @throws {DOMException} NotSupportedError\n */\n reportValidity() {\n return getInternal.call(this)?.reportValidity();\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {NodeList}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/labels\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get labels() {\n return getInternal.call(this)?.labels;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {string|null}\n */\n get name() {\n return this.getAttribute('name');\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {string}\n */\n get type() {\n return this.constructor.getTag();\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {ValidityState}\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n * @see https://developer.mozilla.org/en-US/docs/Web/API/validity\n */\n get validity() {\n return getInternal.call(this)?.validity;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {string}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/validationMessage\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get validationMessage() {\n return getInternal.call(this)?.validationMessage;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {boolean}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get willValidate() {\n return getInternal.call(this)?.willValidate;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {CustomStateSet}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/states\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get states() {\n return getInternal.call(this)?.states;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {HTMLFontElement|null}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/form\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get form() {\n return getInternal.call(this)?.form;\n }\n\n}\n\n/**\n * @private\n * @return {object}\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\nfunction getInternal() {\n const self = this;\n\n if (!(internalSymbol in this)) {\n throw new Error('ElementInternals is not supported and a polyfill is necessary');\n }\n\n return this[internalSymbol];\n}\n\nassignToNamespace('Monster.DOM', CustomControl);\nexport {Monster, CustomControl}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {isObject, isArray} from \"../types/is.js\";\nimport {typeOf} from \"../types/typeof.js\";\n\n/**\n * extend copies all enumerable own properties from one or\n * more source objects to a target object. It returns the modified target object.\n *\n * You can call the method via the monster namespace `Monster.Data.extend()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/extend.js';\n * console.log(Monster.Data.extend(a, b))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/extend.js';\n * console.log(extend(a, b))\n * </script>\n * ```\n *\n * @param {object} target\n * @param {object}\n * @return {object}\n * @since 1.10.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n * @throws {Error} unsuported argument\n * @throws {Error} type mismatch\n */\nfunction extend() {\n let o, i;\n\n for (i = 0; i < arguments.length; i++) {\n let a = arguments[i];\n\n if (!(isObject(a) || isArray(a))) {\n throw new Error('unsuported argument ' + JSON.stringify(a));\n }\n\n if (o === undefined) {\n o = a;\n continue;\n }\n\n for (let k in a) {\n\n let v = a?.[k];\n \n if(v===o?.[k]) {\n continue;\n }\n\n if ((isObject(v) || isArray(v))) {\n\n if (o[k] === undefined) {\n if (isArray(v)) {\n o[k] = [];\n } else {\n o[k] = {};\n }\n }\n\n if (typeOf(o[k]) !== typeOf(v)) {\n throw new Error(\"type mismatch: \" + JSON.stringify(o[k]) + \" != \" + JSON.stringify(v));\n }\n\n o[k] = extend(o[k], v);\n\n } else {\n o[k] = v;\n }\n\n }\n }\n\n return o;\n}\n\n\nassignToNamespace('Monster.Data', extend);\nexport {Monster, extend}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\n\nimport {Monster, assignToNamespace} from '../namespace.js';\n\n/**\n * The built-in typeof method is known to have some historical weaknesses. This function tries to provide a better and more accurate result.\n *\n * You can call the method via the monster namespace `Monster.Types.typeOf()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/typeof.js';\n * console.log(Monster.Types.typeOf())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/typeof.js';\n * console.log(typeOf())\n * </script>\n * ```\n *\n * @example\n *\n * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/typeof.js';\n *\n * console.log(typeOf(undefined)); // ↦ undefined\n * console.log(typeOf(\"\")); // ↦ string\n * console.log(typeOf(5)); // ↦ number\n * console.log(typeOf({})); // ↦ object\n * console.log(typeOf([])); // ↦ array\n * console.log(typeOf(new Map)); // ↦ map\n * console.log(typeOf(true)); // ↦ boolean\n *\n * @param {*} value\n * @return {string}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n */\nfunction typeOf(value) {\n let type = ({}).toString.call(value).match(/\\s([a-zA-Z]+)/)[1];\n if ('Object' === type) {\n const results = (/^(class|function)\\s+(\\w+)/).exec(value.constructor.toString());\n type = (results && results.length > 2) ? results[2] : '';\n }\n return type.toLowerCase();\n}\n\nassignToNamespace('Monster.Types', typeOf);\nexport {\n Monster,\n typeOf\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Observer} from \"../types/observer.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\nimport { Updater} from \"./updater.js\";\nimport {extend} from \"../data/extend.js\";\nimport {clone} from \"../util/clone.js\";\nimport {Pathfinder} from \"../data/pathfinder.js\";\nimport {ATTRIBUTE_OPTIONS, OBJECTLINK_KEY_UPDATER} from \"./constants.js\";\nimport {findDocumentTemplate, Template} from \"./template.js\";\nimport {addToObjectLink, getLinkedObjects, hasObjectLink} from \"./attributes.js\";\nimport {getGlobalObject} from \"../types/global.js\";\nimport {validateFunction, validateObject} from \"../types/validate.js\";\nimport {isString} from \"../types/is.js\";\nimport {PROPERTY_KEY_INTERNALDATA} from \"../constants.js\";\n\n/**\n * @private\n * @type {symbol}\n */\nconst internalDataSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);\n\n/**\n * @private\n * @type {symbol}\n */\nconst objectLinkSymbol = Symbol.for(OBJECTLINK_KEY_UPDATER);\n\n/**\n * @type {symbol}\n */\nconst initMethodSymbol = Symbol('initMethodSymbol');\n\n/**\n * @type {symbol}\n */\nconst assembleMethodSymbol = Symbol('assembleMethodSymbol');\n\n/**\n * To define a new HTML element we need the power of CustomElement\n *\n * IMPORTANT: after defining a `CustomElement`, the `registerCustomElement` method must be called\n * with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.\n *\n * You can create the object via the monster namespace `new Monster.DOM.CustomElement()`.\n *\n * ```\n * <script type=\"module\">\n * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/customelement.js';\n * console.log(new Monster.DOM.CustomElement())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/customelement.js';\n * console.log(new CustomElement())\n * </script>\n * ```\n *\n * ## Styling\n *\n * For optimal display of custom-elements the pseudo-class :defined can be used.\n *\n * To prevent the custom elements from being displayed and flickering until the control is registered, it is recommended to create a css directive.\n *\n * In the simplest case, you can simply hide the control.\n *\n * ```\n * <style>\n *\n * my-custom-element:not(:defined) {\n * display: none;\n * }\n *\n * my-custom-element:defined {\n * display: flex;\n * }\n *\n * </style>\n * ```\n *\n * Alternatively you can also display a loader\n *\n * ```\n * my-custom-element:not(:defined) {\n * display: flex;\n * box-shadow: 0 4px 10px 0 rgba(33, 33, 33, 0.15);\n * border-radius: 4px;\n * height: 200px;\n * position: relative;\n * overflow: hidden;\n * }\n *\n * my-custom-element:not(:defined)::before {\n * content: '';\n * display: block;\n * position: absolute;\n * left: -150px;\n * top: 0;\n * height: 100%;\n * width: 150px;\n * background: linear-gradient(to right, transparent 0%, #E8E8E8 50%, transparent 100%);\n * animation: load 1s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;\n * }\n *\n * @keyframes load {\n * from {\n * left: -150px;\n * }\n * to {\n * left: 100%;\n * }\n * }\n *\n * my-custom-element:defined {\n * display: flex;\n * }\n * ```\n *\n * @example\n *\n * // In the example the the user can use his own template by creating a template in the DOM with the ID `my-custom-element`.\n * // You can also specify a theme (for example `mytheme`), then it will search for the ID `my-custom-element-mytheme` and\n * // if not available for the ID `my-custom-element`.\n *\n * class MyCustomElement extends CustomElement {\n * \n * static getTag() {\n * return \"my-custom-element\"\n * }\n *\n * }\n *\n * // ↦ <my-custom-element></my-custom-element>\n *\n * @see https://github.com/WICG/webcomponents\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass CustomElement extends HTMLElement {\n\n /**\n * A new object is created. First the `initOptions` method is called. Here the\n * options can be defined in derived classes. Subsequently, the shadowRoot is initialized.\n *\n * @throws {Error} the options attribute does not contain a valid json definition.\n * @since 1.7.0\n */\n constructor() {\n super();\n this[internalDataSymbol] = new ProxyObserver({'options': extend({}, this.defaults, getOptionsFromAttributes.call(this))});\n initOptionObserver.call(this);\n this[initMethodSymbol]();\n }\n\n /**\n * attach a new observer\n *\n * @param {Observer} observer\n * @returns {CustomElement}\n */\n attachObserver(observer) {\n this[internalDataSymbol].attachObserver(observer)\n return this;\n }\n\n /**\n * detach a observer\n *\n * @param {Observer} observer\n * @returns {CustomElement}\n */\n detachObserver(observer) {\n this[internalDataSymbol].detachObserver(observer)\n return this;\n }\n\n /**\n * @param {Observer} observer\n * @returns {ProxyObserver}\n */\n containsObserver(observer) {\n return this[internalDataSymbol].containsObserver(observer)\n }\n\n /**\n * | option | description |\n * |----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | shadowMode | `open` Elements of the shadow root are accessible from JavaScript outside the root, for example using. `close` Denies access to the node(s) of a closed shadow root from JavaScript outside it |\n * | delegatesFocus | A boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability. When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available :focus styling. |\n * | templates.main | Main template |\n *\n * Derived classes can override and extend this method as follows.\n *\n * ```\n * get defaults() {\n * return Object.assign({}, super.defaults, {\n * myValue:true\n * });\n * }\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n * @return {{shadowMode: string, delegatesFocus: boolean}}\n * @since 1.8.0\n */\n get defaults() {\n return {\n shadowMode: 'open',\n delegatesFocus: true,\n templates: {\n main: undefined\n }\n };\n }\n\n /**\n * nested options can be specified by path `a.b.c`\n *\n * @param {string} path\n * @param {*} defaultValue\n * @return {*}\n * @since 1.10.0\n */\n getOption(path, defaultValue) {\n let value;\n\n try {\n value = new Pathfinder(this[internalDataSymbol].getRealSubject()['options']).getVia(path);\n } catch (e) {\n\n }\n\n if (value === undefined) return defaultValue;\n return value;\n }\n\n /**\n * Set option and inform elements\n *\n * @param {string} path\n * @param {*} value\n * @return {CustomElement}\n * @since 1.14.0\n */\n setOption(path, value) {\n new Pathfinder(this[internalDataSymbol].getSubject()['options']).setVia(path, value);\n //this[internalDataSymbol].notifyObservers();\n return this;\n }\n\n /**\n * @since 1.15.0\n * @param {string|object} options\n * @return {CustomElement}\n */\n setOptions(options) {\n\n if (isString(options)) {\n options = parseOptionsJSON(options)\n }\n\n const self = this;\n extend(self[internalDataSymbol].getSubject()['options'], self.defaults, options);\n //this[internalDataSymbol].notifyObservers();\n \n return self;\n }\n\n /**\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n [initMethodSymbol]() {\n return this;\n }\n\n /**\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n [assembleMethodSymbol]() {\n\n const self = this;\n let elements;\n\n if (this.getOption('shadowMode', false) !== false) {\n try {\n initShadowRoot.call(this);\n elements = this.shadowRoot.childNodes;\n } catch (e) {\n\n }\n }\n\n if (!(elements instanceof NodeList)) {\n initHtmlContent.call(this);\n elements = this.childNodes;\n }\n\n const updater = new Set;\n addToObjectLink(this, objectLinkSymbol, updater);\n\n for (const [, element] of Object.entries(elements)) {\n\n if (!(element instanceof HTMLElement)) continue;\n if ((element instanceof HTMLTemplateElement)) continue;\n const u = new Updater(element, clone(self[internalDataSymbol].getRealSubject()['options']))\n updater.add(u);\n\n u.run().then(() => {\n u.enableEventProcessing();\n });\n\n }\n\n return this;\n }\n\n /**\n * Called every time the element is inserted into the DOM. Useful for running setup code, such as\n * fetching resources or rendering. Generally, you should try to delay work until this time.\n *\n * @return {void}\n * @since 1.7.0\n */\n connectedCallback() {\n let self = this;\n if (!hasObjectLink(self, objectLinkSymbol)) {\n setTimeout(() => {\n self[assembleMethodSymbol]()\n }, 0);\n }\n }\n\n /**\n * Called every time the element is removed from the DOM. Useful for running clean up code.\n *\n * @return {void}\n * @since 1.7.0\n */\n disconnectedCallback() {\n\n }\n\n /**\n * The custom element has been moved into a new document (e.g. someone called document.adoptNode(el)).\n *\n * @return {void}\n * @since 1.7.0\n */\n adoptedCallback() {\n\n }\n\n /**\n * This method determines which attributes are to be monitored by `attributeChangedCallback()`.\n *\n * @return {string[]}\n * @since 1.15.0\n */\n static get observedAttributes() {\n return [ATTRIBUTE_OPTIONS];\n }\n\n /**\n * Called when an observed attribute has been added, removed, updated, or replaced. Also called for initial\n * values when an element is created by the parser, or upgraded. Note: only attributes listed in the observedAttributes\n * property will receive this callback.\n *\n * @param {string} attrName\n * @param {string} oldVal\n * @param {string} newVal\n * @return {void}\n * @since 1.15.0\n */\n attributeChangedCallback(attrName, oldVal, newVal) {\n const self = this;\n\n if (attrName === ATTRIBUTE_OPTIONS) {\n self.setOptions(newVal);\n }\n\n }\n\n /**\n * There is no check on the name by this class. the developer is responsible for assigning an appropriate tag.\n * if the name is not valid, registerCustomElement() will issue an error\n *\n * @link https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * @return {string}\n * @throws {Error} the method getTag must be overwritten by the derived class.\n * @since 1.7.0\n */\n static getTag() {\n throw new Error(\"the method getTag must be overwritten by the derived class.\");\n }\n\n /**\n * At this point a `CSSStyleSheet` object can be returned. If the environment does not\n * support a constructor, then an object can also be built using the following detour.\n *\n * If `undefined` is returned then the shadowRoot does not get a stylesheet.\n *\n * ```\n * const doc = document.implementation.createHTMLDocument('title');\n *\n * let style = doc.createElement(\"style\");\n * style.innerHTML=\"p{color:red;}\";\n *\n * // WebKit Hack\n * style.appendChild(document.createTextNode(\"\"));\n * // Add the <style> element to the page\n * doc.head.appendChild(style);\n * return doc.styleSheets[0];\n * ;\n * ```\n *\n * @return {CSSStyleSheet|undefined}\n */\n static getCSSStyleSheet() {\n return undefined;\n }\n\n}\n\n/**\n * @since 1.15.0\n * @private\n */\nfunction initOptionObserver() {\n const self = this;\n\n self.attachObserver(new Observer(function () {\n\n // not initialised\n if (!hasObjectLink(self, Symbol.for(OBJECTLINK_KEY_UPDATER))) {\n return;\n }\n // inform every element\n const updaters = getLinkedObjects(self, Symbol.for(OBJECTLINK_KEY_UPDATER));\n\n for (const list of updaters) {\n for (const updater of list) {\n let d = clone(self[internalDataSymbol].getRealSubject()['options']);\n Object.assign(updater.getSubject(), d);\n }\n }\n\n }));\n\n}\n\n/**\n * @private\n * @return {object}\n * @throws {Error} the options attribute does not contain a valid json definition.\n */\nfunction getOptionsFromAttributes() {\n if (this.hasAttribute(ATTRIBUTE_OPTIONS)) {\n try {\n return parseOptionsJSON(this.getAttribute(ATTRIBUTE_OPTIONS))\n } catch (e) {\n throw new Error('the options attribute ' + ATTRIBUTE_OPTIONS + ' does not contain a valid json definition (actual: ' + this.getAttribute(ATTRIBUTE_OPTIONS) + ').');\n }\n }\n\n return {};\n}\n\n\nfunction parseOptionsJSON(data) {\n if (isString(data)) {\n try {\n let obj = JSON.parse(data);\n validateObject(obj);\n return obj;\n } catch (e) {\n throw new Error('the options does not contain a valid json definition (actual: ' + data + ').');\n }\n }\n\n return {};\n}\n\n/**\n * @private\n * @return {initHtmlContent}\n */\nfunction initHtmlContent() {\n\n try {\n let template = findDocumentTemplate(this.constructor.getTag());\n this.appendChild(template.createDocumentFragment());\n } catch (e) {\n\n let html = this.getOption('templates.main', '');\n if (isString(html) && html.length > 0) {\n this.innerHTML = html;\n }\n\n }\n\n return this;\n\n}\n\n/**\n * @private\n * @return {CustomElement}\n * @throws {Error} html is not set.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n * @memberOf CustomElement\n * @since 1.8.0\n */\nfunction initShadowRoot() {\n\n let template, html;\n\n try {\n template = findDocumentTemplate(this.constructor.getTag());\n } catch (e) {\n\n html = this.getOption('templates.main', '');\n if (!isString(html) || html === undefined || html === \"\") {\n throw new Error(\"html is not set.\");\n }\n\n }\n\n this.attachShadow({\n mode: this.getOption('shadowMode', 'open'),\n delegatesFocus: this.getOption('delegatesFocus', true)\n });\n\n const styleSheet = this.constructor.getCSSStyleSheet();\n if (styleSheet instanceof CSSStyleSheet) {\n this.shadowRoot.adoptedStyleSheets = [styleSheet];\n }\n\n if (template instanceof Template) {\n this.shadowRoot.appendChild(template.createDocumentFragment());\n return this;\n }\n\n this.shadowRoot.innerHTML = html;\n return this;\n}\n\n/**\n * This method registers a new element. The string returned by `CustomElement.getTag()` is used as the tag.\n *\n * @param {CustomElement} element\n * @return {void}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {DOMException} Failed to execute 'define' on 'CustomElementRegistry': is not a valid custom element name\n */\nfunction registerCustomElement(element) {\n validateFunction(element);\n getGlobalObject('customElements').define(element.getTag(), element);\n}\n\nassignToNamespace('Monster.DOM', CustomElement, registerCustomElement);\nexport {Monster, registerCustomElement, CustomElement, initMethodSymbol, assembleMethodSymbol}\n","'use strict';\n\nimport {Monster} from './namespace.js';\n/**\n * Property-Keys\n * @author schukai GmbH\n */\n\n/**\n * formerly known as PROPERTY_KEY_OPTIONS\n *\n * @memberOf Monster\n * @type {string}\n * @since 1.15.0\n */\nconst PROPERTY_KEY_INTERNALDATA = 'monsterInternalData';\n\n\nexport {\n Monster,\n PROPERTY_KEY_INTERNALDATA\n}","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from '../types/base.js';\nimport {validateInstance, validateString} from \"../types/validate.js\";\nimport {getGlobalFunction} from \"../types/global.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\n\n\n/**\n * attribute prefix\n * \n * @type {string}\n * @memberOf Monster/DOM\n */\nconst ATTRIBUTEPREFIX = \"data-monster-\";\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Assembler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/assembler.js';\n * console.log(new Monster.DOM.Assembler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/assembler.js';\n * console.log(new Assembler())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Assembler extends Base {\n\n /**\n * @param {DocumentFragment} fragment\n * @throws {TypeError} value is not an instance of\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n */\n constructor(fragment) {\n super();\n this.attributePrefix = ATTRIBUTEPREFIX;\n validateInstance(fragment, getGlobalFunction('DocumentFragment'));\n this.fragment = fragment;\n }\n\n /**\n *\n * @param {string} prefix\n * @returns {Assembler}\n * @throws {TypeError} value is not a string\n */\n setAttributePrefix(prefix) {\n validateString(prefix);\n this.attributePrefix = prefix;\n return this;\n }\n\n /**\n *\n * @returns {string}\n */\n getAttributePrefix() {\n return this.attributePrefix;\n }\n\n /**\n *\n * @param {ProxyObserver|undefined} data\n * @return {DocumentFragment}\n * @throws {TypeError} value is not an instance of\n */\n createDocumentFragment(data) {\n\n if (data === undefined) {\n data = new ProxyObserver({});\n }\n\n validateInstance(data, ProxyObserver);\n let fragment = this.fragment.cloneNode(true);\n return fragment;\n }\n\n}\n\nassignToNamespace('Monster.DOM', Assembler);\nexport {Monster, ATTRIBUTEPREFIX, Assembler}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {validateInstance, validateString} from \"../types/validate.js\";\nimport {findClosestByAttribute} from \"./attributes.js\";\nimport {getDocument} from \"./util.js\";\n\n/**\n * You can call the function via the monster namespace `new Monster.DOM.fireEvent()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/events.js';\n * console.log(new Monster.DOM.fireEvent())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/events.js';\n * console.log(fireEvent())\n * </script>\n * ```\n *\n * @param {HTMLElement|HTMLCollection|NodeList} element\n * @param {string} type\n * @return {void}\n * @since 1.10.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection\n */\nfunction fireEvent(element, type) {\n\n const document = getDocument();\n\n if (element instanceof HTMLElement) {\n\n if (type === 'click') {\n element.click();\n return;\n }\n\n let event = new Event(validateString(type), {\n bubbles: true,\n cancelable: true,\n });\n\n element.dispatchEvent(event);\n\n } else if (element instanceof HTMLCollection || element instanceof NodeList) {\n for (let e of element) {\n fireEvent(e, type);\n }\n } else {\n throw new TypeError('value is not an instance of HTMLElement or HTMLCollection')\n }\n\n}\n\n/**\n * This function gets the path `Event.composedPath()` from an event and tries to find the next element \n * up the tree `element.closest()` with the attribute and value. If no value is specified, only the attribute is searched.\n *\n * You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/events.js';\n * console.log(new Monster.DOM.findTargetElementFromEvent())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/events.js';\n * console.log(findTargetElementFromEvent())\n * </script>\n * ```\n * \n * @since 1.14.0\n * @param {Event} event\n * @param {string} attributeName\n * @param {string|null} attributeValue\n * @throws {Error} unsupported event\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an instance of HTMLElement\n */\nfunction findTargetElementFromEvent(event, attributeName, attributeValue) {\n validateInstance(event, Event);\n\n if (typeof event.composedPath !== 'function') {\n throw new Error('unsupported event');\n }\n\n const path = event.composedPath();\n const element = path?.[0];\n\n if (element instanceof HTMLElement) {\n return findClosestByAttribute(element, attributeName, attributeValue);\n }\n\n return undefined;\n\n}\n\n\nassignToNamespace('Monster.DOM', findTargetElementFromEvent, fireEvent);\nexport {Monster, findTargetElementFromEvent, fireEvent}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../../namespace.js';\nimport {Formatter} from \"../../text/formatter.js\";\nimport {getGlobalFunction} from \"../../types/global.js\";\nimport { validateObject, validateString} from \"../../types/validate.js\";\nimport {isString, isInstance} from \"../../types/is.js\";\nimport {parseLocale} from \"../locale.js\";\nimport {Provider} from \"../provider.js\";\nimport {PROPERTY_KEY_INTERNALDATA} from \"../../constants.js\";\nimport {Translations} from \"../translations.js\";\nimport {extend} from \"../../data/extend.js\";\n\n/**\n * @private\n * @type {symbol}\n */\nconst optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);\n\n/**\n * The fetch provider retrieves a JSON file from the given URL and returns a translation object.\n *\n * You can call the method via the monster namespace `new Monster.I18n.Provider()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/providers/fetch.js';\n * console.log(new Monster.I18n.Providers.Fetch())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/providers/fetch.js';\n * console.log(new Fetch())\n * </script>\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n/Providers\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Fetch extends Provider {\n\n /**\n * As options the key `fetch` can be passed. This config object is passed to the fetch method as init.\n *\n * @param {string|URL} url\n * @param {object} options\n * @see https://developer.mozilla.org/en-US/docs/Web/API/fetch\n */\n constructor(url, options) {\n super(options);\n\n if (isInstance(url, URL)) {\n url = url.toString();\n }\n\n if (options === undefined) {\n options = {};\n }\n\n validateString(url);\n\n this.url = url;\n this[optionsSymbol] = extend({}, super.defaults, this.defaults, validateObject(options));\n\n }\n\n /**\n * Defaults\n * @return {object}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\n get defaults() {\n\n return {\n fetch: {\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\n mode: 'cors', // no-cors, *cors, same-origin\n cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached\n credentials: 'omit', // include, *same-origin, omit\n redirect: 'follow', // manual, *follow, error\n referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url\n }\n }\n\n }\n\n /**\n *\n * @param {Locale|string} locale\n * @return {Promise}\n */\n getTranslations(locale) {\n\n if (isString(locale)) {\n locale = parseLocale(locale);\n }\n\n let formatter = new Formatter(locale.getMap())\n\n return getGlobalFunction('fetch')(formatter.format(this.url), this.getOption('fetch', {}))\n .then((response) => response.json()).then(data => {\n return new Translations(locale).assignTranslations(data);\n });\n\n }\n\n\n}\n\n\nassignToNamespace('Monster.I18n.Providers', Fetch);\nexport {Monster, Fetch}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {BaseWithOptions} from \"../types/basewithoptions.js\";\nimport {Locale} from \"./locale.js\"\nimport {Translations} from \"./translations.js\"\n\n/**\n * A provider makes a translation object available.\n * \n * You can call the method via the monster namespace `new Monster.I18n.Provider()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/provider.js';\n * console.log(new Monster.I18n.Provider())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/provider.js';\n * console.log(new Provider())\n * </script>\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Provider extends BaseWithOptions {\n\n /**\n * @param {Locale|string} locale\n * @return {Promise}\n */\n getTranslations(locale) {\n return new Promise((resolve, reject) => {\n try {\n resolve(new Translations(locale));\n } catch (e) {\n reject(e);\n }\n\n });\n }\n\n}\n\n\nassignToNamespace('Monster.I18n', Provider);\nexport {Monster, Provider}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Pathfinder} from \"../data/pathfinder.js\";\nimport {Base} from \"./base.js\";\nimport {validateObject} from \"./validate.js\";\nimport {PROPERTY_KEY_INTERNALDATA} from \"../constants.js\";\nimport {extend} from \"../data/extend.js\";\n\n/**\n * @private\n * @type {symbol}\n */\nconst optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);\n\n/**\n * This is the base class with options from which some monster classes are derived.\n *\n * You can call the method via the monster namespace `new Monster.Types.BaseWithOptions()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/basewithoptions.js';\n * console.log(new Monster.Types.BaseWithOptions())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/basewithoptions.js';\n * console.log(new BaseWithOptions())\n * </script>\n * ```\n *\n * The class was formerly called Object.\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass BaseWithOptions extends Base {\n\n /**\n *\n * @param {object} options\n */\n constructor(options) {\n super();\n\n if (options === undefined) {\n options = {};\n }\n\n this[optionsSymbol] = extend({}, this.defaults, validateObject(options));\n\n }\n\n /**\n * can be overridden by child class values\n * \n * @return {object}\n */\n get defaults() {\n return {}\n }\n\n /**\n * nested options can be specified by path `a.b.c`\n *\n * @param {string} path\n * @param {*} defaultValue\n * @return {*}\n * @since 1.10.0\n */\n getOption(path, defaultValue) {\n let value;\n\n try {\n value = new Pathfinder(this[optionsSymbol]).getVia(path);\n } catch (e) {\n\n }\n\n if (value === undefined) return defaultValue;\n return value;\n }\n\n\n}\n\nassignToNamespace('Monster.Types', BaseWithOptions);\nexport {Monster, BaseWithOptions}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from \"../types/base.js\";\nimport {isObject, isString} from \"../types/is.js\";\nimport {validateInstance, validateInteger, validateObject, validateString} from \"../types/validate.js\";\nimport {Locale, parseLocale} from \"./locale.js\";\n\n\n/**\n * With this class you can manage translations and access the keys.\n *\n * You can call the method via the monster namespace `new Monster.I18n.Translations()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/translations.js';\n * console.log(new Monster.I18n.Translations())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/i18n/translations.js';\n * console.log(new Translations())\n * </script>\n * ```\n *\n * @example\n *\n * const translation = new Translations(parseLocale('en-GB'));\n *\n * translation.assignTranslations({\n * text1: \"abc\",\n * text2: {'other': 'xyz'}\n * });\n *\n * translation.getText('text1);\n * translation.getPluralRuleText('text1',2);\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Translations extends Base {\n\n /**\n *\n * @param {Locale} locale\n */\n constructor(locale) {\n super();\n\n if (isString(locale)) {\n locale = parseLocale(locale);\n }\n\n this.locale = validateInstance(locale, Locale);\n this.storage = new Map();\n\n }\n\n\n /**\n * Fetches a text using the specified key.\n * If no suitable key is found, `defaultText` is taken.\n *\n * @param {string} key\n * @param {string|undefined} defaultText\n * @return {string}\n * @throws {Error} key not found\n */\n getText(key, defaultText) {\n if (!this.storage.has(key)) {\n if (defaultText === undefined) {\n throw new Error('key ' + key + ' not found');\n }\n\n return validateString(defaultText);\n }\n\n let r = this.storage.get(key);\n if (isObject(r)) {\n return this.getPluralRuleText(key, 'other', defaultText);\n }\n\n return this.storage.get(key);\n }\n\n /**\n * A number `count` can be passed to this method. In addition to a number, one of the keywords can also be passed directly.\n * \"zero\", \"one\", \"two\", \"few\", \"many\" and \"other\". Remember: not every language has all rules.\n *\n * The appropriate text for this number is then selected. If no suitable key is found, `defaultText` is taken.\n *\n * @param {string} key\n * @param {integer|count} count\n * @param {string|undefined} defaultText\n * @return {string}\n */\n getPluralRuleText(key, count, defaultText) {\n if (!this.storage.has(key)) {\n return validateString(defaultText);\n }\n\n let r = validateObject(this.storage.get(key));\n\n let keyword;\n if (isString(count)) {\n keyword = count.toLocaleString();\n } else {\n count = validateInteger(count);\n if (count === 0) {\n // special handlig for zero count\n if (r.hasOwnProperty('zero')) {\n return validateString(r['zero']);\n }\n }\n\n keyword = new Intl.PluralRules(this.locale.toString()).select(validateInteger(count));\n }\n\n if (r.hasOwnProperty(keyword)) {\n return validateString(r[keyword]);\n }\n\n if (r.hasOwnProperty(DEFAULT_KEY)) {\n return validateString(r[DEFAULT_KEY]);\n }\n\n return validateString(defaultText);\n }\n\n /**\n * Set a text for a key\n *\n * ```\n * translations.setText(\"text1\": \"Make my day!\");\n * // plural rules\n * translations.setText(\"text6\": {\n * \"zero\": \"There are no files on Disk.\",\n * \"one\": \"There is one file on Disk.\",\n * \"other\": \"There are files on Disk.\"\n * \"default\": \"There are files on Disk.\"\n * });\n * ```\n *\n * @param {string} key\n * @param {string|object} text\n * @return {Translations}\n * @throws {TypeError} value is not a string or object\n */\n setText(key, text) {\n\n if (isString(text) || isObject(text)) {\n this.storage.set(validateString(key), text);\n return this;\n }\n\n throw new TypeError('value is not a string or object');\n\n }\n\n /**\n * This method can be used to transfer overlays from an object. The keys are transferred and the values are entered as text.\n *\n * The values can either be character strings or, in the case of texts with plural forms, objects. The plural forms must be stored as text via a standard key \"zero\", \"one\", \"two\", \"few\", \"many\" and \"other\".\n *\n * Additionally, the key default can be specified, which will be used if no other key fits.\n *\n * In some languages, like for example in german, there is no own more number at the value 0. In these languages the function applies additionally zero.\n *\n * ```\n * translations.assignTranslations({\n * \"text1\": \"Make my day!\",\n * \"text2\": \"I'll be back!\",\n * \"text6\": {\n * \"zero\": \"There are no files on Disk.\",\n * \"one\": \"There is one file on Disk.\",\n * \"other\": \"There are files on Disk.\"\n * \"default\": \"There are files on Disk.\"\n * });\n * ```\n *\n * @param {object} translations\n * @return {Translations}\n */\n assignTranslations(translations) {\n validateObject(translations);\n\n for (const [k, v] of Object.entries(translations)) {\n this.setText(k, v);\n }\n\n return this;\n\n }\n\n}\n\n\nassignToNamespace('Monster.I18n', Translations);\nexport {Monster, Translations}\n","'use strict';\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {Base} from './base.js';\n\n/**\n * The version object contains a sematic version number\n *\n * You can create the object via the monster namespace `new Monster.Types.Version()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/version.js';\n * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this class individually.\n *\n * ```\n * <script type=\"module\">\n * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/version.js';\n * console.log(new Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * @example\n *\n * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/version.js';\n *\n * new Version('1.0.0') // ↦ 1.0.0\n * new Version(1) // ↦ 1.0.0\n * new Version(1, 0, 0) // ↦ 1.0.0\n * new Version('1.2.3', 4, 5) // ↦ 1.4.5\n *\n * @since 1.0.0\n * @author schukai GmbH\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Version extends Base {\n\n /**\n *\n * @param major\n * @param minor\n * @param patch\n * @throws {Error} major is not a number\n * @throws {Error} minor is not a number\n * @throws {Error} patch is not a number\n */\n constructor(major, minor, patch) {\n super();\n\n if (typeof major === 'string' && minor === undefined && patch === undefined) {\n\n let parts = major.toString().split('.');\n major = parseInt(parts[0] || 0);\n minor = parseInt(parts[1] || 0);\n patch = parseInt(parts[2] || 0);\n }\n\n if (major === undefined) {\n throw new Error(\"major version is undefined\");\n }\n\n if (minor === undefined) {\n minor = 0;\n }\n\n if (patch === undefined) {\n patch = 0;\n }\n\n this.major = parseInt(major);\n this.minor = parseInt(minor);\n this.patch = parseInt(patch);\n\n if (isNaN(this.major)) {\n throw new Error(\"major is not a number\");\n }\n\n if (isNaN(this.minor)) {\n throw new Error(\"minor is not a number\");\n }\n\n if (isNaN(this.patch)) {\n throw new Error(\"patch is not a number\");\n }\n\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.major + '.' + this.minor + '.' + this.patch;\n }\n\n /**\n * returns 0 if equal, -1 if the object version is less and 1 if greater\n * then the compared version\n *\n * @param {string|Version} version Version to compare\n * @returns {number}\n */\n compareTo(version) {\n\n if (version instanceof Version) {\n version = version.toString();\n }\n\n if (typeof version !== 'string') {\n throw new Error(\"type exception\");\n }\n\n if (version === this.toString()) {\n return 0;\n }\n\n let a = [this.major, this.minor, this.patch];\n let b = version.split('.');\n let len = Math.max(a.length, b.length);\n\n for (let i = 0; i < len; i += 1) {\n if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {\n return 1;\n } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {\n return -1;\n }\n }\n\n return 0;\n };\n\n}\n\nassignToNamespace('Monster.Types', Version);\n\n\nlet monsterVersion;\n\n/**\n * Version of monster\n *\n * You can call the method via the monster namespace `Monster.getVersion()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/version.js';\n * console.log(Monster.getVersion())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/version.js';\n * console.log(getVersion())\n * </script>\n * ```\n *\n * @returns {Monster.Types.Version}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @author schukai GmbH\n * @memberOf Monster\n */\nfunction getVersion() {\n if (monsterVersion instanceof Version) {\n return monsterVersion;\n }\n /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('1.15.0')\n /**#@-*/\n\n return monsterVersion;\n\n}\n\nassignToNamespace('Monster', getVersion);\nexport {Monster, Version, getVersion}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {ID} from \"./id.js\";\nimport {getGlobal} from \"./global.js\";\nimport {random} from \"../math/random.js\";\n\n/**\n * @private\n * @type {number}\n */\nlet internalCounter = 0;\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.RandomID()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/randomid.js';\n * console.log(new Monster.Types.RandomID())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/randomid.js';\n * console.log(new RandomID())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass RandomID extends ID {\n\n /**\n * create new object\n */\n constructor() {\n super();\n\n internalCounter += 1;\n\n this.id = getGlobal().btoa(random(1, 10000))\n .replace(/=/g, '')\n /** No numbers at the beginning of the ID, because of possible problems with DOM */\n .replace(/^[0-9]+/, 'X') + internalCounter;\n }\n\n}\n\nassignToNamespace('Monster.Types', RandomID);\nexport {Monster, RandomID}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { getGlobal} from '../types/global.js';\n\n\n/**\n * this function uses crypt and returns a random number.\n *\n * you can call the method via the monster namespace `Monster.Math.random()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/math/random.js';\n * console.log(Monster.Math.random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/math/random.js';\n * console.log(random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * @param {number} min starting value of the definition set (default is 0)\n * @param {number} max end value of the definition set (default is 1000000000)\n * @returns {number}\n * @memberOf Monster/Math\n * @throws {Error} missing crypt\n * @throws {Error} we cannot generate numbers larger than 53 bits.\n * @throws {Error} the distance is too small to create a random number.\n\n * @since 1.0.0\n * @copyright schukai GmbH\n */\nfunction random(min, max) {\n\n if (min === undefined) {\n min = 0;\n }\n if (max === undefined) {\n max = MAX;\n }\n\n if (max < min) {\n throw new Error(\"max must be greater than min\");\n }\n\n return Math.round(create(min, max));\n\n}\n\n/**\n * @private\n * @type {number}\n */\nvar MAX = 1000000000;\n\n\nMath.log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\n\n/**\n *\n * @param {number} min\n * @param {number} max\n * @returns {number}\n * @private\n * @throws {Error} missing crypt\n * @throws {Error} we cannot generate numbers larger than 53 bits.\n * @throws {Error} the distance is too small to create a random number.\n */\nfunction create(min, max) {\n let crypt;\n let globalReference = getGlobal();\n\n crypt = globalReference?.['crypto'] || globalReference?.['msCrypto'] || globalReference?.['crypto'] || undefined;\n\n if (typeof crypt === \"undefined\") {\n throw new Error(\"missing crypt\")\n }\n\n let rval = 0;\n const range = max - min;\n if (range < 2) {\n throw new Error('the distance is too small to create a random number.')\n }\n\n const bitsNeeded = Math.ceil(Math.log2(range));\n if (bitsNeeded > 53) {\n throw new Error(\"we cannot generate numbers larger than 53 bits.\");\n }\n const bytesNeeded = Math.ceil(bitsNeeded / 8);\n const mask = Math.pow(2, bitsNeeded) - 1;\n\n const byteArray = new Uint8Array(bytesNeeded);\n crypt.getRandomValues(byteArray);\n\n let p = (bytesNeeded - 1) * 8;\n for (var i = 0; i < bytesNeeded; i++) {\n rval += byteArray[i] * Math.pow(2, p);\n p -= 8;\n }\n\n rval = rval & mask;\n\n if (rval >= range) {\n return create(min, max);\n }\n\n return min + rval;\n\n}\n\nassignToNamespace('Monster.Math', random);\nexport {Monster, random}\n\n\n\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport { Base} from '../types/base.js';\nimport {isFunction} from '../types/is.js';\n\n/**\n * The comparator allows a comparison function to be abstracted.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/comparator.js';\n * console.log(new Monster.Util.Comparator())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/comparator.js';\n * console.log(new Comparator())\n * </script>\n * ```\n *\n * The following are some examples of the application of the class.\n *\n * ```\n * new Comparator().lessThanOrEqual(2, 5) // ↦ true\n * new Comparator().greaterThan(4, 2) // ↦ true\n * new Comparator().equal(4, 4) // ↦ true\n * new Comparator().equal(4, 5) // ↦ false\n * ```\n *\n * You can also pass your own comparison function, and thus define the comparison function.\n *\n * ```\n * new Comparator(function (a, b) {\n * if (a.v === b.v) return 0;\n * return a.v < b.v ? -1 : 1;\n * }).equal({v: 2}, {v: 2}); // ↦ true\n * ```\n * \n * @example\n *\n * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/comparator.js';\n *\n * console.log(new Comparator().lessThanOrEqual(2, 5))\n * // ↦ true\n * console.log(new Comparator().greaterThan(4, 2))\n * // ↦ true\n * console.log(new Comparator().equal(4, 4))\n * // ↦ true\n * console.log(new Comparator().equal(4, 5))\n * // ↦ false\n *\n * @since 1.3.0\n * @memberOf Monster/Util\n */\nclass Comparator extends Base {\n\n /**\n * create new comparator\n *\n * @param {function} callback\n * @throw {TypeError} \"unsupported type\"\n * @throw {TypeError} \"impractical comparison\"\n */\n constructor(callback) {\n super();\n\n if (isFunction(callback)) {\n this.compare = callback\n } else if (callback !== undefined) {\n throw new TypeError(\"unsupported type\")\n } else {\n // default compare function\n this.compare = function (a, b) {\n\n if (typeof a !== typeof b) {\n throw new TypeError(\"impractical comparison\")\n }\n\n if (a === b) {\n return 0;\n }\n return a < b ? -1 : 1;\n };\n }\n\n }\n\n /**\n * changes the order of the operators\n *\n * @return {Comparator}\n */\n reverse() {\n const original = this.compare;\n this.compare = (a, b) => original(b, a);\n return this;\n }\n\n /**\n * Checks if two variables are equal.\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n equal(a, b) {\n return this.compare(a, b) === 0;\n }\n\n\n /**\n * Checks if variable `a` is greater than `b`\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n greaterThan(a, b) {\n return this.compare(a, b) > 0;\n }\n\n /**\n * Checks if variable `a` is greater than or equal to `b`\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n greaterThanOrEqual(a, b) {\n return this.greaterThan(a, b) || this.equal(a, b);\n }\n\n /**\n * Checks if variable `a` is less than or equal to `b`\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n lessThanOrEqual(a, b) {\n return this.lessThan(a, b) || this.equal(a, b);\n }\n\n /**\n * Checks if variable a is less than b\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n lessThan(a, b) {\n return this.compare(a, b) < 0;\n }\n\n\n}\n\nassignToNamespace('Monster.Util', Comparator);\nexport {Monster, Comparator}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {validateObject} from '../types/validate.js';\n\n/**\n * Deep freeze a object\n *\n * You can call the method via the monster namespace `Monster.Util.deepFreeze()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/freeze.js';\n * console.log(Monster.Util.deepFreeze({})) \n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/util/freeze.js';\n * console.log(deepFreeze({})) \n * </script>\n * ```\n *\n * @param {object} obj object to be freeze\n * @since 1.0.0\n * @returns {object}\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {TypeError} value is not a object\n */\nfunction deepFreeze(object) {\n \n validateObject(object)\n\n // Retrieve the defined property names of the object\n var propNames = Object.getOwnPropertyNames(object);\n\n // Freeze properties before freezing yourself\n for (let name of propNames) {\n let value = object[name];\n\n object[name] = value && typeof value === \"object\" ?\n deepFreeze(value) : value;\n }\n\n return Object.freeze(object);\n}\n\nassignToNamespace('Monster.Util', deepFreeze);\nexport {Monster, deepFreeze}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, assignToNamespace} from '../namespace.js';\nimport {isFunction} from \"../types/is.js\";\nimport {validateString} from \"../types/validate.js\";\nimport {Pathfinder} from \"./pathfinder.js\";\n\n/**\n * With the help of the function `buildMap()`, maps can be easily created from data objects.\n *\n * Either a simple definition `a.b.c` or a template `${a.b.c}` can be specified as the path.\n * Key and value can be either a definition or a template. The key does not have to be defined.\n *\n * You can call the method via the monster namespace `Monster.Data.buildMap()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/buildmap.js';\n * console.log(Monster.Data.buildMap())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/types/buildmap.js';\n * console.log(buildMap())\n * </script>\n * ```\n *\n * @example\n *\n * // a typical data structure as reported by an api\n *\n * let map;\n * let obj = {\n * \"data\": [\n * {\n * \"id\": 10,\n * \"name\": \"Cassandra\",\n * \"address\": {\n * \"street\": \"493-4105 Vulputate Street\",\n * \"city\": \"Saumur\",\n * \"zip\": \"52628\"\n * }\n * },\n * {\n * \"id\": 20,\n * \"name\": \"Holly\",\n * \"address\": {\n * \"street\": \"1762 Eget Rd.\",\n * \"city\": \"Schwalbach\",\n * \"zip\": \"952340\"\n * }\n * },\n * {\n * \"id\": 30,\n * \"name\": \"Guy\",\n * \"address\": {\n * \"street\": \"957-388 Sollicitudin Avenue\",\n * \"city\": \"Panchià\",\n * \"zip\": \"420729\"\n * }\n * }\n * ]\n * };\n *\n * // The function is passed this data structure and with the help of the selector `'data.*'` the data to be considered are selected.\n * // The key is given by a simple definition `'id'` and the value is given by a template `'${name} (${address.zip} ${address.city})'`.\n * map = buildMap(obj, 'data.*', '${name} (${address.zip} ${address.city})', 'id');\n * console.log(map);\n *\n * // ↦ Map(3) {\n * // '10' => 'Cassandra (52628 Saumur)',\n * // '20' => 'Holly (952340 Schwalbach)',\n * // '30' => 'Guy (420729 Panchià)'\n * // }\n *\n * // If no key is specified, the key from the selection, here the array index, is taken.\n * map = buildMap(obj, 'data.*', '${name} (${address.zip} ${address.city})');\n * console.log(map);\n *\n * // ↦ Map(3) {\n * // '0' => 'Cassandra (52628 Saumur)',\n * // '1' => 'Holly (952340 Schwalbach)',\n * // '2' => 'Guy (420729 Panchià)'\n * // }\n *\n * // a filter (function(value, key) {}) can be specified to accept only defined entries.\n * map = buildMap(obj, 'data.*', '${name} (${address.zip} ${address.city})', 'id', function (value, key) {\n * return (value['id'] >= 20) ? true : false\n * });\n * console.log(map);\n *\n * // ↦ Map(2) {\n * // 20 => 'Holly (952340 Schwalbach)',\n * // 30 => 'Guy (420729 Panchià)'\n * // }\n *\n * @param {*} subject\n * @param {string} selector\n * @param {string|undefined} valueTemplate\n * @param {string|undefined} keyTemplate\n * @param {function|undefined} filter\n * @return {*}\n */\nfunction buildMap(subject, selector, valueTemplate, keyTemplate, filter) {\n\n validateString(selector);\n const result = new Map\n\n let finder = new Pathfinder(subject);\n\n let map = finder.getVia(selector);\n if (!(map instanceof Map)) {\n return result;\n }\n\n map.forEach((v, k, m) => {\n if (isFunction(filter)) {\n if (filter.call(m, v, k) !== true) return;\n }\n\n k = build(v, keyTemplate, k);\n v = build(v, valueTemplate);\n\n result.set(k, v);\n });\n\n return result;\n}\n\n/**\n * @private\n * @param {*} subject\n * @param {string|undefined} definition\n * @param {*} defaultValue\n * @return {*}\n */\nfunction build(subject, definition, defaultValue) {\n if (definition === undefined) return defaultValue ? defaultValue : subject;\n validateString(definition);\n\n const regexp = /(?<placeholder>\\${(?<path>[a-z.-_0-9]*)})/gm\n const array = [...definition.matchAll(regexp)];\n\n let finder = new Pathfinder(subject);\n\n if (array.length === 0) {\n return finder.getVia(definition);\n }\n\n array.forEach((a) => {\n let groups = a?.['groups'];\n let placeholder = groups?.['placeholder']\n if (placeholder === undefined) return;\n\n let path = groups?.['path']\n\n let v = finder.getVia(path);\n\n definition = definition.replaceAll(placeholder, v);\n\n\n })\n\n return definition;\n\n}\n\n\nassignToNamespace('Monster.Data', buildMap);\nexport {Monster, buildMap}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * @license\n * Copyright 2021 schukai GmbH\n * SPDX-License-Identifier: AGPL-3.0-only or COMMERCIAL\n * @author schukai GmbH\n */\n\n'use strict';\n\nimport {Monster} from './namespace.js';\n\n// find . -type f -name \"*.js\" -not -name \"*namespace*\" -not -iname \"monster.js\"\n\nimport './constraints/isobject.js';\nimport './constraints/valid.js';\nimport './constraints/invalid.js';\nimport './constraints/abstractoperator.js';\nimport './constraints/oroperator.js';\nimport './constraints/andoperator.js';\nimport './constraints/abstract.js';\nimport './constraints/isarray.js';\nimport './logging/logger.js';\nimport './logging/handler.js';\nimport './logging/logentry.js';\nimport './logging/handler/console.js';\nimport './text/formatter.js';\nimport './dom/updater.js';\nimport './dom/attributes.js';\nimport './dom/template.js';\nimport './dom/util.js';\nimport './dom/locale.js';\nimport './dom/customcontrol.js';\nimport './dom/constants.js';\nimport './dom/assembler.js';\nimport './dom/theme.js';\nimport './dom/events.js';\nimport './dom/customelement.js';\nimport './i18n/providers/fetch.js';\nimport './i18n/translations.js';\nimport './i18n/locale.js';\nimport './i18n/provider.js';\nimport './types/queue.js';\nimport './types/observer.js';\nimport './types/global.js';\nimport './types/observerlist.js';\nimport './types/basewithoptions.js';\nimport './types/is.js';\nimport './types/proxyobserver.js';\nimport './types/uniquequeue.js';\nimport './types/tokenlist.js';\nimport './types/typeof.js';\nimport './types/base.js';\nimport './types/version.js';\nimport './types/id.js';\nimport './types/randomid.js';\nimport './types/validate.js';\nimport './types/stack.js';\nimport './util/comparator.js';\nimport './util/clone.js';\nimport './util/freeze.js';\nimport './constants.js';\nimport './data/pathfinder.js';\nimport './data/pipe.js';\nimport './data/extend.js';\nimport './data/diff.js';\nimport './data/buildmap.js';\nimport './data/transformer.js';\nimport './math/random.js';\n\nMonster.Util.deepFreeze(Monster);\n\nlet rootName\ntry {\n rootName = Monster.Types.getGlobalObject('__MonsterRootName__');\n} catch (e) {\n\n}\n\nif (!rootName) rootName = \"Monster\";\n\nMonster.Types.getGlobal()[rootName] = Monster\nexport {Monster};"],"names":["Namespace","namespace","undefined","Error","getNamespace","Monster","assignToNamespace","ns","current","namespaceFor","split","i","l","objectName","fn","hasOwnProperty","name","toString","s","f","match","Array","isArray","c","e","parts","space","length","AbstractConstraint","isObject","IsObject","value","Promise","resolve","reject","Base","JSON","stringify","Object","isIterable","Symbol","iterator","isPrimitive","type","NaN","isSymbol","isBoolean","isString","isInstance","instance","isFunction","isInteger","Number","Valid","Invalid","AbstractOperator","operantA","operantB","TypeError","OrOperator","self","a","b","isValid","then","catch","AndOperator","all","IsArray","validateInteger","validateObject","validateString","Handler","LogEntry","ALL","TRACE","DEBUG","INFO","WARN","ERROR","FATAL","OFF","Logger","handler","Set","add","delete","triggerLog","apply","arguments","level","label","loglevel","logger","args","log","validateIterable","validatePrimitive","validateBoolean","validateInstance","n","validateArray","validateSymbol","validateFunction","entry","getLogLevel","setLogLevel","ConsoleHandler","Pipe","Formatter","object","openMarker","closeMarker","open","close","text","tokenizer","call","formatted","startIndex","indexOf","push","substring","endIndex","command","run","join","Transformer","DELIMITER","pipe","map","v","callback","context","entries","t","setCallback","reduce","accumulator","transformer","currentIndex","array","getGlobal","ID","clone","Pathfinder","definition","disassemble","shift","callbacks","Map","set","transform","placeholder","regex","result","matchAll","m","g","p","r","replace","trim","k","convertToString","key","toLowerCase","toUpperCase","parseInt","parse","encodeURIComponent","callbackName","has","get","window","unshift","doc","DOMParser","parseFromString","body","textContent","trueStatement","falseStatement","condition","firstchar","charAt","substr","btoa","prefix","suffix","defaultValue","getVia","start","end","globalReference","globalThis","defineProperty","prototype","configurable","__monster__","Function","getGlobalObject","o","getGlobalFunction","internalCounter","count","id","obj","copy","len","Date","setTime","getTime","Element","HTMLDocument","DocumentFragment","globalContext","document","navigator","Proxy","cloneObject","getClone","constructor","Types","Stack","WILDCARD","wildCard","wildcard","path","getValueViaPath","setValueViaPath","deleteValueViaPath","iterate","subject","check","anchor","WeakMap","WeakSet","WeakRef","last","pop","subpath","stack","isEmpty","peek","append","assignProperty","data","Observer","ProxyObserver","Diff","ATTRIBUTE_UPDATER_REPLACE","ATTRIBUTE_UPDATER_ATTRIBUTES","ATTRIBUTE_UPDATER_INSERT","ATTRIBUTE_UPDATER_REMOVE","ATTRIBUTE_UPDATER_INSERT_REFERENCE","ATTRIBUTE_UPDATER_BIND","findDocumentTemplate","getDocument","Updater","element","HTMLElement","getCheckStateCallback","attachObserver","getRealSubject","diff","change","removeElement","insertElement","updateContent","updateAttributes","eventTypes","types","disableEventProcessing","addEventListener","getControlEventHandler","removeEventListener","notifyObservers","getSubject","HTMLInputElement","HTMLOptionElement","symbol","pathfinder","event","target","hasAttribute","getAttribute","checked","HTMLTextAreaElement","HTMLSelectElement","options","selectedOptions","querySelectorAll","from","getOwnPropertyDescriptor","pf","setVia","parentNode","removeChild","mem","wd","found","list","containerElement","attributes","def","refPrefix","cmd","forEach","dataPath","insertPoint","hasChildNodes","lastChild","available","ref","currentPath","refElement","querySelector","appendNewDocumentFragment","nodes","node","container","rootNode","getRootNode","template","createDocumentFragment","childNodes","applyRecursive","setAttribute","appendChild","child","runUpdateContent","firstChild","addNode","innerHTML","runUpdateAttributes","removeAttribute","handleInputControlAttributeUpdate","index","opt","selected","selectedIndex","TokenList","UniqueQueue","tags","queue","tag","remove","contains","setTimeout","poll","init","tokens","next","done","counter","token","clear","newToken","splice","toggleValue","Queue","unique","ObserverList","realSubject","getHandler","objectMap","proxyMap","observers","observer","attach","detach","notify","proxy","receiver","Reflect","descriptor","writable","enumerable","deleteProperty","setPrototypeOf","object1","pomises","update","first","second","doDiff","getKeys","keys","fill","_","concat","typeA","typeB","currPath","currDiff","buildResult","getOperator","operator","getPrototypeOf","isNotEqual","ATTRIBUTE_PREFIX","ATTRIBUTE_OPTIONS","DEFAULT_THEME","ATTRIBUTE_THEME_PREFIX","ATTRIBUTE_THEME_NAME","ATTRIBUTE_ROLE","ATTRIBUTE_OBJECTLINK","OBJECTLINK_KEY_UPDATER","getDocumentTheme","Template","HTMLTemplateElement","content","cloneNode","root","Node","theme","themedID","getName","getElementById","Theme","getWindow","getDocumentFragmentFromString","html","createElement","findClosestObjectLink","findClosestByAttribute","addToObjectLink","addAttributeToken","removeObjectLink","removeAttributeToken","hasObjectLink","containsAttributeToken","getLinkedObjects","toggleAttributeToken","toggle","replaceAttributeToken","to","clearAttributeTokens","selector","closest","parseLocale","DEFAULT_LANGUAGE","getLocaleOfDocument","locale","propertiesSymbol","localeStringSymbol","Locale","language","region","script","variants","extlang","privateUse","privateValue","localeString","regexRegular","regexIrregular","regexGrandfathered","regexPrivateUse","regexSingleton","regexExtension","regexVariant","regexRegion","regexScript","regexExtlang","regexLanguage","regexLangtag","regexLanguageTag","RegExp","exec","lastIndex","extend","CustomElement","internalSymbol","CustomControl","attachInternals","state","getInternal","setFormValue","flags","message","setValidity","checkValidity","reportValidity","labels","getTag","validity","validationMessage","willValidate","states","form","typeOf","results","PROPERTY_KEY_INTERNALDATA","internalDataSymbol","for","objectLinkSymbol","initMethodSymbol","assembleMethodSymbol","defaults","getOptionsFromAttributes","initOptionObserver","detachObserver","containsObserver","shadowMode","delegatesFocus","templates","main","parseOptionsJSON","elements","getOption","initShadowRoot","shadowRoot","NodeList","initHtmlContent","updater","u","enableEventProcessing","attrName","oldVal","newVal","setOptions","updaters","d","assign","attachShadow","mode","styleSheet","getCSSStyleSheet","CSSStyleSheet","adoptedStyleSheets","registerCustomElement","define","ATTRIBUTEPREFIX","Assembler","fragment","attributePrefix","fireEvent","click","Event","bubbles","cancelable","dispatchEvent","HTMLCollection","findTargetElementFromEvent","attributeName","attributeValue","composedPath","Provider","Translations","optionsSymbol","Fetch","url","URL","fetch","method","cache","credentials","redirect","referrerPolicy","formatter","getMap","format","response","json","assignTranslations","BaseWithOptions","storage","defaultText","getPluralRuleText","keyword","toLocaleString","Intl","PluralRules","select","DEFAULT_KEY","translations","setText","Version","major","minor","patch","isNaN","version","Math","max","monsterVersion","getVersion","random","RandomID","min","MAX","round","create","log2","crypt","rval","range","bitsNeeded","ceil","bytesNeeded","mask","pow","byteArray","Uint8Array","getRandomValues","Comparator","compare","original","greaterThan","equal","lessThan","deepFreeze","propNames","getOwnPropertyNames","freeze","buildMap","valueTemplate","keyTemplate","filter","finder","build","regexp","groups","replaceAll","Util","rootName"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"monster.dev.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,yBAAyB,GAA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMG;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQb,KAAR,EAAe;AACX,aAAOC,OAAO,CAACC,MAAR,CAAeF,KAAf,CAAP;AACH;;;;EAViBD;;AActBvB,gEAAiB,CAAC,qBAAD,EAAwBqC,OAAxB,CAAjB;;;;;;;;;;;;;;;ACxDa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMC;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQd,KAAR,EAAe;AACX,UAAIR,qDAAO,CAACQ,KAAD,CAAX,EAAoB;AAChB,eAAOC,OAAO,CAACc,OAAR,CAAgBf,KAAhB,CAAP;AACH;;AAED,aAAOC,OAAO,CAACC,MAAR,CAAeF,KAAf,CAAP;AACH;;;;EAdiBD;;AAkBtBvB,gEAAiB,CAAC,qBAAD,EAAwBsC,OAAxB,CAAjB;;;;;;;;;;;;;;;;;;;;;;AChEa;AAEb;AACA;AACA;;;;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASE,UAAT,CAAoBhB,KAApB,EAA2B;AACvB,MAAIA,KAAK,KAAK3B,SAAd,EAAyB,OAAO,KAAP;AACzB,MAAI2B,KAAK,KAAK,IAAd,EAAoB,OAAO,KAAP;AACpB,SAAO,QAAOA,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAGiB,MAAM,CAACC,QAAV,CAAZ,MAAoC,UAA3C;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASC,WAAT,CAAqBnB,KAArB,EAA4B;AACxB,MAAIoB,IAAJ;;AAEA,MAAIpB,KAAK,KAAK3B,SAAV,IAAuB2B,KAAK,KAAK,IAAjC,IAAyCA,KAAK,KAAKqB,GAAvD,EAA4D;AACxD,WAAO,IAAP;AACH;;AAEDD,EAAAA,IAAI,WAAUpB,KAAV,CAAJ;;AAEA,MAAIoB,IAAI,KAAK,QAAT,IAAqBA,IAAI,KAAK,QAA9B,IAA0CA,IAAI,KAAK,SAAnD,IAAgEA,IAAI,KAAK,QAA7E,EAAuF;AACnF,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASE,QAAT,CAAkBtB,KAAlB,EAAyB;AACrB,SAAQ,qBAAoBA,KAApB,CAAD,GAA8B,IAA9B,GAAqC,KAA5C;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASuB,SAAT,CAAmBvB,KAAnB,EAA0B;AAEtB,MAAIA,KAAK,KAAK,IAAV,IAAkBA,KAAK,KAAK,KAAhC,EAAuC;AACnC,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASwB,QAAT,CAAkBxB,KAAlB,EAAyB;AACrB,MAAIA,KAAK,KAAK3B,SAAV,IAAuB,OAAO2B,KAAP,KAAiB,QAA5C,EAAsD;AAClD,WAAO,KAAP;AACH;;AACD,SAAO,IAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASyB,QAAT,CAAkBzB,KAAlB,EAAyB;AAErB,MAAIR,OAAO,CAACQ,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAImB,WAAW,CAACnB,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,QAAOA,KAAP,MAAiB,QAArB,EAA+B;AAC3B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS0B,UAAT,CAAoB1B,KAApB,EAA2B2B,QAA3B,EAAqC;AAEjC,MAAI,CAACF,QAAQ,CAACzB,KAAD,CAAb,EAAsB,OAAO,KAAP;AACtB,MAAI,CAAC4B,UAAU,CAACD,QAAD,CAAf,EAA2B,OAAO,KAAP;AAC3B,MAAI,CAACA,QAAQ,CAAC1C,cAAT,CAAwB,WAAxB,CAAL,EAA2C,OAAO,KAAP;AAC3C,SAAQe,KAAK,YAAY2B,QAAlB,GAA8B,IAA9B,GAAqC,KAA5C;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASnC,OAAT,CAAiBQ,KAAjB,EAAwB;AACpB,MAAIT,KAAK,CAACC,OAAN,CAAcQ,KAAd,CAAJ,EAA0B;AACtB,WAAO,IAAP;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS4B,UAAT,CAAoB5B,KAApB,EAA2B;AACvB,MAAIR,OAAO,CAACQ,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAImB,WAAW,CAACnB,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,OAAOA,KAAP,KAAiB,UAArB,EAAiC;AAC7B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS6B,SAAT,CAAmB7B,KAAnB,EAA0B;AACtB,SAAO8B,MAAM,CAACD,SAAP,CAAiB7B,KAAjB,CAAP;AACH;;AAGDxB,gEAAiB,CAAC,eAAD,EAAkB2C,WAAlB,EAA+BI,SAA/B,EAA0CC,QAA1C,EAAoDC,QAApD,EAA8DjC,OAA9D,EAAuEoC,UAAvE,EAAmFZ,UAAnF,EAA+Fa,SAA/F,EAA0GP,QAA1G,CAAjB;;;;;;;;;;;;;;;AC7Ya;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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Y;AACdrB,UAAAA,OAAO;AACV,SAHL,EAGOsB,KAHP,CAGa,YAAY;AACrBF,UAAAA,CAAC,GAAG,KAAJ;AACA;;AACA,cAAID,CAAC,KAAK,KAAV,EAAiB;AACbhC,YAAAA,MAAM;AACT;AACJ,SATD;AAUH,OAxBM,CAAP;AAyBH;;;;EApCoBI;;AAyCzB9B,gEAAiB,CAAC,qBAAD,EAAwBwD,UAAxB,CAAjB;;;;;;;;;;;;;;AC1Fa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMM;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQtC,KAAR,EAAe;AACX,aAAOC,OAAO,CAACc,OAAR,CAAgBf,KAAhB,CAAP;AACH;;;;EAVeD;;AAcpBvB,gEAAiB,CAAC,qBAAD,EAAwB8D,KAAxB,CAAjB;;;;;;;;;;;;;;;;ACxDa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASqE,iBAAT,CAA2BrE,KAA3B,EAAkC;AAC9B,MAAI,CAACmB,mDAAW,CAACnB,KAAD,CAAhB,EAAyB;AACrB,UAAM,IAAIS,SAAJ,CAAc,0BAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASsE,eAAT,CAAyBtE,KAAzB,EAAgC;AAC5B,MAAI,CAACuB,iDAAS,CAACvB,KAAD,CAAd,EAAuB;AACnB,UAAM,IAAIS,SAAJ,CAAc,wBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASuC,cAAT,CAAwBvC,KAAxB,EAA+B;AAC3B,MAAI,CAACwB,gDAAQ,CAACxB,KAAD,CAAb,EAAsB;AAClB,UAAM,IAAIS,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASuE,cAAT,CAAwBvE,KAAxB,EAA+B;AAC3B,MAAI,CAACyB,gDAAQ,CAACzB,KAAD,CAAb,EAAsB;AAClB,UAAM,IAAIS,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASwE,gBAAT,CAA0BxE,KAA1B,EAAiC2B,QAAjC,EAA2C;AACvC,MAAI,CAACD,kDAAU,CAAC1B,KAAD,EAAQ2B,QAAR,CAAf,EAAkC;AAC9B,QAAI8C,CAAC,GAAG,EAAR;;AACA,QAAIhD,gDAAQ,CAACE,QAAD,CAAR,IAAsBC,kDAAU,CAACD,QAAD,CAApC,EAAgD;AAC5C8C,MAAAA,CAAC,GAAG9C,QAAH,aAAGA,QAAH,uBAAGA,QAAQ,CAAG,MAAH,CAAZ;AACH;;AAED,QAAI8C,CAAJ,EAAO;AACHA,MAAAA,CAAC,GAAG,MAAMA,CAAV;AACH;;AAED,UAAM,IAAIhE,SAAJ,CAAc,gCAAgCgE,CAA9C,CAAN;AACH;;AACD,SAAOzE,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS0E,aAAT,CAAuB1E,KAAvB,EAA8B;AAC1B,MAAI,CAACR,+CAAO,CAACQ,KAAD,CAAZ,EAAqB;AACjB,UAAM,IAAIS,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS2E,cAAT,CAAwB3E,KAAxB,EAA+B;AAC3B,MAAI,CAACsB,gDAAQ,CAACtB,KAAD,CAAb,EAAsB;AAClB,UAAM,IAAIS,SAAJ,CAAc,wBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS4E,gBAAT,CAA0B5E,KAA1B,EAAiC;AAC7B,MAAI,CAAC4B,kDAAU,CAAC5B,KAAD,CAAf,EAAwB;AACpB,UAAM,IAAIS,SAAJ,CAAc,yBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS6E,eAAT,CAAyB7E,KAAzB,EAAgC;AAC5B,MAAI,CAAC6B,iDAAS,CAAC7B,KAAD,CAAd,EAAuB;AACnB,UAAM,IAAIS,SAAJ,CAAc,yBAAd,CAAN;AACH;;AACD,SAAOT,KAAP;AACH;;AAEDxB,gEAAiB,CAAC,eAAD,EAAkB6F,iBAAlB,EAAqCC,eAArC,EAAsD/B,cAAtD,EAAsEgC,cAAtE,EAAsFG,aAAtF,EAAqGE,gBAArG,EAAuHR,gBAAvH,EAAyIS,eAAzI,CAAjB;;;;;;;;;;;;;;;;;ACjaa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAME,SAAS,GAAG,GAAlB;AACA;AACA;AACA;AACA;;AACA,IAAMC,QAAQ,GAAG,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMxC;;;;;AAEF;AACJ;AACA;AACA;AACI,sBAAYyC,MAAZ,EAAoB;AAAA;;AAAA;;AAChB;AACA,UAAKA,MAAL,GAAcA,MAAd;AACA,UAAKC,QAAL,GAAgBF,QAAhB;AAHgB;AAInB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;WACI,qBAAYG,QAAZ,EAAsB;AAClB5C,MAAAA,kEAAc,CAAC4C,QAAD,CAAd;AACA,WAAKD,QAAL,GAAgBC,QAAhB;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,gBAAOjB,IAAP,EAAa;AACT,aAAOkB,eAAe,CAAC5B,IAAhB,CAAqB,IAArB,EAA2B,KAAKyB,MAAhC,EAAwC1C,kEAAc,CAAC2B,IAAD,CAAtD,CAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,gBAAOA,IAAP,EAAalE,KAAb,EAAoB;AAChBuC,MAAAA,kEAAc,CAAC2B,IAAD,CAAd;AACAmB,MAAAA,eAAe,CAAC7B,IAAhB,CAAqB,IAArB,EAA2B,KAAKyB,MAAhC,EAAwCf,IAAxC,EAA8ClE,KAA9C;AAC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;AACA;AACA;AACA;AACA;;IACMtB;;;;;AAEF;AACJ;AACA;AACI,mBAAc;AAAA;;AAAA;;AACV;AACA,UAAKiC,IAAL,GAAY,EAAZ;AAFU;AAGb;AAGD;AACJ;AACA;;;;;WACI,mBAAU;AACN,aAAO,KAAKA,IAAL,CAAUlH,MAAV,KAAqB,CAA5B;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,gBAAO;AAAA;;AACH,UAAI,KAAK4G,OAAL,EAAJ,EAAoB;AAChB,eAAOpI,SAAP;AACH;;AAED,2BAAO,KAAK0I,IAAZ,+CAAO,WAAY,KAAKA,IAAL,CAAUlH,MAAV,GAAmB,CAA/B,CAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,cAAKG,KAAL,EAAY;AACR,WAAK+G,IAAL,CAAUP,IAAV,CAAexG,KAAf;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,iBAAQ;AACJ,WAAK+G,IAAL,GAAY,EAAZ;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;WACI,eAAM;AACF,UAAI,KAAKN,OAAL,EAAJ,EAAoB;AAChB,eAAOpI,SAAP;AACH;;AACD,aAAO,KAAK0I,IAAL,CAAUV,GAAV,EAAP;AACH;;;;EAhEevG;;AAqEpBtB,gEAAiB,CAAC,eAAD,EAAkBsG,KAAlB,CAAjB;;;;;;;;;;;;;;ACrGa;AAEb;AACA;AACA;;;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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B;;;;;;;;;;;;;;;;;;;;AC5Ga;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMD;;;;;AACF;AACJ;AACA;AACA;AACI,uBAAYnF,UAAZ,EAAwB;AAAA;;AAAA;;AACpB;AACApB,IAAAA,kEAAc,CAACoB,UAAD,CAAd;AAEA,UAAKkG,IAAL,GAAYC,WAAW,CAACnG,UAAD,CAAvB;AACA,UAAKoG,OAAL,GAAe,MAAKF,IAAL,CAAUlE,KAAV,EAAf;AACA,UAAKqE,SAAL,GAAiB,IAAIhH,GAAJ,EAAjB;AANoB;AAQvB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;WACI,qBAAY9D,IAAZ,EAAkB+J,QAAlB,EAA4BC,OAA5B,EAAqC;AACjC3G,MAAAA,kEAAc,CAACrD,IAAD,CAAd;AACA0F,MAAAA,oEAAgB,CAACqE,QAAD,CAAhB;;AAEA,UAAIC,OAAO,KAAK7K,SAAhB,EAA2B;AACvBkG,QAAAA,kEAAc,CAAC2E,OA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OAAP;AACH;;;;;;;;;;;;;;;;ACzRY;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMb;;;;;AAEF;AACJ;AACA;AACA;AACA;AACI,oBAAY/E,QAAZ,EAA+B;AAAA;;AAAA;;AAC3B;;AAEA,QAAI,OAAOA,QAAP,KAAoB,UAAxB,EAAoC;AAChC,YAAM,IAAI3K,KAAJ,CAAU,sCAAV,CAAN;AACH;;AAED,UAAK2K,QAAL,GAAgBA,QAAhB;;AAP2B,sCAANY,IAAM;AAANA,MAAAA,IAAM;AAAA;;AAQ3B,UAAKnB,SAAL,GAAiBmB,IAAjB;AACA,UAAK6F,IAAL,GAAY,IAAIF,oDAAJ,EAAZ;AACA,UAAKG,KAAL,GAAa,IAAIF,wDAAJ,EAAb;AAV2B;AAW9B;AAED;AACJ;AACA;AACA;AACA;;;;;WACI,gBAAOG,GAAP,EAAY;AACR,WAAKF,IAAL,CAAUG,GAAV,CAAcD,GAAd;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,mBAAUA,GAAV,EAAe;AACX,WAAKF,IAAL,CAAUI,MAAV,CAAiBF,GAAjB;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;;;;WACI,mBAAU;AACN,aAAO,KAAKF,IAAL,CAAUjK,OAAV,EAAP;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,gBAAOmK,GAAP,EAAY;AACR,aAAO,KAAKF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AsB,GAAG,gBAA/B;;;;;;;;;;;;;;;ACvGa;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb;AACA;AACA;AACA;;AACA;AACA;AAGA;AACA;AACA;AACA;;AACA,IAAME,cAAc,GAAGrS,MAAM,CAAC,gBAAD,CAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMsS;;;;;AAEF;AACJ;AACA;AACA;AACI,2BAAc;AAAA;;AAAA;;AACV;;AAEA,QAAI,OAAO,MAAK,iBAAL,CAAP,KAAmC,UAAvC,EAAmD;AAC/C;AACA,YAAKD,cAAL,IAAuB,MAAKE,eAAL,EAAvB;AACH;;AANS;AAQb;AAED;AACJ;AACA;AACA;AACA;AACA;;;;;;AAKI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI,mBAAe;AACX,aAAO/K,uDAAM,CAAC,EAAD,mEAAb;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;SACI,eAAY;AACR,YAAMnK,KAAK,CAAC,2DAAD,CAAX;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;SACI,aAAU0B,KAAV,EAAiB;AACb,YAAM1B,KAAK,CAAC,2DAAD,CAAX;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;SACI,eAAa;AAAA;;AACT,kCAAOmV,WAAW,CAACjQ,IAAZ,CAAiB,IAAjB,CAAP,sDAAO,kBAAwBkQ,MAA/B;AACH;AAED;AACJ;AACA;AACA;AACA;;;;SACI,eAAW;AACP,aAAO,KAAKxB,YAAL,CAAkB,MAAlB,CAAP;AACH;AAED;AACJ;AACA;AACA;AACA;;;;SACI,eAAW;AACP,aA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMoS;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACA;AACI,2BAAc;AAAA;;AAAA;;AACV;AACA,UAAKsB,kBAAL,IAA2B,IAAIjH,kEAAJ,CAAkB;AAAC,iBAAWjF,uDAAM,CAAC,EAAD,EAAK,MAAKuM,QAAV,EAAoBC,wBAAwB,CAACzR,IAAzB,+BAApB;AAAlB,KAAlB,CAA3B;AACA0R,IAAAA,kBAAkB,CAAC1R,IAAnB;;AACA,UAAKsR,gBAAL;;AAJU;AAKb;AAED;AACJ;AACA;AACA;AACA;AACA;;;;;;AAKI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI,mBAAe;AACX,aAAO;AACHK,QAAAA,UAAU,EAAE,MADT;AAEHC,QAAAA,cAAc,EAAE,IAFb;AAGHC,QAAAA,SAAS,EAAE;AACPC,UAAAA,IAAI,EAAEjX;AADC;AAHR,OAAP;AAOH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AA+BI;AACJ;AACA;AACA;AACA;AACA;AACI,4BAAekQ,QAAf,EAA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BkW,OAAhB,CAAjB;;;;;;;;;;;;;;;;;AC3uBa;AAEb;AACA;AACA;;;;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASiE,WAAT,GAAuB;AAAA;;AACnB,MAAIvL,QAAQ,iBAAG1D,2DAAS,EAAZ,+CAAG,WAAc,UAAd,CAAf;;AACA,MAAI,QAAO0D,QAAP,MAAoB,QAAxB,EAAkC;AAC9B,UAAM,IAAI9O,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAO8O,QAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASgP,SAAT,GAAqB;AAAA;;AACjB,MAAIrR,MAAM,kBAAGrB,2DAAS,EAAZ,gDAAG,YAAc,QAAd,CAAb;;AACA,MAAI,QAAOqB,MAAP,MAAkB,QAAtB,EAAgC;AAC5B,UAAM,IAAIzM,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAOyM,MAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAP,CAA3B;AAxBiE;AA0BpE;AAED;AACJ;AACA;;;;;SACI,eAAmB;AACf,aAAO,KAAK2X,kBAAL,CAAP;AACH;AAED;AACJ;AACA;;;;SACI,eAAe;AACX,aAAO,KAAKD,gBAAL,EAAuBG,QAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAa;AACT,aAAO,KAAKH,gBAAL,EAAuBI,MAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAa;AACT,aAAO,KAAKJ,gBAAL,EAAuBK,MAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAe;AACX,aAAO,KAAKL,gBAAL,EAAuBM,QAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAc;AACV,aAAO,KAAKN,gBAAL,EAAuBO,OAA9B;AACH;AAED;AACJ;AACA;;;;SACI,eAAiB;AACb,aAAO,KAAKP,gBAAL,EAAuBS,YAA9B;AACH;AAGD;AACJ;AACA;;;;WACI,oBAAW;AACP,aAAO,KAAK,KAAKC,YAAjB;AACH;AAED;AACJ;AACA;;;;WACI,kBAAS;AACL,aAAOpU,qDAAK,CAAC,KAAK0T,gBAAL,CAAD,CAAZ;AACH;;;;EArGgBxd;AA2GrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASod,WAAT,CAAqBG,MAArB,EAA6B;AAEzBA,EAAAA,MAAM,GAAG9a,kEAAc,CAAC8a,MAAD,CAAd,CAAuB9S,OAAvB,CAA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Brd,MAAAA,mEAAe,CAACqd,QAAD,CAAf;AACA,WAAKA,QAAL,GAAgBA,QAAhB;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;AACV,aAAO,KAAKA,QAAZ;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,kBAAS;AACL,WAAKG,WAAL,CAAiBZ,2CAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAKY,WAAL,CAAiBN,6CAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAKM,WAAL,CAAiBX,6CAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,uBAAU;AACN,WAAKW,WAAL,CAAiBR,4CAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,uBAAU;AACN,WAAKQ,WAAL,CAAiBL,4CAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAKK,WAAL,CAAiBV,6CAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAKU,WAAL,CAAiBT,6CAAjB;AACA,aAAO,IAAP;AACH;;;;AAGD;AACJ;AACA;AACA;AACA;AACA;AACI,sBAAS;AACL,WAAKS,WAAL,CAAiBP,2CAAjB;AACA,aAAO,IAAP;AACH;;;;EA7IiBhiB;;AAmJtBtB,gEAAiB,CAAC,iBAAD,EAAoByjB,OAApB,CAAjB;;;;;;;;;;;;;;;ACtLa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMT;;;;;AACF;AACJ;AACA;AACA;AACA;AACI,oBAAYU,QAAZ,EAA+B;AAAA;;AAAA;;AAC3B;AACArd,IAAAA,mEAAe,CAACqd,QAAD,CAAf;AAEA,UAAKA,QAAL,GAAgBA,QAAhB;;AAJ2B,sCAANrY,IAAM;AAANA,MAAAA,IAAM;AAAA;;AAK3B,UAAKnB,SAAL,GAAiBmB,IAAjB;AAL2B;AAM9B;AAED;AACJ;AACA;AACA;;;;;WACI,uBAAc;AACV,aAAO,KAAKqY,QAAZ;AACH;AAED;AACJ;AACA;AACA;;;;WACI,wBAAe;AACX,aAAO,KAAKxZ,SAAZ;AACH;;;;EA5BkB5I;;AAgCvBtB,gEAAiB,CAAC,iBAAD,EAAoBgjB,QAApB,CAAjB;;;;;;;;;;;;;;;;;;;;;;;;;AClEa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;;AACA,IAAMC,GAAG,GAAG,GAAZ;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMM,KAAK,GAAG,EAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAML,KAAK,GAAG,EAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMG,IAAI,GAAG,EAAb;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMG,IAAI,GAAG,CAAb;AACA;AACA;AACA;AACA;AACA;;AACA,IAAML,KAAK,GAAG,CAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,CAAd;AACA;AACA;AACA;AACA;AACA;;AACA,IAAME,GAAG,GAAG,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMQ;;;;;AAEF;AACJ;AACA;AACI,oBAAc;AAAA;;AAAA;;AACV;AACA,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;;AAED,aAAO,CAAP;AACH;;;;EA9FiBiB;;AAkGtBtB,gEAAiB,CAAC,eAAD,EAAkBylB,OAAlB,CAAjB;AAGA,IAAIM,cAAJ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,UAAT,GAAsB;AAClB,MAAID,cAAc,YAAYN,OAA9B,EAAuC;AACnC,WAAOM,cAAP;AACH;AACD;;;AACAA,EAAAA,cAAc,GAAG,IAAIN,OAAJ,CAAY,QAAZ,CAAjB;AACA;;AAEA,SAAOM,cAAP;AAEH;;AAED/lB,gEAAiB,CAAC,SAAD,EAAYgmB,UAAZ,CAAjB;;;;;;;;;;;;;;;ACxLa;AAEb;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMC;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACA;AACI,sBAAYxb,QAAZ,EAAsB;AAAA;;AAAA;;AAClB;;AAEA,QAAIrH,wDAAU,CAACqH,QAAD,CAAd,EAA0B;AACtB,YAAKyb,OAAL,GAAezb,QAAf;AACH,KAFD,MAEO,IAAIA,QAAQ,KAAK5K,SAAjB,EAA4B;AAC/B,YAAM,IAAIoC,SAAJ,CAAc,kBAAd,CAAN;AACH,KAFM,MAEA;AACH;AACA,YAAKikB,OAAL,GAAe,UAAUxiB,CAAV,EAAaC,CAAb,EAAgB;AAE3B,YAAI,QAAOD,CAAP,cAAoBC,CAApB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CAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AAEa;;AAEb;AACA;AACA;AACA;AACA;CAGA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,IAAII,QAAJ;;AACA,IAAI;AACAA,EAAAA,QAAQ,GAAGlnB,yEAAA,CAA8B,qBAA9B,CAAX;AACH,CAFD,CAEE,OAAOyB,CAAP,EAAU,CAEX;;AAED,IAAI,CAACylB,QAAL,EAAeA,QAAQ,GAAG,SAAX;AAEflnB,mEAAA,GAA0BknB,QAA1B,IAAsClnB,mDAAtC","sources":["webpack:///webpack/universalModuleDefinition","webpack:///../../../../packages/monster/source/constants.js","webpack:///../../../../packages/monster/source/namespace.js","webpack:///../../../../packages/monster/source/constraints/abstract.js","webpack:///../../../../packages/monster/source/types/base.js","webpack:///../../../../packages/monster/source/constraints/abstractoperator.js","webpack:///../../../../packages/monster/source/constraints/andoperator.js","webpack:///../../../../packages/monster/source/constraints/invalid.js","webpack:///../../../../packages/monster/source/constraints/isarray.js","webpack:///../../../../packages/monster/source/types/is.js","webpack:///../../../../packages/monster/source/constraints/isobject.js","webpack:///../../../../packages/monster/source/constraints/oroperator.js","webpack:///../../../../packages/monster/source/constraints/valid.js","webpack:///../../../../packages/monster/source/data/buildmap.js","webpack:///../../../../packages/monster/source/types/validate.js","webpack:///../../../../packages/monster/source/data/pathfinder.js","webpack:///../../../../packages/monster/source/types/stack.js","webpack:///../../../../packages/monster/source/data/diff.js","webpack:///../../../../packages/monster/source/data/extend.js","webpack:///../../../../packages/monster/source/types/typeof.js","webpack:///../../../../packages/monster/source/data/pipe.js","webpack:///../../../../packages/monster/source/data/transformer.js","webpack:///../../../../packages/monster/source/types/global.js","webpack:///../../../../packages/monster/source/types/id.js","webpack:///../../../../packages/monster/source/util/clone.js","webpack:///../../../../packages/monster/source/dom/assembler.js","webpack:///../../../../packages/monster/source/types/proxyobserver.js","webpack:///../../../../packages/monster/source/types/observer.js","webpack:///../../../../packages/monster/source/types/tokenlist.js","webpack:///../../../../packages/monster/source/types/uniquequeue.js","webpack:///../../../../packages/monster/source/types/queue.js","webpack:///../../../../packages/monster/source/types/observerlist.js","webpack:///../../../../packages/monster/source/dom/attributes.js","webpack:///../../../../packages/monster/source/dom/constants.js","webpack:///../../../../packages/monster/source/dom/customcontrol.js","webpack:///../../../../packages/monster/source/dom/customelement.js","webpack:///../../../../packages/monster/source/dom/template.js","webpack:///../../../../packages/monster/source/dom/theme.js","webpack:///../../../../packages/monster/source/dom/updater.js","webpack:///../../../../packages/monster/source/dom/util.js","webpack:///../../../../packages/monster/source/dom/events.js","webpack:///../../../../packages/monster/source/dom/locale.js","webpack:///../../../../packages/monster/source/i18n/locale.js","webpack:///../../../../packages/monster/source/i18n/provider.js","webpack:///../../../../packages/monster/source/types/basewithoptions.js","webpack:///../../../../packages/monster/source/i18n/translations.js","webpack:///../../../../packages/monster/source/i18n/providers/fetch.js","webpack:///../../../../packages/monster/source/text/formatter.js","webpack:///../../../../packages/monster/source/logging/handler.js","webpack:///../../../../packages/monster/source/logging/logentry.js","webpack:///../../../../packages/monster/source/logging/logger.js","webpack:///../../../../packages/monster/source/logging/handler/console.js","webpack:///../../../../packages/monster/source/logging/namespace.js","webpack:///../../../../packages/monster/source/math/random.js","webpack:///../../../../packages/monster/source/types/randomid.js","webpack:///../../../../packages/monster/source/types/version.js","webpack:///../../../../packages/monster/source/util/comparator.js","webpack:///../../../../packages/monster/source/util/freeze.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///../../../../packages/monster/source/monster.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"window\"] = factory();\n\telse\n\t\troot[\"window\"] = factory();\n})(self, function() {\nreturn ","'use strict';\n\nimport {Monster} from './namespace.js';\n/**\n * Property-Keys\n * @author schukai GmbH\n */\n\n/**\n * formerly known as PROPERTY_KEY_OPTIONS\n *\n * @memberOf Monster\n * @type {string}\n * @since 1.15.0\n */\nconst PROPERTY_KEY_INTERNALDATA = 'monsterInternalData';\n\n\nexport {\n Monster,\n PROPERTY_KEY_INTERNALDATA\n}","'use strict';\n\n/**\n * Main namespace for Monster.\n *\n * @namespace Monster\n * @author schukai GmbH\n */\n\n\n/**\n * namespace class objects form the basic framework of the namespace administration.\n *\n * all functions, classes and objects of the library hang within the namespace tree.\n *\n * via `obj instanceof Monster.Namespace` it is also easy to check whether it is an object or a namespace.\n *\n * @memberOf Monster\n * @copyright schukai GmbH\n * @since 1.0.0\n */\nclass Namespace {\n\n /**\n *\n * @param namespace\n * @param obj\n */\n constructor(namespace) {\n if (namespace === undefined || typeof namespace !== 'string') {\n throw new Error(\"namespace is not a string\")\n }\n this.namespace = namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n getNamespace() {\n return this.namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.getNamespace();\n }\n}\n\n/**\n * @type {Namespace}\n * @global\n */\nexport const Monster = new Namespace(\"Monster\");\n\n/**\n * To expand monster, the `Monster.assignToNamespace()` method can be used.\n *\n * you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.\n *\n * To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/namespace.js';\n * function hello() {\n * console.log('Hello World!');\n * }\n * Monster.assignToNamespace(\"Monster.X\", hello)\n * Monster.X.hello(); // ↦ Hello World!\n * </script>\n *\n * ```\n *\n * @param {string} ns\n * @param {function} obj\n * @return {current}\n * @memberOf Monster\n * @throws {Error} no functions have been passed.\n * @throws {Error} the name of the class or function cannot be resolved.\n * @throws {Error} the first argument is not a function or class.\n * @throws {Error} exception\n * @since 1.0.0\n */\nfunction assignToNamespace(ns, ...obj) {\n let current = namespaceFor(ns.split(\".\"));\n\n if (obj.length === 0) {\n throw new Error('no functions have been passed.');\n }\n\n for (let i = 0, l = obj.length; i < l; i++) {\n current[objectName(obj[i])] = obj[i];\n }\n\n return current\n}\n\n/**\n *\n * @param {class|function} fn\n * @returns {string}\n * @private\n * @throws {Error} the name of the class or function cannot be resolved.\n * @throws {Error} the first argument is not a function or class.\n * @throws {Error} exception\n */\nfunction objectName(fn) {\n try {\n\n if (typeof fn !== 'function') {\n throw new Error(\"the first argument is not a function or class.\");\n }\n\n if (fn.hasOwnProperty('name')) {\n return fn.name;\n }\n\n if (\"function\" === typeof fn.toString) {\n let s = fn.toString();\n let f = s.match(/^\\s*function\\s+([^\\s(]+)/);\n if (Array.isArray(f) && typeof f[1] === 'string') {\n return f[1];\n }\n let c = s.match(/^\\s*class\\s+([^\\s(]+)/);\n if (Array.isArray(c) && typeof c[1] === 'string') {\n return c[1];\n }\n }\n\n } catch (e) {\n throw new Error(\"exception \" + e);\n }\n\n throw new Error(\"the name of the class or function cannot be resolved.\");\n}\n\n/**\n *\n * @param parts\n * @returns {Namespace}\n * @private\n */\nfunction namespaceFor(parts) {\n let space = Monster, ns = 'Monster';\n\n for (let i = 0; i < parts.length; i++) {\n\n if (\"Monster\" === parts[i]) {\n continue;\n }\n\n ns += '.' + parts[i];\n\n if (!space.hasOwnProperty(parts[i])) {\n space[parts[i]] = new Namespace(ns);\n }\n\n space = space[parts[i]];\n }\n\n return space;\n}\n\n\nassignToNamespace('Monster', assignToNamespace, Namespace);\nexport {assignToNamespace}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\n\n\n/**\n * The abstract constraint defines the api for all constraints. mainly the method isValid() is defined.\n *\n * derived classes must implement the method isValid().\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass AbstractConstraint extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n }\n\n /**\n * this method must return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.reject(value);\n }\n}\n\nassignToNamespace('Monster.Constraints', AbstractConstraint);\nexport {Monster, AbstractConstraint}","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\n\n/**\n * This is the base class from which all monster classes are derived.\n *\n * You can call the method via the monster namespace `new Monster.Types.Base()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/base.js';\n * console.log(new Monster.Types.Base())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/base.js';\n * console.log(new Base())\n * </script>\n * ```\n *\n * The class was formerly called Object.\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Base extends Object {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this);\n };\n\n\n}\n\nassignToNamespace('Monster.Types', Base);\nexport {Monster, Base}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * Operators allow you to link constraints together. for example, you can check whether a value is an object or an array. each operator has two operands that are linked together.\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass AbstractOperator extends AbstractConstraint {\n\n /**\n *\n * @param {AbstractConstraint} operantA\n * @param {AbstractConstraint} operantB\n * @throws {TypeError} \"parameters must be from type AbstractConstraint\"\n */\n constructor(operantA, operantB) {\n super();\n\n if (!(operantA instanceof AbstractConstraint) || !(operantB instanceof AbstractConstraint)) {\n throw new TypeError(\"parameters must be from type AbstractConstraint\")\n }\n\n this.operantA = operantA;\n this.operantB = operantB;\n\n }\n\n\n}\n\nassignToNamespace('Monster.Constraints', AbstractOperator);\nexport {Monster, AbstractOperator}","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {AbstractOperator} from \"./abstractoperator.js\";\n\n/**\n * The AndOperator is used to link several contraints. The constraint is fulfilled if all constraints of the operators are fulfilled.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/andoperator.js';\n * new Monster.Constraint.AndOperator();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/andoperator.js';\n * new AndOperator();\n * </script>\n * ```\n *\n * @example\n *\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/valid.js';\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/invalid.js';\n * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/andoperator.js';\n *\n * new AndOperator(\n * new Valid(), new Valid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ true\n *\n * new AndOperator(\n * new Invalid(), new Valid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ false\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass AndOperator extends AbstractOperator {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.all([this.operantA.isValid(value), this.operantB.isValid(value)]);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', AndOperator);\nexport {Monster, AndOperator}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * The invalid constraint allows an always invalid query to be performed. this constraint is mainly intended for testing.\n *\n * You can call the method via the monster namespace `new Monster.Constraint.Invalid()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/invalid.js';\n * new Monster.Constraint.Invalid();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/invalid.js';\n * new Invalid();\n * </script>\n * ```\n *\n * @example\n *\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/invalid.js';\n *\n * new Invalid().isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ false\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass Invalid extends AbstractConstraint {\n\n /**\n * this method return a rejected promise\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.reject(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', Invalid);\nexport {Monster, Invalid}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {isArray} from \"../types/is.js\";\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * You can call the method via the monster namespace `new Monster.Constraint.IsObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/isarray.js';\n * console.log(new Monster.Constraint.IsArray())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/isarray.js';\n * console.log(new IsArray())\n * </script>\n * ```\n *\n * @example\n *\n * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/isarray.js';\n *\n * new IsArray()\n * .isValid([])\n * .then(()=>console.log(true));\n * // ↦ true\n *\n * new IsArray()\n * .isValid(99)\n * .catch(e=>console.log(e));\n * // ↦ 99\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass IsArray extends AbstractConstraint {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n if (isArray(value)) {\n return Promise.resolve(value);\n }\n\n return Promise.reject(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', IsArray);\nexport {Monster, IsArray}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\n\n/**\n * With this function you can check if a value is iterable\n *\n * You can call the method via the monster namespace `Monster.Types.isPrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isIterable(null)) // ↦ false\n * console.log(Monster.Types.isIterable('hello')) // ↦ true\n * console.log(Monster.Types.isIterable([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isIterable(null)) // ↦ false\n * console.log(isIterable('hello')) // ↦ true\n * console.log(isIterable([])) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.2.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isIterable(value) {\n if (value === undefined) return false;\n if (value === null) return false;\n return typeof value?.[Symbol.iterator] === 'function';\n}\n\n\n/**\n * Checks whether the value passed is a primitive (string, number, boolean, NaN, undefined, null or symbol)\n *\n * You can call the method via the monster namespace `Monster.Types.isPrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isPrimitive('2')) // ↦ false\n * console.log(Monster.Types.isPrimitive([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isPrimitive('2')) // ↦ true\n * console.log(isPrimitive([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isPrimitive(value) {\n var type;\n\n if (value === undefined || value === null || value === NaN) {\n return true;\n }\n\n type = typeof value;\n\n if (type === 'string' || type === 'number' || type === 'boolean' || type === 'symbol') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks whether the value passed is a symbol\n *\n * You can call the method via the monster namespace `Monster.Types.isSymbol()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isSymbol('2')) // ↦ false\n * console.log(Monster.Types.isSymbol(Symbol('test')) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isSymbol(Symbol('a'))) // ↦ true\n * console.log(isSymbol([]) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isSymbol(value) {\n return ('symbol' === typeof value) ? true : false;\n}\n\n/**\n * Checks whether the value passed is a boolean\n *\n * You can call the method via the monster namespace `Monster.Types.isBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isBoolean('2')) // ↦ false\n * console.log(Monster.Types.isBoolean([])) // ↦ false\n * console.log(Monster.Types.isBoolean(true)) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isBoolean('2')) // ↦ false\n * console.log(isBoolean([])) // ↦ false\n * console.log(isBoolean(2>4)) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isBoolean(value) {\n\n if (value === true || value === false) {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a string\n *\n * you can call the method via the monster namespace `Monster.Types.isString()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isString('2')) // ↦ true\n * console.log(Monster.Types.isString([])) // ↦ false\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isString('2')) // ↦ true\n * console.log(isString([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isString(value) {\n if (value === undefined || typeof value !== 'string') {\n return false;\n }\n return true;\n}\n\n/**\n * checks whether the value passed is a object\n *\n * you can call the method via the monster namespace `Monster.Types.isObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isObject('2')) // ↦ false\n * console.log(Monster.Types.isObject([])) // ↦ false\n * console.log(Monster.Types.isObject({})) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isObject('2')) // ↦ false\n * console.log(isObject([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isObject(value) {\n\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'object') {\n return true;\n }\n\n return false;\n}\n\n/**\n * checks whether the value passed is a object and instance of instance\n *\n * you can call the method via the monster namespace `Monster.Types.isInstance()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isInstance('2')) // ↦ false\n * console.log(Monster.Types.isInstance([])) // ↦ false\n * console.log(Monster.Types.isInstance({})) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isInstance('2')) // ↦ false\n * console.log(isInstance([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @param {*} instance\n * @returns {boolean}\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isInstance(value, instance) {\n\n if (!isObject(value)) return false;\n if (!isFunction(instance)) return false;\n if (!instance.hasOwnProperty('prototype')) return false;\n return (value instanceof instance) ? true : false;\n\n}\n\n/**\n * checks whether the value passed is a array\n *\n * you can call the method via the monster namespace `Monster.Types.isArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isArray('2')) // ↦ false\n * console.log(Monster.Types.isArray([])) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isArray('2')) // ↦ false\n * console.log(isArray([])) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isArray(value) {\n if (Array.isArray(value)) {\n return true;\n }\n return false;\n}\n\n/**\n * checks whether the value passed is a function\n *\n * you can call the method via the monster namespace `Monster.Types.isFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isFunction(()=>{})) // ↦ true\n * console.log(Monster.Types.isFunction('2')) // ↦ false\n * console.log(Monster.Types.isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isFunction(()=>{})) // ↦ true\n * console.log(isFunction('2')) // ↦ false\n * console.log(isFunction([])) // ↦ false\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isFunction(value) {\n if (isArray(value)) return false;\n if (isPrimitive(value)) return false;\n\n if (typeof value === 'function') {\n return true;\n }\n\n return false;\n\n}\n\n/**\n * checks whether the value passed is an integer\n *\n * you can call the method via the monster namespace `Monster.Types.isFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(Monster.Types.isInteger(()=>{})) // ↦ true\n * console.log(Monster.Types.isInteger('2')) // ↦ false\n * console.log(Monster.Types.isInteger(2)) // ↦ true\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n * console.log(isInteger(()=>{})) // ↦ true\n * console.log(isInteger('2')) // ↦ false\n * console.log(isInteger(2)) // ↦ true\n * </script>\n * ```\n *\n * @param {*} value\n * @returns {boolean}\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nfunction isInteger(value) {\n return Number.isInteger(value);\n}\n\n\nassignToNamespace('Monster.Types', isPrimitive, isBoolean, isString, isObject, isArray, isFunction, isIterable, isInteger, isSymbol);\nexport {\n Monster,\n isPrimitive,\n isBoolean,\n isString,\n isObject,\n isInstance,\n isArray,\n isFunction,\n isIterable,\n isInteger,\n isSymbol\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {isObject} from \"../types/is.js\";\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * You can call the method via the monster namespace `new Monster.Constraint.IsObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/isobject.js';\n * console.log(new Monster.Constraint.IsObject())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/isobject.js';\n * console.log(new IsObject())\n * </script>\n * ```\n *\n * @example\n *\n * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/isobject.js';\n *\n * new IsObject()\n * .isValid({})\n * .then(()=>console.log(true));\n * // ↦ true\n *\n *\n * new IsObject()\n * .isValid(99)\n * .catch(e=>console.log(e));\n * // ↦ 99\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass IsObject extends AbstractConstraint {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n if (isObject(value)) {\n return Promise.resolve(value);\n }\n\n return Promise.reject(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', IsObject);\nexport {Monster, IsObject}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {AbstractOperator} from \"./abstractoperator.js\";\n\n/**\n * The OrOperator is used to link several constraints. The constraint is fulfilled if one of the constraints is fulfilled.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraint/oroperator.js';\n * new Monster.Constraint.OrOperator();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraint/oroperator.js';\n * new OrOperator();\n * </script>\n * ```\n *\n * @example\n *\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/valid.js';\n * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/invalid.js';\n * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/oroperator.js';\n *\n * new OrOperator(\n * new Valid(), new Invalid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ true\n *\n * new OrOperator(\n * new Invalid(), new Invalid()).isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ false\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass OrOperator extends AbstractOperator {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n var self = this;\n\n return new Promise(function (resolve, reject) {\n let a, b;\n\n self.operantA.isValid(value)\n .then(function () {\n resolve();\n }).catch(function () {\n a = false;\n /** b has already been evaluated and was not true */\n if (b === false) {\n reject();\n }\n });\n\n self.operantB.isValid(value)\n .then(function () {\n resolve();\n }).catch(function () {\n b = false;\n /** b has already been evaluated and was not true */\n if (a === false) {\n reject();\n }\n });\n });\n }\n\n\n}\n\nassignToNamespace('Monster.Constraints', OrOperator);\nexport {Monster, OrOperator}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {AbstractConstraint} from \"./abstract.js\";\n\n/**\n * The valid constraint allows an always valid query to be performed. this constraint is mainly intended for testing.\n *\n * You can call the method via the monster namespace `new Monster.Constraint.Valid()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/valid.js';\n * new Monster.Constraint.Valid();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/valid.js';\n * new Valid();\n * </script>\n * ```\n *\n * @example\n *\n * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/constraints/valid.js';\n *\n * new Valid().isValid()\n * .then(()=>console.log(true))\n * .catch(()=>console.log(false));\n * // ↦ true\n *\n * @since 1.3.0\n * @copyright schukai GmbH\n * @memberOf Monster/Constraints\n */\nclass Valid extends AbstractConstraint {\n\n /**\n * this method return a promise containing the result of the check.\n *\n * @param {*} value\n * @returns {Promise}\n */\n isValid(value) {\n return Promise.resolve(value);\n }\n\n}\n\nassignToNamespace('Monster.Constraints', Valid);\nexport {Monster, Valid}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {isFunction} from \"../types/is.js\";\nimport {validateString} from \"../types/validate.js\";\nimport {Pathfinder} from \"./pathfinder.js\";\n\n/**\n * With the help of the function `buildMap()`, maps can be easily created from data objects.\n *\n * Either a simple definition `a.b.c` or a template `${a.b.c}` can be specified as the path.\n * Key and value can be either a definition or a template. The key does not have to be defined.\n *\n * You can call the method via the monster namespace `Monster.Data.buildMap()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/buildmap.js';\n * console.log(Monster.Data.buildMap())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/buildmap.js';\n * console.log(buildMap())\n * </script>\n * ```\n *\n * @example\n *\n * // a typical data structure as reported by an api\n *\n * let map;\n * let obj = {\n * \"data\": [\n * {\n * \"id\": 10,\n * \"name\": \"Cassandra\",\n * \"address\": {\n * \"street\": \"493-4105 Vulputate Street\",\n * \"city\": \"Saumur\",\n * \"zip\": \"52628\"\n * }\n * },\n * {\n * \"id\": 20,\n * \"name\": \"Holly\",\n * \"address\": {\n * \"street\": \"1762 Eget Rd.\",\n * \"city\": \"Schwalbach\",\n * \"zip\": \"952340\"\n * }\n * },\n * {\n * \"id\": 30,\n * \"name\": \"Guy\",\n * \"address\": {\n * \"street\": \"957-388 Sollicitudin Avenue\",\n * \"city\": \"Panchià\",\n * \"zip\": \"420729\"\n * }\n * }\n * ]\n * };\n *\n * // The function is passed this data structure and with the help of the selector `'data.*'` the data to be considered are selected.\n * // The key is given by a simple definition `'id'` and the value is given by a template `'${name} (${address.zip} ${address.city})'`.\n * map = buildMap(obj, 'data.*', '${name} (${address.zip} ${address.city})', 'id');\n * console.log(map);\n *\n * // ↦ Map(3) {\n * // '10' => 'Cassandra (52628 Saumur)',\n * // '20' => 'Holly (952340 Schwalbach)',\n * // '30' => 'Guy (420729 Panchià)'\n * // }\n *\n * // If no key is specified, the key from the selection, here the array index, is taken.\n * map = buildMap(obj, 'data.*', '${name} (${address.zip} ${address.city})');\n * console.log(map);\n *\n * // ↦ Map(3) {\n * // '0' => 'Cassandra (52628 Saumur)',\n * // '1' => 'Holly (952340 Schwalbach)',\n * // '2' => 'Guy (420729 Panchià)'\n * // }\n *\n * // a filter (function(value, key) {}) can be specified to accept only defined entries.\n * map = buildMap(obj, 'data.*', '${name} (${address.zip} ${address.city})', 'id', function (value, key) {\n * return (value['id'] >= 20) ? true : false\n * });\n * console.log(map);\n *\n * // ↦ Map(2) {\n * // 20 => 'Holly (952340 Schwalbach)',\n * // 30 => 'Guy (420729 Panchià)'\n * // }\n *\n * @param {*} subject\n * @param {string} selector\n * @param {string|undefined} valueTemplate\n * @param {string|undefined} keyTemplate\n * @param {function|undefined} filter\n * @return {*}\n */\nfunction buildMap(subject, selector, valueTemplate, keyTemplate, filter) {\n\n validateString(selector);\n const result = new Map\n\n let finder = new Pathfinder(subject);\n\n let map = finder.getVia(selector);\n if (!(map instanceof Map)) {\n return result;\n }\n\n map.forEach((v, k, m) => {\n if (isFunction(filter)) {\n if (filter.call(m, v, k) !== true) return;\n }\n\n k = build(v, keyTemplate, k);\n v = build(v, valueTemplate);\n\n result.set(k, v);\n });\n\n return result;\n}\n\n/**\n * @private\n * @param {*} subject\n * @param {string|undefined} definition\n * @param {*} defaultValue\n * @return {*}\n */\nfunction build(subject, definition, defaultValue) {\n if (definition === undefined) return defaultValue ? defaultValue : subject;\n validateString(definition);\n\n const regexp = /(?<placeholder>\\${(?<path>[a-z.-_0-9]*)})/gm\n const array = [...definition.matchAll(regexp)];\n\n let finder = new Pathfinder(subject);\n\n if (array.length === 0) {\n return finder.getVia(definition);\n }\n\n array.forEach((a) => {\n let groups = a?.['groups'];\n let placeholder = groups?.['placeholder']\n if (placeholder === undefined) return;\n\n let path = groups?.['path']\n\n let v = finder.getVia(path);\n\n definition = definition.replaceAll(placeholder, v);\n\n\n })\n\n return definition;\n\n}\n\n\nassignToNamespace('Monster.Data', buildMap);\nexport {Monster, buildMap}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {\n isArray,\n isBoolean,\n isFunction,\n isInstance,\n isInteger,\n isIterable,\n isObject,\n isPrimitive,\n isString,\n isSymbol\n} from './is.js';\n\n/**\n * This method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validatePrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateIterable('2')) // ↦ TypeError\n * console.log(Monster.Types.validateIterable([])) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateIterable('2')) // ↦ TypeError\n * console.log(validateIterable([])) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.2.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n * @see {@link isPrimitive}\n * @see {@link Monster/Types/isPrimitive}\n * @see {@link Monster/Types#isPrimitive}\n */\nfunction validateIterable(value) {\n if (!isIterable(value)) {\n throw new TypeError('value is not iterable')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the primitive type. this function is identical to isPrimitive() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validatePrimitive()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validatePrimitive('2')) // ↦ value\n * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validatePrimitive('2')) // ↦ value\n * console.log(validatePrimitive([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n * @see {@link isPrimitive}\n * @see {@link Monster/Types/isPrimitive}\n * @see {@link Monster/Types#isPrimitive}\n */\nfunction validatePrimitive(value) {\n if (!isPrimitive(value)) {\n throw new TypeError('value is not a primitive')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the boolean type. this function is identical to isBoolean() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateBoolean()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateBoolean(true)) // ↦ value\n * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError\n * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateBoolean(false)) // ↦ value\n * console.log(validateBoolean('2')) // ↦ TypeError\n * console.log(validateBoolean([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n\n * @throws {TypeError} value is not primitive\n */\nfunction validateBoolean(value) {\n if (!isBoolean(value)) {\n throw new TypeError('value is not a boolean')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the string type. this function is identical to isString() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateString()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateString('2')) // ↦ value\n * console.log(Monster.Types.validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateString('2')) // ↦ value\n * console.log(validateString([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a string\n */\nfunction validateString(value) {\n if (!isString(value)) {\n throw new TypeError('value is not a string')\n }\n return value\n}\n\n\n/**\n * This method checks if the type matches the object type. this function is identical to isObject() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateObject({})) // ↦ value\n * console.log(Monster.Types.validateObject('2')) // ↦ TypeError\n * console.log(Monster.Types.validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateObject({})) // ↦ value\n * console.log(validateObject('2')) // ↦ TypeError\n * console.log(validateObject([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a object\n */\nfunction validateObject(value) {\n if (!isObject(value)) {\n throw new TypeError('value is not a object')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the object instance.\n *\n * You can call the method via the monster namespace `Monster.Types.validateInstance()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateInstance({}, Object)) // ↦ value\n * console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError\n * console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateInstance({}, Object)) // ↦ value\n * console.log(validateInstance('2', Object)) // ↦ TypeError\n * console.log(validateInstance([], Object)) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an instance of\n */\nfunction validateInstance(value, instance) {\n if (!isInstance(value, instance)) {\n let n = \"\";\n if (isObject(instance) || isFunction(instance)) {\n n = instance?.['name']\n }\n\n if (n) {\n n = \" \" + n;\n }\n\n throw new TypeError('value is not an instance of' + n)\n }\n return value\n}\n\n/**\n * This method checks if the type matches the array type. this function is identical to isArray() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateArray()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateArray('2')) // ↦ TypeError\n * console.log(Monster.Types.validateArray([])) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateArray('2')) // ↦ TypeError\n * console.log(validateArray([])) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an array\n */\nfunction validateArray(value) {\n if (!isArray(value)) {\n throw new TypeError('value is not an array')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the symbol type. this function is identical to isSymbol() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateSymbol()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError\n * console.log(Monster.Types.validateSymbol([])) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateSymbol('2')) // ↦ TypeError\n * console.log(validateSymbol()) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an symbol\n */\nfunction validateSymbol(value) {\n if (!isSymbol(value)) {\n throw new TypeError('value is not an symbol')\n }\n return value\n}\n\n/**\n * This method checks if the type matches the function type. this function is identical to isFunction() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateFunction(()=>{})) // ↦ value\n * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError\n * console.log(Monster.Types.validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateFunction(()=>{})) // ↦ value\n * console.log(validateFunction('2')) // ↦ TypeError\n * console.log(validateFunction([])) // ↦ TypeError\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a function\n */\nfunction validateFunction(value) {\n if (!isFunction(value)) {\n throw new TypeError('value is not a function')\n }\n return value\n}\n\n/**\n * This method checks if the type is an integer. this function is identical to isInteger() except that a TypeError is thrown.\n *\n * You can call the method via the monster namespace `Monster.Types.validateInteger()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(Monster.Types.validateInteger(true)) // ↦ TypeError\n * console.log(Monster.Types.validateInteger('2')) // ↦ TypeError\n * console.log(Monster.Types.validateInteger(2)) // ↦ value\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/validate.js';\n * console.log(validateInteger(true)) // ↦ TypeError\n * console.log(validateInteger('2')) // ↦ TypeError\n * console.log(validateInteger(2)) // ↦ value\n * </script>\n * ```\n *\n * @param {*} value\n * @return {*}\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not an integer\n */\nfunction validateInteger(value) {\n if (!isInteger(value)) {\n throw new TypeError('value is not an integer')\n }\n return value\n}\n\nassignToNamespace('Monster.Types', validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction, validateIterable, validateInteger);\nexport {\n Monster,\n validatePrimitive,\n validateBoolean,\n validateString,\n validateObject,\n validateInstance,\n validateArray,\n validateFunction,\n validateIterable,\n validateInteger,\n validateSymbol\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {isArray, isInteger, isObject} from '../types/is.js';\nimport {Stack} from \"../types/stack.js\";\nimport {validateInteger, validateString} from '../types/validate.js';\n\n/**\n * path separator\n *\n * @private\n * @type {string}\n */\nconst DELIMITER = '.';\n/**\n * @private\n * @type {string}\n */\nconst WILDCARD = '*';\n\n/**\n * You can call the method via the monster namespace `new Monster.Data.Pathfinder()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pathfinder.js';\n * console.log(new Monster.Data.Pathfinder())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pathfinder.js';\n * console.log(new Pathfinder())\n * </script>\n * ```\n *\n * With the help of the pathfinder, values can be read and written from an object construct.\n *\n * ```\n * new Pathfinder({\n * a: {\n * b: {\n * f: [\n * {\n * g: false,\n * }\n * ],\n * }\n * }\n * }).getVia(\"a.b.f.0.g\"); // ↦ false\n * ```\n *\n * if a value is not present or has the wrong type, a corresponding exception is thrown.\n *\n * ```\n * new Pathfinder({}).getVia(\"a.b.f.0.g\"); // ↦ Error\n * ```\n *\n * The `Pathfinder.exists()` method can be used to check whether access to the path is possible.\n *\n * ```\n * new Pathfinder({}).exists(\"a.b.f.0.g\"); // ↦ false\n * ```\n *\n * pathfinder can also be used to build object structures. to do this, the `Pathfinder.setVia()` method must be used.\n *\n * ```\n * obj = {};\n * new Pathfinder(obj).setVia('a.b.0.c', true); // ↦ {a:{b:[{c:true}]}}\n * ```\n *\n * @example\n *\n * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pathfinder.js';\n *\n * let value = new Pathfinder({\n * a: {\n * b: {\n * f: [\n * {\n * g: false,\n * }\n * ],\n * }\n * }\n * }).getVia(\"a.b.f.0.g\");\n *\n * console.log(value);\n * // ↦ false\n *\n * try {\n * new Pathfinder({}).getVia(\"a.b.f.0.g\"); \n * } catch(e) {\n * console.log(e.toString());\n * // ↦ Error: the journey is not at its end (b.f.0.g)\n * }\n *\n * @example\n *\n * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pathfinder.js';\n *\n * let p = new Pathfinder({\n * a: {\n * x: [\n * {c: 1}, {c: 2}\n * ],\n * y: true\n * },\n * b: {\n * x: [\n * {c: 1, d: false}, {c: 2}\n * ],\n * y: true\n * },\n * });\n *\n * let r = p.getVia(\"*.x.*.c\");\n * console.log(r);\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Pathfinder extends Base {\n\n /**\n * @param {array|object|Map|Set} value\n * @since 1.4.0\n **/\n constructor(object) {\n super();\n this.object = object;\n this.wildCard = WILDCARD;\n }\n\n /**\n * set wildcard\n *\n * @param {string} wildcard\n * @return {Pathfinder}\n * @since 1.7.0\n */\n setWildCard(wildcard) {\n validateString(wildcard);\n this.wildCard = wildcard;\n return this;\n }\n\n /**\n *\n * @param {string} path\n * @since 1.4.0\n * @returns {*}\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @throws {Error} unsupported action for this data type\n */\n getVia(path) {\n return getValueViaPath.call(this, this.object, validateString(path));\n }\n\n /**\n *\n * @param {string} path\n * @param {*} value\n * @returns {Pathfinder}\n * @since 1.4.0\n * @throws {TypeError} unsupported type\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @throws {Error} unsupported action for this data type\n */\n setVia(path, value) {\n validateString(path);\n setValueViaPath.call(this, this.object, path, value);\n return this;\n }\n\n /**\n * Delete Via Path\n *\n * @param {string} path\n * @returns {Pathfinder}\n * @since 1.6.0\n * @throws {TypeError} unsupported type\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @throws {Error} unsupported action for this data type\n */\n deleteVia(path) {\n validateString(path);\n deleteValueViaPath.call(this, this.object, path);\n return this;\n }\n\n /**\n *\n * @param {string} path\n * @return {bool}\n * @throws {TypeError} unsupported type\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an integer\n * @since 1.4.0\n */\n exists(path) {\n validateString(path);\n try {\n getValueViaPath.call(this, this.object, path, true);\n return true;\n } catch (e) {\n\n }\n\n return false;\n }\n\n}\n\nassignToNamespace('Monster.Data', Pathfinder);\nexport {Monster, Pathfinder}\n\n/**\n *\n * @param {*} subject\n * @param {string} path\n * @param {string} check\n * @return {Map}\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @private\n */\nfunction iterate(subject, path, check) {\n\n const result = new Map;\n\n if (isObject(subject) || isArray(subject)) {\n for (const [key, value] of Object.entries(subject)) {\n result.set(key, getValueViaPath.call(this, value, path, check))\n }\n } else {\n let key = path.split(DELIMITER).shift();\n result.set(key, getValueViaPath.call(this, subject, path, check));\n }\n\n return result;\n\n\n}\n\n/**\n *\n * @param {*} subject\n * @param [string} path\n * @param [boolean} check \n * @returns {*}\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @private\n */\nfunction getValueViaPath(subject, path, check) {\n\n if (path === \"\") {\n return subject;\n }\n\n let parts = path.split(DELIMITER)\n let current = parts.shift();\n\n if (current === this.wildCard) {\n return iterate.call(this, subject, parts.join(DELIMITER), check);\n }\n\n if (isObject(subject) || isArray(subject)) {\n\n let anchor;\n if (subject instanceof Map || subject instanceof WeakMap) {\n anchor = subject.get(current);\n\n } else if (subject instanceof Set || subject instanceof WeakSet) {\n current = parseInt(current);\n validateInteger(current)\n anchor = [...subject]?.[current];\n\n } else if (typeof WeakRef === 'function' && subject instanceof WeakRef) {\n throw Error('unsupported action for this data type');\n\n } else if (isArray(subject)) {\n current = parseInt(current);\n validateInteger(current)\n anchor = subject?.[current];\n } else {\n anchor = subject?.[current];\n }\n\n if (isObject(anchor) || isArray(anchor)) {\n return getValueViaPath.call(this, anchor, parts.join(DELIMITER), check)\n }\n\n if (parts.length > 0) {\n throw Error(\"the journey is not at its end (\" + parts.join(DELIMITER) + \")\");\n }\n\n if (check === true && !subject.hasOwnProperty(current)) {\n throw Error('unknown value');\n }\n\n return anchor;\n\n }\n\n throw TypeError(\"unsupported type \" + typeof subject)\n\n}\n\n/**\n *\n * @param object\n * @param path\n * @param value\n * @returns {void}\n * @throws {TypeError} unsupported type\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @private\n */\nfunction setValueViaPath(object, path, value) {\n\n validateString(path);\n\n let parts = path.split(DELIMITER)\n let last = parts.pop();\n let subpath = parts.join(DELIMITER);\n\n let stack = new Stack()\n let current = subpath;\n while (true) {\n\n try {\n getValueViaPath.call(this, object, current, true)\n break;\n } catch (e) {\n\n }\n\n stack.push(current);\n parts.pop();\n current = parts.join(DELIMITER);\n\n if (current === \"\") break;\n }\n\n while (!stack.isEmpty()) {\n current = stack.pop();\n let obj = {};\n\n if (!stack.isEmpty()) {\n let n = stack.peek().split(DELIMITER).pop();\n if (isInteger(parseInt(n))) {\n obj = [];\n }\n\n }\n\n setValueViaPath.call(this, object, current, obj);\n }\n\n let anchor = getValueViaPath.call(this, object, subpath);\n\n if (!isObject(object) && !isArray(object)) {\n throw TypeError(\"unsupported type: \" + typeof object);\n }\n\n if (anchor instanceof Map || anchor instanceof WeakMap) {\n anchor.set(last, value);\n } else if (anchor instanceof Set || anchor instanceof WeakSet) {\n anchor.append(value)\n\n } else if (typeof WeakRef === 'function' && anchor instanceof WeakRef) {\n throw Error('unsupported action for this data type');\n\n } else if (isArray(anchor)) {\n last = parseInt(last);\n validateInteger(last)\n assignProperty(anchor, last, value);\n } else {\n assignProperty(anchor, last, value);\n }\n\n \n\n}\n\n/**\n * @private\n * @param {object} object\n * @param {string} key\n * @param {*} value\n */\nfunction assignProperty(object, key, value) {\n\n if (!object.hasOwnProperty(key)) {\n object[key] = value;\n return;\n }\n\n if (value === undefined) {\n delete object[key];\n }\n\n object[key] = value;\n \n}\n\n/**\n *\n * @param object\n * @param path\n * @returns {void}\n * @throws {TypeError} unsupported type\n * @throws {TypeError} unsupported type\n * @throws {Error} the journey is not at its end\n * @throws {Error} unsupported action for this data type\n * @since 1.6.0\n * @private\n */\nfunction deleteValueViaPath(object, path) {\n\n const parts = path.split(DELIMITER)\n let last = parts.pop();\n const subpath = parts.join(DELIMITER);\n\n const anchor = getValueViaPath.call(this, object, subpath);\n\n if (anchor instanceof Map) {\n anchor.delete(last);\n } else if (anchor instanceof Set || anchor instanceof WeakMap || anchor instanceof WeakSet || (typeof WeakRef === 'function' && anchor instanceof WeakRef)) {\n throw Error('unsupported action for this data type');\n\n } else if (isArray(anchor)) {\n last = parseInt(last);\n validateInteger(last)\n delete anchor[last];\n } else {\n delete anchor[last];\n }\n\n \n\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.Queue()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/stack.js';\n * console.log(new Monster.Types.Stack())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/stack.js';\n * console.log(new Stack())\n * </script>\n * ```\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Stack extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.data = [];\n }\n\n\n /**\n * @return {boolean}\n */\n isEmpty() {\n return this.data.length === 0;\n }\n\n /**\n * looks at the object at the top of this stack without removing it from the stack.\n *\n * @return {*}\n */\n peek() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n return this.data?.[this.data.length - 1];\n }\n\n /**\n * pushes an item onto the top of this stack.\n *\n * @param {*} value\n * @returns {Queue}\n */\n push(value) {\n this.data.push(value)\n return this;\n }\n\n /**\n * remove all entries\n *\n * @returns {Queue}\n */\n clear() {\n this.data = [];\n return this;\n }\n\n /**\n * removes the object at the top of this stack and returns\n * that object as the value of this function. is the stack empty\n * the return value is undefined.\n *\n * @return {*}\n */\n pop() {\n if (this.isEmpty()) {\n return undefined;\n }\n return this.data.pop();\n }\n\n\n}\n\nassignToNamespace('Monster.Types', Stack);\nexport {Monster, Stack}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {isArray, isObject} from \"../types/is.js\";\n\n/**\n * With the diff function you can perform the change of one object to another. The result shows the changes of the second object to the first object.\n *\n * The operator `add` means that something has been added to the second object. `delete` means that something has been deleted from the second object compared to the first object.\n *\n * You can call the method via the monster namespace `Monster.Data.Diff()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/diff.js';\n * console.log(Monster.Data.Diff(a, b))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/diff.js';\n * console.log(Diff(a, b))\n * </script>\n * ```\n *\n * @example\n *\n * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/diff.js';\n *\n * // given are two objects x and y.\n *\n * let x = {\n * a: 1,\n * b: \"Hello!\"\n * }\n *\n * let y = {\n * a: 2,\n * c: true\n * }\n *\n * // These two objects can be compared with each other.\n *\n * console.log(Diff(x, y));\n *\n * // the result is then the following\n *\n * //\n * // [\n * // {\n * // operator: 'update',\n * // path: [ 'a' ],\n * // first: { value: 1, type: 'number' },\n * // second: { value: 2, type: 'number' }\n * // },\n * // {\n * // operator: 'delete',\n * // path: [ 'b' ],\n * // first: { value: 'Hello!', type: 'string' }\n * // },\n * // {\n * // operator: 'add',\n * // path: [ 'c' ],\n * // second: { value: true, type: 'boolean' }\n * // }\n * // ]\n *\n * @param {*} first\n * @param {*} second\n * @return {array}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nfunction Diff(first, second) {\n return doDiff(first, second)\n}\n\n/**\n * @private\n * @param a\n * @param b\n * @param type\n * @return {Set<string>|Set<number>}\n */\nfunction getKeys(a, b, type) {\n if (isArray(type)) {\n const keys = a.length > b.length ? new Array(a.length) : new Array(b.length);\n keys.fill(0);\n return new Set(keys.map((_, i) => i));\n }\n\n return new Set(Object.keys(a).concat(Object.keys(b)));\n}\n\n/**\n * @private\n * @param a\n * @param b\n * @param path\n * @param diff\n * @return {array}\n */\nfunction doDiff(a, b, path, diff) {\n\n let typeA = typeof a\n let typeB = typeof b\n\n const currPath = path || [];\n const currDiff = diff || [];\n\n if (typeA === typeB && typeA === 'object') { // array is object too\n\n getKeys(a, b, typeA).forEach((v) => {\n\n if (!(Object.prototype.hasOwnProperty.call(a, v))) {\n currDiff.push(buildResult(a[v], b[v], 'add', currPath.concat(v)));\n } else if (!(Object.prototype.hasOwnProperty.call(b, v))) {\n currDiff.push(buildResult(a[v], b[v], 'delete', currPath.concat(v)));\n } else {\n doDiff(a[v], b[v], currPath.concat(v), currDiff);\n }\n });\n\n } else {\n\n const o = getOperator(a, b, typeA, typeB);\n if (o !== undefined) {\n currDiff.push(buildResult(a, b, o, path));\n }\n\n }\n\n return currDiff;\n\n}\n\n/**\n *\n * @param {*} a\n * @param {*} b\n * @param {string} operator\n * @param {array} path\n * @return {{path: array, operator: string}}\n * @private\n */\nfunction buildResult(a, b, operator, path) {\n\n const result = {\n operator,\n path,\n };\n\n if (operator !== 'add') {\n result.first = {\n value: a,\n type: typeof a\n };\n\n if (isObject(a)) {\n const name = Object.getPrototypeOf(a)?.constructor?.name;\n if (name !== undefined) {\n result.first.instance = name;\n }\n }\n }\n\n if (operator === 'add' || operator === 'update') {\n result.second = {\n value: b,\n type: typeof b\n };\n\n if (isObject(b)) {\n const name = Object.getPrototypeOf(b)?.constructor?.name;\n if (name !== undefined) {\n result.second.instance = name;\n }\n }\n\n }\n\n return result;\n}\n\n/**\n * @private\n * @param {*} a\n * @param {*} b\n * @return {boolean}\n */\nfunction isNotEqual(a, b) {\n\n if (typeof a !== typeof b) {\n return true;\n }\n\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() !== b.getTime();\n }\n\n return a !== b;\n}\n\n/**\n * @private\n * @param {*} a\n * @param {*} b\n * @return {string|undefined}\n */\nfunction getOperator(a, b) {\n\n /**\n * @type {string|undefined}\n */\n let operator;\n\n /**\n * @type {string}\n */\n let typeA = typeof a;\n\n /**\n * @type {string}\n */\n let typeB = typeof b;\n\n if (typeA === 'undefined' && typeB !== 'undefined') {\n operator = 'add';\n } else if (typeA !== 'undefined' && typeB === 'undefined') {\n operator = 'delete';\n } else if (isNotEqual(a, b)) {\n operator = 'update';\n }\n\n return operator;\n\n}\n\nassignToNamespace('Monster.Data', Diff);\nexport {Monster, Diff}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {isArray, isObject} from \"../types/is.js\";\nimport {typeOf} from \"../types/typeof.js\";\n\n/**\n * extend copies all enumerable own properties from one or\n * more source objects to a target object. It returns the modified target object.\n *\n * You can call the method via the monster namespace `Monster.Data.extend()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/extend.js';\n * console.log(Monster.Data.extend(a, b))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/extend.js';\n * console.log(extend(a, b))\n * </script>\n * ```\n *\n * @param {object} target\n * @param {object}\n * @return {object}\n * @since 1.10.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n * @throws {Error} unsuported argument\n * @throws {Error} type mismatch\n */\nfunction extend() {\n let o, i;\n\n for (i = 0; i < arguments.length; i++) {\n let a = arguments[i];\n\n if (!(isObject(a) || isArray(a))) {\n throw new Error('unsuported argument ' + JSON.stringify(a));\n }\n\n if (o === undefined) {\n o = a;\n continue;\n }\n\n for (let k in a) {\n\n let v = a?.[k];\n\n if (v === o?.[k]) {\n continue;\n }\n\n if ((isObject(v) || isArray(v))) {\n\n if (o[k] === undefined) {\n if (isArray(v)) {\n o[k] = [];\n } else {\n o[k] = {};\n }\n }\n\n if (typeOf(o[k]) !== typeOf(v)) {\n throw new Error(\"type mismatch: \" + JSON.stringify(o[k]) + \" != \" + JSON.stringify(v));\n }\n\n o[k] = extend(o[k], v);\n\n } else {\n o[k] = v;\n }\n\n }\n }\n\n return o;\n}\n\n\nassignToNamespace('Monster.Data', extend);\nexport {Monster, extend}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\n\nimport {assignToNamespace, Monster} from '../namespace.js';\n\n/**\n * The built-in typeof method is known to have some historical weaknesses. This function tries to provide a better and more accurate result.\n *\n * You can call the method via the monster namespace `Monster.Types.typeOf()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/typeof.js';\n * console.log(Monster.Types.typeOf())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/typeof.js';\n * console.log(typeOf())\n * </script>\n * ```\n *\n * @example\n *\n * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/typeof.js';\n *\n * console.log(typeOf(undefined)); // ↦ undefined\n * console.log(typeOf(\"\")); // ↦ string\n * console.log(typeOf(5)); // ↦ number\n * console.log(typeOf({})); // ↦ object\n * console.log(typeOf([])); // ↦ array\n * console.log(typeOf(new Map)); // ↦ map\n * console.log(typeOf(true)); // ↦ boolean\n *\n * @param {*} value\n * @return {string}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n * @throws {TypeError} value is not a primitive\n */\nfunction typeOf(value) {\n let type = ({}).toString.call(value).match(/\\s([a-zA-Z]+)/)[1];\n if ('Object' === type) {\n const results = (/^(class|function)\\s+(\\w+)/).exec(value.constructor.toString());\n type = (results && results.length > 2) ? results[2] : '';\n }\n return type.toLowerCase();\n}\n\nassignToNamespace('Monster.Types', typeOf);\nexport {\n Monster,\n typeOf\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {validateString} from '../types/validate.js';\nimport {Transformer} from './transformer.js';\n\n\nconst DELIMITER = '|';\n\n/**\n * The pipe class makes it possible to combine several processing steps.\n *\n * You can call the method via the monster namespace `new Monster.Data.Pipe()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pipe.js';\n * console.log(new Monster.Data.Pipe())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pipe.js';\n * console.log(new Pipe())\n * </script>\n * ```\n *\n * A pipe consists of commands whose input and output are connected with the pipe symbol `|`.\n *\n * With the Pipe, processing steps can be combined. Here, the value of an object is accessed via the pathfinder (path command).\n * the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.\n *\n * @example\n * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/pipe.js';\n *\n * let obj = {\n * a: {\n * b: {\n * c: {\n * d: \"world\"\n * }\n * }\n * }\n * }\n *\n * console.log(new Pipe('path:a.b.c.d | toupper | prefix:Hello\\\\ ').run(obj));\n * // ↦ Hello WORLD\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Pipe extends Base {\n\n /**\n *\n * @param {string} pipe a pipe consists of commands whose input and output are connected with the pipe symbol `|`.\n * @throws {TypeError}\n */\n constructor(pipe) {\n super();\n validateString(pipe);\n this.pipe = pipe.split(DELIMITER).map((v) => {\n return new Transformer(v);\n });\n\n\n }\n\n /**\n *\n * @param {string} name\n * @param {function} callback\n * @param {object} context\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback, context) {\n\n for (const [, t] of Object.entries(this.pipe)) {\n t.setCallback(name, callback, context);\n }\n\n return this;\n }\n\n /**\n * run a pipe\n *\n * @param {*} value\n * @returns {*}\n */\n run(value) {\n return this.pipe.reduce((accumulator, transformer, currentIndex, array) => {\n return transformer.run(accumulator);\n }, value);\n }\n}\n\nassignToNamespace('Monster.Data', Pipe);\nexport {Monster, Pipe}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {getGlobal} from \"../types/global.js\";\nimport {ID} from '../types/id.js';\nimport {isArray, isObject, isString} from '../types/is.js';\nimport {\n validateFunction,\n validateInteger,\n validateObject,\n validatePrimitive,\n validateString\n} from '../types/validate.js';\nimport {clone} from \"../util/clone.js\";\nimport {Pathfinder} from \"./pathfinder.js\";\n\n/**\n * The transformer class is a swiss army knife for manipulating values. especially in combination with the pipe, processing chains can be built up.\n *\n * You can call the method via the monster namespace `new Monster.Data.Transformer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/transformer.js';\n * console.log(new Monster.Data.Transformer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/transformer.js';\n * console.log(new Transformer())\n * </script>\n * ```\n *\n * A simple example is the conversion of all characters to lowercase. for this purpose the command tolower must be used.\n *\n * ```\n * let t = new Transformer('tolower').run('ABC'); // ↦ abc\n * ```\n *\n * **all commands**\n *\n * in the following table all commands, parameters and existing aliases are described.\n *\n * | command | parameter | alias | description |\n * |:-------------|:---------------------------|:------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | base64 | | | Converts the value to base64 |\n * | call | function,param1:param2:... | | Calling a callback function. The function can be defined in three places: either globally, in the context `addCallback` or in the passed object |\n * | default | | | If the value is undefined the first argument is returned, otherwise the value. (since 1.12.0) |\n * | empty | | | Return empty String \"\" |\n * | fromjson | | | Type conversion from a JSON string (since 1.12.0) |\n * | if | statement1:statement2 | ? | Is the ternary operator, the first parameter is the valid statement, the second is the false part. To use the current value in the queue, you can set the value keyword. On the other hand, if you want to have the static string \"value\", you have to put one backslash \\\\ in front of it and write value. the follow values are true: 'on', true, 'true' |\n * | index | key:default | property, key | Fetches a value from an object, an array, a map or a set |\n * | length | | count | Length of the string or entries of an array or object |\n * | nop | | | Do nothing |\n * | path | path | | The access to an object is done via a Pathfinder object |\n * | plaintext | | plain | All HTML tags are removed (*) |\n * | prefix | text | | Adds a prefix |\n * | rawurlencode | | | URL coding |\n * | static | | none | The Arguments value is used and passed to the value. Special characters \\ <space> and : can be quotet by a preceding \\. |\n * | substring | start:length | | Returns a substring |\n * | suffix | text | | Adds a suffix |\n * | tointeger | | | Type conversion to an integer value |\n * | tojson | | | Type conversion to a JSON string (since 1.8.0) |\n * | tolower | | strtolower, tolowercase | The input value is converted to lowercase letters |\n * | tostring | | | Type conversion to a string |\n * | toupper | | strtoupper, touppercase | The input value is converted to uppercase letters |\n * | trim | | | Remove spaces at the beginning and end |\n * | ucfirst | | | First character large |\n * | ucwords | | | Any word beginning large |\n * | undefined | | | Return undefined |\n * | uniqid | | | Creates a string with a unique value (**) |\n *\n * (*) for this functionality the extension [jsdom](https://www.npmjs.com/package/jsdom) must be loaded in the nodejs context.\n *\n * ```\n * // polyfill\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n * \n * [\n * 'self',\n * 'document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (global[key] = window[key]));\n * }\n * ```\n *\n * (**) for this command the crypt library is necessary in the nodejs context.\n *\n * ```\n * import * as Crypto from \"@peculiar/webcrypto\";\n * global['crypto'] = new Crypto.Crypto();\n * ```\n *\n * @example\n *\n * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/data/transformer.js';\n *\n * const transformer = new Transformer(\"tolower\")\n *\n * console.log(transformer.run(\"HELLO\"))\n * // ↦ hello\n *\n * console.log(transformer.run(\"WORLD\"))\n * // ↦ world\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Transformer extends Base {\n /**\n *\n * @param {string} definition\n */\n constructor(definition) {\n super();\n validateString(definition);\n\n this.args = disassemble(definition);\n this.command = this.args.shift()\n this.callbacks = new Map();\n\n }\n\n /**\n *\n * @param {string} name\n * @param {function} callback\n * @param {object} context\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback, context) {\n validateString(name)\n validateFunction(callback)\n\n if (context !== undefined) {\n validateObject(context);\n }\n\n this.callbacks.set(name, {\n callback: callback,\n context: context,\n });\n\n return this;\n }\n\n /**\n *\n * @param {*} value\n * @returns {*}\n * @throws {Error} unknown command\n * @throws {TypeError} unsupported type\n * @throws {Error} type not supported\n */\n run(value) {\n return transform.apply(this, [value])\n }\n}\n\nassignToNamespace('Monster.Data', Transformer);\nexport {Monster, Transformer}\n\n/**\n *\n * @param {string} command\n * @returns {array}\n * @private\n */\nfunction disassemble(command) {\n\n validateString(command);\n\n let placeholder = new Map;\n const regex = /((?<pattern>\\\\(?<char>.)){1})/mig;\n\n // The separator for args must be quotable\n // undefined string which should not occur normally and is also not a regex\n let result = command.matchAll(regex)\n\n for (let m of result) {\n let g = m?.['groups'];\n if (!isObject(g)) {\n continue;\n }\n\n let p = g?.['pattern'];\n let c = g?.['char'];\n\n if (p && c) {\n let r = '__' + new ID().toString() + '__';\n placeholder.set(r, c);\n command = command.replace(p, r);\n }\n\n }\n let parts = command.split(':');\n\n parts = parts.map(function (value) {\n let v = value.trim();\n for (let k of placeholder) {\n v = v.replace(k[0], k[1]);\n }\n return v;\n\n\n });\n\n return parts\n}\n\n/**\n * tries to make a string out of value and if this succeeds to return it back\n *\n * @param {*} value\n * @returns {string}\n * @private\n */\nfunction convertToString(value) {\n\n if (isObject(value) && value.hasOwnProperty('toString')) {\n value = value.toString();\n }\n\n validateString(value)\n return value;\n}\n\n/**\n *\n * @param {*} value\n * @returns {*}\n * @private\n * @throws {Error} unknown command\n * @throws {TypeError} unsupported type\n * @throws {Error} type not supported\n */\nfunction transform(value) {\n\n let args = clone(this.args);\n let key\n\n switch (this.command) {\n\n case 'static':\n return this.args.join(':');\n\n case 'tolower':\n case 'strtolower':\n case 'tolowercase':\n validateString(value)\n return value.toLowerCase();\n\n case 'toupper':\n case 'strtoupper':\n case 'touppercase':\n validateString(value)\n return value.toUpperCase();\n\n case 'tostring':\n return \"\" + value;\n\n case 'tointeger':\n let n = parseInt(value);\n validateInteger(n);\n return n\n\n case 'tojson':\n return JSON.stringify(value);\n\n case 'fromjson':\n return JSON.parse(value);\n\n case 'trim':\n validateString(value)\n return value.trim();\n\n case 'rawurlencode':\n validateString(value)\n return encodeURIComponent(value)\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A');\n\n\n case 'call':\n\n /**\n * callback-definition\n * function callback(value, ...args) {\n * return value;\n * }\n */\n\n let callback;\n let callbackName = args.shift();\n let context = getGlobal();\n\n if (isObject(value) && value.hasOwnProperty(callbackName)) {\n callback = value[callbackName];\n } else if (this.callbacks.has(callbackName)) {\n let s = this.callbacks.get(callbackName);\n callback = s?.['callback'];\n context = s?.['context'];\n } else if (typeof window === 'object' && window.hasOwnProperty(callbackName)) {\n callback = window[callbackName];\n }\n validateFunction(callback);\n\n args.unshift(value);\n return callback.call(context, ...args);\n\n case 'plain':\n case 'plaintext':\n validateString(value);\n let doc = new DOMParser().parseFromString(value, 'text/html');\n return doc.body.textContent || \"\";\n\n case 'if':\n case '?':\n\n validatePrimitive(value);\n\n let trueStatement = (args.shift() || undefined);\n let falseStatement = (args.shift() || undefined);\n\n if (trueStatement === 'value') {\n trueStatement = value;\n }\n if (trueStatement === '\\\\value') {\n trueStatement = 'value';\n }\n if (falseStatement === 'value') {\n falseStatement = value;\n }\n if (falseStatement === '\\\\value') {\n falseStatement = 'value';\n }\n\n let condition = ((value !== undefined && value !== '' && value !== 'off' && value !== 'false' && value !== false) || value === 'on' || value === 'true' || value === true);\n return condition ? trueStatement : falseStatement;\n\n\n case 'ucfirst':\n validateString(value);\n\n let firstchar = value.charAt(0).toUpperCase();\n return firstchar + value.substr(1);\n case 'ucwords':\n validateString(value);\n\n return value.replace(/^([a-z\\u00E0-\\u00FC])|\\s+([a-z\\u00E0-\\u00FC])/g, function (v) {\n return v.toUpperCase();\n });\n\n case 'count':\n case 'length':\n\n if ((isString(value) || isObject(value) || isArray(value)) && value.hasOwnProperty('length')) {\n return value.length;\n }\n\n throw new TypeError(\"unsupported type \" + typeof value);\n\n case 'base64':\n convertToString(value);\n return btoa(value);\n\n case 'empty':\n return '';\n\n case 'undefined':\n return undefined;\n\n case 'prefix':\n validateString(value);\n let prefix = args?.[0];\n return prefix + value;\n\n case 'suffix':\n validateString(value);\n let suffix = args?.[0];\n return value + suffix;\n\n case 'uniqid':\n return (new ID()).toString();\n\n case 'key':\n case 'property':\n case 'index':\n\n key = (args.shift() || 'undefined');\n let defaultValue = (args.shift() || '');\n\n if (value instanceof Map) {\n if (!value.has(key)) {\n return defaultValue;\n }\n return value.get(key);\n }\n\n if (isObject(value) || isArray(value)) {\n\n if (value?.[key]) {\n return value?.[key];\n }\n\n return defaultValue;\n }\n\n throw new Error(\"type not supported\")\n\n case 'path':\n\n key = (args.shift() || 'undefined');\n return new Pathfinder(value).getVia(key);\n\n\n case 'substring':\n\n validateString(value);\n\n let start = parseInt(args[0]) || 0;\n let end = (parseInt(args[1]) || 0) + start;\n\n return value.substring(start, end);\n\n case 'nop':\n return value;\n\n case 'default':\n if (value !== undefined) {\n return value;\n }\n return args[0];\n\n default:\n throw new Error(\"unknown command \" + this.command)\n }\n\n return value;\n}\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {validateFunction, validateObject, validateString} from \"./validate.js\";\n\n/**\n * @type {objec}\n * @private\n */\nlet globalReference;\n\n/**\n * @private\n * @throws {Error} unsupported environment.\n */\n(function () {\n\n if (typeof globalThis === 'object') {\n globalReference = globalThis;\n return;\n }\n\n if (typeof self !== 'undefined') {\n globalReference = self;\n return;\n } else if (typeof window !== 'undefined') {\n globalReference = window;\n return;\n }\n\n Object.defineProperty(Object.prototype, '__monster__', {\n get: function () {\n return this;\n },\n configurable: true\n });\n\n if (typeof __monster__ === 'object') {\n __monster__.globalThis = __monster__;\n delete Object.prototype.__monster__;\n\n globalReference = globalThis;\n return;\n }\n\n try {\n globalReference = Function('return this')();\n } catch (e) {\n\n }\n\n throw new Error(\"unsupported environment.\")\n\n\n}());\n\n/**\n * Return globalThis\n *\n * If globalThis is not available, it will be polyfilled\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @returns {objec} globalThis\n */\nfunction getGlobal() {\n return globalReference;\n}\n\n/**\n * Return global object or throw Error\n *\n * You can call the method via the monster namespace `Monster.Types.getGlobalObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/global.js';\n * console.log(Monster.Types.getGlobalObject('document')) // ↦ { }\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/global.js';\n * console.log(getGlobalObject('document')) // ↦ { }\n * </script>\n * ```\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @param {string} name\n * @returns {objec}\n * @throws {Error} the object is not defined\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not a string\n */\nfunction getGlobalObject(name) {\n validateString(name);\n let o = globalReference?.[name];\n if (typeof o === 'undefined') throw new Error('the object ' + name + ' is not defined');\n validateObject(o);\n return o;\n}\n\n/**\n * Return global function or throw Error\n *\n * You can call the method via the monster namespace `Monster.Types.getGlobalFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/global.js';\n * console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/global.js';\n * console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }\n * </script>\n * ```\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @param {string} name\n * @returns {objec}\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n * @throws {TypeError} value is not a string\n */\nfunction getGlobalFunction(name) {\n validateString(name);\n let f = globalReference?.[name];\n if (typeof f === 'undefined') throw new Error('the function ' + name + ' is not defined');\n validateFunction(f);\n return f;\n}\n\n\nassignToNamespace('Monster.Types', getGlobal, getGlobalObject, getGlobalFunction);\nexport {Monster, getGlobal, getGlobalObject, getGlobalFunction}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\nimport {validateString} from \"./validate.js\";\n\n/**\n * @private\n * @type {Map<string, integer>}\n */\nlet internalCounter = new Map;\n\n/**\n * With the id class, sequences of ids can be created. for this purpose, an internal counter is incremented for each prefix.\n * thus, the first id with the prefix `myid` will be `myid1` and the second id `myid2`.\n * The ids are the same for every call, for example on a web page.\n *\n * So the ids can also be used for navigation. you just have to take care that the order stays the same.\n *\n * You can call the method via the monster namespace `new Monster.Types.ID()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/id.js';\n * console.log(new Monster.Types.ID())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/id.js';\n * console.log(new ID())\n * </script>\n * ```\n *\n * As of version 1.6.0 there is the new RandomID. this ID class is continuous from now on.\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ID extends Base {\n\n /**\n * create new object\n */\n constructor(prefix) {\n super();\n\n if (prefix === undefined) {\n prefix = \"id\";\n }\n\n validateString(prefix);\n\n if (!internalCounter.has(prefix)) {\n internalCounter.set(prefix, 1);\n }\n\n let count = internalCounter.get(prefix);\n this.id = prefix + count;\n\n internalCounter.set(prefix, ++count);\n }\n\n /**\n * @return {string}\n */\n toString() {\n return this.id;\n }\n\n}\n\nassignToNamespace('Monster.Types', ID);\nexport {Monster, ID}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getGlobal} from '../types/global.js';\nimport {isArray, isFunction, isObject, isPrimitive} from '../types/is.js';\n\n\n/**\n * With this function, objects can be cloned.\n * The entire object tree is run through.\n *\n * Proxy, Element, HTMLDocument and DocumentFragment instances are not cloned.\n * Global objects such as windows are also not cloned,\n *\n * If an object has a method `getClone()`, this method is used to create the clone.\n *\n * You can call the method via the monster namespace `Monster.Util.clone()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/clone.js';\n * console.log(Monster.Util.clone({}))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/clone.js';\n * console.log(clone({}))\n * </script>\n * ```\n *\n * @param {*} obj object to be cloned\n * @returns {*}\n *\n * @since 1.0.0\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {Error} unable to clone obj! its type isn't supported.\n */\nfunction clone(obj) {\n\n // typeof null results in 'object'. https://2ality.com/2013/10/typeof-null.html\n if (null === obj) {\n return obj;\n }\n\n // Handle the two simple types, null and undefined\n if (isPrimitive(obj)) {\n return obj;\n }\n\n // Handle the two simple types, null and undefined\n if (isFunction(obj)) {\n return obj;\n }\n\n // Handle Array\n if (isArray(obj)) {\n let copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = clone(obj[i]);\n }\n\n return copy;\n }\n\n if (isObject(obj)) {\n\n\n // Handle Date\n if (obj instanceof Date) {\n let copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n\n /** Do not clone DOM nodes */\n if (typeof Element !== 'undefined' && obj instanceof Element) return obj;\n if (typeof HTMLDocument !== 'undefined' && obj instanceof HTMLDocument) return obj;\n if (typeof DocumentFragment !== 'undefined' && obj instanceof DocumentFragment) return obj;\n\n /** Do not clone global objects */\n if (obj === getGlobal()) return obj;\n if (typeof globalContext !== 'undefined' && obj === globalContext) return obj;\n if (typeof window !== 'undefined' && obj === window) return obj;\n if (typeof document !== 'undefined' && obj === document) return obj;\n if (typeof navigator !== 'undefined' && obj === navigator) return obj;\n if (typeof JSON !== 'undefined' && obj === JSON) return obj;\n\n // Handle Proxy-Object\n try {\n // try/catch because possible: TypeError: Function has non-object prototype 'undefined' in instanceof check\n if (obj instanceof Proxy) {\n return obj;\n }\n } catch (e) {\n }\n\n return cloneObject(obj)\n\n }\n\n throw new Error(\"unable to clone obj! its type isn't supported.\");\n}\n\n/**\n *\n * @param {object} obj\n * @returns {object}\n * @private\n */\nfunction cloneObject(obj) {\n var copy;\n\n /** Object has clone method */\n if (typeof obj.hasOwnProperty('getClone') && obj.getClone === 'function') {\n return obj.getClone();\n }\n\n copy = {};\n if (typeof obj.constructor === 'function' &&\n typeof obj.constructor.call === 'function') {\n copy = new obj.constructor();\n }\n\n for (let key in obj) {\n\n if (!obj.hasOwnProperty(key)) {\n continue;\n }\n\n if (Monster.Types.isPrimitive(obj[key])) {\n copy[key] = obj[key];\n continue;\n }\n\n copy[key] = clone(obj[key]);\n }\n\n return copy;\n}\n\nassignToNamespace('Monster.Util', clone);\nexport {Monster, clone}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {getGlobalFunction} from \"../types/global.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\nimport {validateInstance, validateString} from \"../types/validate.js\";\n\n\n/**\n * attribute prefix\n *\n * @type {string}\n * @memberOf Monster/DOM\n */\nconst ATTRIBUTEPREFIX = \"data-monster-\";\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Assembler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/assembler.js';\n * console.log(new Monster.DOM.Assembler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/assembler.js';\n * console.log(new Assembler())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Assembler extends Base {\n\n /**\n * @param {DocumentFragment} fragment\n * @throws {TypeError} value is not an instance of\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n */\n constructor(fragment) {\n super();\n this.attributePrefix = ATTRIBUTEPREFIX;\n validateInstance(fragment, getGlobalFunction('DocumentFragment'));\n this.fragment = fragment;\n }\n\n /**\n *\n * @param {string} prefix\n * @returns {Assembler}\n * @throws {TypeError} value is not a string\n */\n setAttributePrefix(prefix) {\n validateString(prefix);\n this.attributePrefix = prefix;\n return this;\n }\n\n /**\n *\n * @returns {string}\n */\n getAttributePrefix() {\n return this.attributePrefix;\n }\n\n /**\n *\n * @param {ProxyObserver|undefined} data\n * @return {DocumentFragment}\n * @throws {TypeError} value is not an instance of\n */\n createDocumentFragment(data) {\n\n if (data === undefined) {\n data = new ProxyObserver({});\n }\n\n validateInstance(data, ProxyObserver);\n let fragment = this.fragment.cloneNode(true);\n return fragment;\n }\n\n}\n\nassignToNamespace('Monster.DOM', Assembler);\nexport {Monster, ATTRIBUTEPREFIX, Assembler}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\nimport {isArray, isObject, isPrimitive} from \"./is.js\";\nimport {Observer} from \"./observer.js\";\nimport {ObserverList} from \"./observerlist.js\";\nimport {validateObject} from \"./validate.js\";\n\n/**\n * An observer manages a callback function\n *\n * You can call create the class via the monster namespace `new Monster.Types.ProxyObserver()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/proxyobserver.js';\n * console.log(new Monster.Types.ProxyObserver())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this class individually.\n *\n * ```\n * <script type=\"module\">\n * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/proxyobserver.js';\n * console.log(new ProxyObserver())\n * </script>\n * ```\n *\n * with the ProxyObserver you can attach observer for observation. with each change at the object to be observed an update takes place.\n *\n * this also applies to nested objects.\n *\n * @example\n *\n * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/proxyobserver.js';\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/observer.js';\n * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/is.js';\n *\n * const o = new Observer(function () { \n * if (isObject(this) && this instanceof ProxyObserver) {\n * // do something (this ist ProxyObserver)\n * const subject = this.getSubject();\n * console.log(subject);\n * }\n * });\n *\n * let realSubject = {\n * a: {\n * b: {\n * c: true\n * },\n * d: 9\n * }\n * }\n *\n * const p = new ProxyObserver(realSubject);\n * p.attachObserver(o);\n * const s = p.getSubject();\n * s.a.b.c = false;\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ProxyObserver extends Base {\n\n /**\n *\n * @param {object} object\n * @throws {TypeError} value is not a object\n */\n constructor(object) {\n super();\n\n this.realSubject = validateObject(object);\n this.subject = new Proxy(object, getHandler.call(this));\n\n this.objectMap = new WeakMap();\n this.objectMap.set(this.realSubject, this.subject);\n\n this.proxyMap = new WeakMap();\n this.proxyMap.set(this.subject, this.realSubject);\n\n this.observers = new ObserverList;\n }\n\n /**\n * get the real object\n *\n * changes to this object are not noticed by the observers, so you can make a large number of changes and inform the observers later.\n *\n * @returns {object}\n */\n getSubject() {\n return this.subject\n }\n\n /**\n * get the proxied object\n *\n * @returns {object}\n */\n getRealSubject() {\n return this.realSubject\n }\n\n /**\n * attach a new observer\n *\n * @param {Observer} observer\n * @returns {ProxyObserver}\n */\n attachObserver(observer) {\n this.observers.attach(observer)\n return this;\n }\n\n /**\n * detach a observer\n *\n * @param {Observer} observer\n * @returns {ProxyObserver}\n */\n detachObserver(observer) {\n this.observers.detach(observer)\n return this;\n }\n\n /**\n * notify all observer\n *\n * @returns {Promise}\n */\n notifyObservers() {\n return this.observers.notify(this);\n }\n\n /**\n * @param {Observer} observer\n * @returns {boolean}\n */\n containsObserver(observer) {\n return this.observers.contains(observer)\n }\n\n}\n\nassignToNamespace('Monster.Types', ProxyObserver);\nexport {Monster, ProxyObserver}\n\n/**\n *\n * @returns {{defineProperty: (function(*=, *=, *=): *), setPrototypeOf: (function(*, *=): boolean), set: (function(*, *, *, *): boolean), get: ((function(*=, *=, *=): (undefined))|*), deleteProperty: ((function(*, *): (boolean))|*)}}\n * @private\n * @see {@link https://gitlab.schukai.com/-/snippets/49}\n */\nfunction getHandler() {\n\n const proxy = this;\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots\n const handler = {\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver\n get: function (target, key, receiver) {\n\n const value = Reflect.get(target, key, receiver);\n\n if (typeof key === \"symbol\") {\n return value;\n }\n\n if (isPrimitive(value)) {\n return value;\n }\n\n // set value as proxy if object or array\n if ((isArray(value) || isObject(value))) {\n if (proxy.objectMap.has(value)) {\n return proxy.objectMap.get(value);\n } else if (proxy.proxyMap.has(value)) {\n return value;\n } else {\n let p = new Proxy(value, handler);\n proxy.objectMap.set(value, p);\n proxy.proxyMap.set(p, value);\n return p;\n }\n\n }\n\n return value;\n\n },\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver \n set: function (target, key, value, receiver) {\n\n if (proxy.proxyMap.has(value)) {\n value = proxy.proxyMap.get(value);\n }\n\n if (proxy.proxyMap.has(target)) {\n target = proxy.proxyMap.get(target);\n }\n\n let current = Reflect.get(target, key, receiver);\n if (proxy.proxyMap.has(current)) {\n current = proxy.proxyMap.get(current);\n }\n\n if (current === value) {\n return true;\n }\n\n let result;\n let descriptor = Reflect.getOwnPropertyDescriptor(target, key);\n\n if (descriptor === undefined) {\n descriptor = {\n writable: true,\n enumerable: true,\n configurable: true\n }\n }\n\n descriptor['value'] = value;\n result = Reflect.defineProperty(target, key, descriptor);\n\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n\n return result;\n },\n\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-delete-p\n deleteProperty: function (target, key) {\n if (key in target) {\n delete target[key];\n\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n\n return true;\n }\n return false;\n },\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc\n defineProperty: function (target, key, descriptor) {\n\n let result = Reflect.defineProperty(target, key, descriptor);\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n return result;\n },\n\n // https://262.ecma-international.org/9.0/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v\n setPrototypeOf: function (target, key) {\n let result = Reflect.setPrototypeOf(object1, key);\n\n if (typeof key !== \"symbol\") {\n proxy.observers.notify(proxy);\n }\n\n return result;\n }\n\n };\n\n\n return handler;\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\nimport {isObject} from './is.js';\nimport {TokenList} from './tokenlist.js';\nimport {UniqueQueue} from './uniquequeue.js';\n\n/**\n * An observer manages a callback function\n *\n * You can call the method via the monster namespace `new Monster.Types.Observer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/observer.js';\n * console.log(new Monster.Types.Observer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/observer.js';\n * console.log(new Observer())\n * </script>\n * ```\n *\n * The update method is called with the subject object as this pointer. For this reason the callback should not\n * be an arrow function, because it gets the this pointer of its own context.\n *\n * ```\n * <script>\n * new Observer(()=>{\n * // this is not subject\n * })\n *\n * new Observer(function() {\n * // this is subject\n * })\n * </script>\n * ```\n *\n * Additional arguments can be passed to the callback. To do this, simply specify them.\n *\n * ```\n * <script>\n * Observer(function(a, b, c) {\n * console.log(a, b, c); // ↦ \"a\", 2, true \n * }, \"a\", 2, true)\n * </script>\n * ```\n *\n * The callback function must have as many parameters as arguments are given.\n *\n * @example\n *\n * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/observer.js';\n *\n * const observer = new Observer(function(a, b, c) {\n * console.log(this, a, b, c); // ↦ \"a\", 2, true \n * }, \"a\", 2, true);\n *\n * observer.update({value:true}).then(()=>{});\n * // ↦ {value: true} \"a\" 2 true\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Observer extends Base {\n\n /**\n *\n * @param {function} callback\n * @param {*} args\n */\n constructor(callback, ...args) {\n super();\n\n if (typeof callback !== 'function') {\n throw new Error(\"observer callback must be a function\")\n }\n\n this.callback = callback;\n this.arguments = args;\n this.tags = new TokenList;\n this.queue = new UniqueQueue();\n }\n\n /**\n *\n * @param {string} tag\n * @returns {Observer}\n */\n addTag(tag) {\n this.tags.add(tag);\n return this;\n }\n\n /**\n *\n * @param {string} tag\n * @returns {Observer}\n */\n removeTag(tag) {\n this.tags.remove(tag);\n return this;\n }\n\n /**\n *\n * @returns {Array}\n */\n getTags() {\n return this.tags.entries()\n }\n\n /**\n *\n * @param {string} tag\n * @returns {boolean}\n */\n hasTag(tag) {\n return this.tags.contains(tag)\n }\n\n /**\n *\n * @param {object} subject\n * @returns {Promise}\n */\n update(subject) {\n let self = this;\n\n return new Promise(function (resolve, reject) {\n if (!isObject(subject)) {\n reject(\"subject must be an object\");\n return;\n }\n\n self.queue.add(subject);\n\n setTimeout(() => {\n\n try {\n // the queue and the settimeout ensure that an object is not \n // informed of the same change more than once.\n if (self.queue.isEmpty()) {\n resolve();\n return;\n }\n\n let s = self.queue.poll();\n let result = self.callback.apply(s, self.arguments);\n\n if (isObject(result) && result instanceof Promise) {\n result.then(resolve).catch(reject);\n return;\n }\n\n resolve(result);\n\n } catch (e) {\n reject(e);\n }\n }, 0)\n\n });\n\n };\n\n}\n\nassignToNamespace('Monster.Types', Observer);\nexport {Monster, Observer}\n\n\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {isIterable, isString} from '../types/is.js';\nimport {validateFunction, validateString} from '../types/validate.js';\nimport {Base} from './base.js';\n\n/**\n * A tokenlist allows you to manage tokens (individual character strings such as css classes in an attribute string).\n *\n * The tokenlist offers various functions to manipulate values. For example, you can add, remove or replace a class in a CSS list.\n *\n * You can call the method via the monster namespace `new Monster.Types.TokenList()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/tokenlist.js';\n * console.log(new Monster.Types.TokenList(\"myclass row\"))\n * console.log(new Monster.Types.TokenList(\"myclass row\"))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/tokenlist.js';\n * console.log(new TokenList(\"myclass row\"))\n * console.log(new TokenList(\"myclass row\"))\n * </script>\n * ```\n *\n * This class implements the [iteration protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).\n *\n * ```\n * console.log(typeof new TokenList(\"myclass row\")[Symbol.iterator]); // \"function\"\n * ```\n *\n * @since 1.2.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass TokenList extends Base {\n\n /**\n *\n * @param {array|string|iteratable} init\n */\n constructor(init) {\n super();\n this.tokens = new Set();\n\n if (typeof init !== \"undefined\") {\n this.add(init);\n }\n\n }\n\n /**\n * Iterator protocol\n *\n * @returns {Symbol.iterator}\n */\n getIterator() {\n return this[Symbol.iterator]();\n }\n\n /**\n * Iterator\n *\n * @returns {{next: ((function(): ({value: *, done: boolean}))|*)}}\n */\n [Symbol.iterator]() {\n // Use a new index for each iterator. This makes multiple\n // iterations over the iterable safe for non-trivial cases,\n // such as use of break or nested looping over the same iterable.\n let index = 0;\n let entries = this.entries()\n\n return {\n next: () => {\n if (index < entries.length) {\n return {value: entries?.[index++], done: false}\n } else {\n return {done: true}\n }\n }\n }\n }\n\n /**\n * Returns true if it contains token, otherwise false\n *\n * ```\n * new TokenList(\"start middle end\").contains('start')); // ↦ true\n * new TokenList(\"start middle end\").contains('end')); // ↦ true\n * new TokenList(\"start middle end\").contains('xyz')); // ↦ false\n * new TokenList(\"start middle end\").contains(['end','start','middle'])); // ↦ true\n * new TokenList(\"start middle end\").contains(['end','start','xyz'])); // ↦ false\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {boolean}\n */\n contains(value) {\n if (isString(value)) {\n value = value.trim()\n let counter = 0;\n value.split(\" \").forEach(token => {\n if (this.tokens.has(token.trim()) === false) return false;\n counter++\n })\n return counter > 0 ? true : false;\n }\n\n if (isIterable(value)) {\n let counter = 0;\n for (let token of value) {\n validateString(token);\n if (this.tokens.has(token.trim()) === false) return false;\n counter++\n }\n return counter > 0 ? true : false;\n }\n\n return false;\n }\n\n /**\n * add tokens\n *\n * ```\n * new TokenList().add(\"abc xyz\").toString(); // ↦ \"abc xyz\"\n * new TokenList().add([\"abc\",\"xyz\"]).toString(); // ↦ \"abc xyz\"\n * new TokenList().add(undefined); // ↦ add nothing\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {TokenList}\n * @throws {TypeError} unsupported value\n */\n add(value) {\n if (isString(value)) {\n value.split(\" \").forEach(token => {\n this.tokens.add(token.trim());\n })\n } else if (isIterable(value)) {\n for (let token of value) {\n validateString(token);\n this.tokens.add(token.trim());\n }\n } else if (typeof value !== \"undefined\") {\n throw new TypeError(\"unsupported value\");\n }\n\n return this;\n }\n\n /**\n * remove all tokens\n *\n * @returns {TokenList}\n */\n clear() {\n this.tokens.clear();\n return this;\n }\n\n /**\n * Removes token\n *\n * ```\n * new TokenList(\"abc xyz\").remove(\"xyz\").toString(); // ↦ \"abc\"\n * new TokenList(\"abc xyz\").remove([\"xyz\"]).toString(); // ↦ \"abc\"\n * new TokenList(\"abc xyz\").remove(undefined); // ↦ remove nothing\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {TokenList}\n * @throws {TypeError} unsupported value\n */\n remove(value) {\n if (isString(value)) {\n value.split(\" \").forEach(token => {\n this.tokens.delete(token.trim());\n })\n } else if (isIterable(value)) {\n for (let token of value) {\n validateString(token);\n this.tokens.delete(token.trim());\n }\n } else if (typeof value !== \"undefined\") {\n throw new TypeError(\"unsupported value\");\n }\n\n return this;\n }\n\n /**\n * this method replaces a token with a new token.\n *\n * if the passed token exists, it is replaced with newToken and TokenList is returned.\n * if the token does not exist, newToken is not set and TokenList is returned.\n *\n * @param {string} token\n * @param {string} newToken\n * @returns {TokenList}\n */\n replace(token, newToken) {\n validateString(token);\n validateString(newToken);\n if (!this.contains(token)) {\n return this;\n }\n\n let a = Array.from(this.tokens)\n let i = a.indexOf(token);\n if (i === -1) return this;\n\n a.splice(i, 1, newToken);\n this.tokens = new Set();\n this.add(a);\n\n return this;\n\n\n }\n\n /**\n * Removes token from string. If token doesn't exist it's added.\n *\n * ```\n * new TokenList(\"abc def ghi\").toggle(\"def xyz\").toString(); // ↦ \"abc ghi xyz\"\n * new TokenList(\"abc def ghi\").toggle([\"abc\",\"xyz\"]).toString(); // ↦ \"def ghi xyz\"\n * new TokenList().toggle(undefined); // ↦ nothing\n * ```\n *\n * @param {array|string|iteratable} value\n * @returns {boolean}\n * @throws {TypeError} unsupported value\n */\n toggle(value) {\n\n if (isString(value)) {\n value.split(\" \").forEach(token => {\n toggleValue.call(this, token);\n })\n } else if (isIterable(value)) {\n for (let token of value) {\n toggleValue.call(this, token);\n }\n } else if (typeof value !== \"undefined\") {\n throw new TypeError(\"unsupported value\");\n }\n\n return this;\n\n }\n\n /**\n * returns an array with all tokens\n *\n * @returns {array}\n */\n entries() {\n return Array.from(this.tokens)\n }\n\n /**\n * executes the provided function with each value of the set\n *\n * @param {function} callback\n * @returns {TokenList}\n */\n forEach(callback) {\n validateFunction(callback);\n this.tokens.forEach(callback);\n return this;\n }\n\n /**\n * returns the individual tokens separated by a blank character\n *\n * @returns {string}\n */\n toString() {\n return this.entries().join(' ');\n }\n\n}\n\n/**\n * @private\n * @param token\n * @returns {toggleValue}\n * @throws {Error} must be called with TokenList.call\n */\nfunction toggleValue(token) {\n if (!(this instanceof TokenList)) throw Error(\"must be called with TokenList.call\")\n validateString(token);\n token = token.trim();\n if (this.contains(token)) {\n this.remove(token);\n return this;\n }\n this.add(token);\n return this;\n}\n\nassignToNamespace('Monster.Types', TokenList);\nexport {Monster, TokenList}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Queue} from \"./queue.js\";\nimport {validateObject} from \"./validate.js\";\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.Queue()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/uniquequeue.js';\n * console.log(new Monster.Types.UniqueQueue())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/uniquequeue.js';\n * console.log(new UniqueQueue())\n * </script>\n * ```\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass UniqueQueue extends Queue {\n\n /**\n *\n */\n constructor() {\n super();\n this.unique = new WeakSet();\n }\n\n /**\n * Add a new element to the end of the queue.\n *\n * @param {object} value\n * @returns {Queue}\n * @throws {TypeError} value is not a object\n */\n add(value) {\n\n validateObject(value);\n\n if (!this.unique.has(value)) {\n this.unique.add(value);\n super.add(value);\n }\n\n return this;\n }\n\n /**\n * remove all entries\n *\n * @returns {Queue}\n */\n clear() {\n super.clear();\n this.unique = new WeakSet;\n return this;\n }\n\n /**\n * Remove the element at the front of the queue\n * If the queue is empty, return undefined.\n *\n * @return {object}\n */\n poll() {\n\n if (this.isEmpty()) {\n return undefined;\n }\n let value = this.data.shift();\n this.unique.delete(value);\n return value;\n }\n\n\n}\n\nassignToNamespace('Monster.Types', UniqueQueue);\nexport {Monster, UniqueQueue}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.Queue()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/queue.js';\n * console.log(new Monster.Types.Queue())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/queue.js';\n * console.log(new Queue())\n * </script>\n * ```\n *\n * @example\n *\n * import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/queue.js';\n *\n * const queue = new Queue;\n *\n * queue.add(2);\n * queue.add(true);\n * queue.add(\"Hello\");\n * queue.add(4.5);\n *\n * console.log(queue.poll());\n * // ↦ 2\n * console.log(queue.poll());\n * // ↦ true\n * console.log(queue.poll());\n * // ↦ \"Hello\"\n * console.log(queue.poll());\n * // ↦ 4.5\n * console.log(queue.poll());\n * // ↦ undefined\n *\n *\n * @since 1.4.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Queue extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.data = [];\n }\n\n\n /**\n * @return {boolean}\n */\n isEmpty() {\n return this.data.length === 0;\n }\n\n /**\n * Read the element at the front of the queue without removing it.\n *\n * @return {*}\n */\n peek() {\n if (this.isEmpty()) {\n return undefined;\n }\n\n return this.data[0];\n }\n\n /**\n * Add a new element to the end of the queue.\n *\n * @param {*} value\n * @returns {Queue}\n */\n add(value) {\n this.data.push(value)\n return this;\n }\n\n /**\n * remove all entries\n *\n * @returns {Queue}\n */\n clear() {\n this.data = [];\n return this;\n }\n\n /**\n * Remove the element at the front of the queue\n * If the queue is empty, return undefined.\n *\n * @return {*}\n */\n poll() {\n if (this.isEmpty()) {\n return undefined;\n }\n return this.data.shift();\n }\n\n\n}\n\nassignToNamespace('Monster.Types', Queue);\nexport {Monster, Queue}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\nimport {Observer} from \"./observer.js\";\nimport {validateInstance} from \"./validate.js\";\n\n/**\n * With the help of the ObserverList class, observer can be managed.\n *\n * You can call the method via the monster namespace `new Monster.Types.ObserverList()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/observerlist.js';\n * console.log(new Monster.Types.ObserverList())\n * console.log(new Monster.Types.ObserverList())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/observerlist.js';\n * console.log(ObserverList())\n * console.log(ObserverList())\n * </script>\n * ```\n *\n * @since 1.0.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass ObserverList extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.observers = [];\n }\n\n /**\n *\n * @param {Observer} observer\n * @return {ObserverList}\n * @throws {TypeError} value is not an instance of Observer\n */\n attach(observer) {\n validateInstance(observer, Observer)\n\n this.observers.push(observer);\n return this;\n };\n\n /**\n *\n * @param {Observer} observer\n * @return {ObserverList}\n * @throws {TypeError} value is not an instance of Observer\n */\n detach(observer) {\n validateInstance(observer, Observer)\n\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n this.observers.splice(i, 1);\n }\n }\n\n return this;\n };\n\n /**\n *\n * @param {Observer} observer\n * @return {boolean}\n * @throws {TypeError} value is not an instance of Observer\n */\n contains(observer) {\n validateInstance(observer, Observer)\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n if (this.observers[i] === observer) {\n return true;\n }\n }\n return false;\n };\n\n /**\n *\n * @param subject\n * @return {Promise}\n */\n notify(subject) {\n\n let pomises = []\n\n var i = 0, l = this.observers.length;\n for (; i < l; i++) {\n pomises.push(this.observers[i].update(subject));\n }\n\n return Promise.all(pomises);\n };\n\n}\n\nassignToNamespace('Monster.Types', ObserverList);\nexport {Monster, ObserverList}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getGlobalFunction} from \"../types/global.js\";\nimport {TokenList} from \"../types/tokenlist.js\";\nimport {validateInstance, validateString, validateSymbol} from \"../types/validate.js\";\nimport {ATTRIBUTE_OBJECTLINK} from \"./constants.js\";\n\n/**\n * get the closest object link of a node\n *\n * if a node is specified without a object link, a recursive search upwards is performed until the corresponding\n * object link is found, or undefined is returned.\n *\n * you can call the method via the monster namespace `Monster.DOM.getUpdaterFromNode()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/updater.js';\n * console.log(Monster.DOM.findClosestObjectLink())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/updater.js';\n * console.log(findClosestObjectLink())\n * </script>\n * ```\n *\n * @param {HTMLElement} element\n * @return {HTMLElement|undefined}\n * @since 1.10.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not an instance of HTMLElement\n */\nfunction findClosestObjectLink(element) {\n return findClosestByAttribute(element, ATTRIBUTE_OBJECTLINK);\n}\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.addToObjectLink()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.addToObjectLink();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * addToObjectLink();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @param {Object} object\n * @return {boolean}\n */\nfunction addToObjectLink(element, symbol, object) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n element[symbol] = new Set;\n }\n\n addAttributeToken(element, ATTRIBUTE_OBJECTLINK, symbol.toString());\n element[symbol].add(object);\n return element;\n\n}\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.removeObjectLink()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.removeObjectLink();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * removeObjectLink();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @return {boolean}\n */\nfunction removeObjectLink(element, symbol) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n return element\n }\n\n removeAttributeToken(element, ATTRIBUTE_OBJECTLINK, symbol.toString());\n delete element[symbol];\n return element;\n\n}\n\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.hasObjectLink()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.hasObjectLink();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * hasObjectLink();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @return {boolean}\n */\nfunction hasObjectLink(element, symbol) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n return false\n }\n\n return containsAttributeToken(element, ATTRIBUTE_OBJECTLINK, symbol.toString());\n\n}\n\n/**\n * The ObjectLink can be used to attach objects to HTMLElements. The elements are kept in a set under a unique\n * symbol and can be read via an iterator {@see getLinkedObjects}.\n *\n * In addition, elements with an objectLink receive the attribute `data-monster-objectlink`.\n *\n * With the method {@see addToObjectLink} the objects can be added.\n *\n * You can call the method via the monster namespace `new Monster.DOM.getLinkedObjects()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.getLinkedObjects();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * getLinkedObjects();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {Symbol} symbol\n * @return {Iterator}\n * @throws {Error} there is no object link for symbol\n */\nfunction getLinkedObjects(element, symbol) {\n\n validateInstance(element, HTMLElement);\n validateSymbol(symbol)\n\n if (element?.[symbol] === undefined) {\n throw new Error('there is no object link for ' + symbol.toString());\n }\n\n return element?.[symbol][Symbol.iterator]();\n\n}\n\n\n/**\n * With this method tokens in an attribute can be switched on or off. For example, classes can be switched on and off in the elements class attribute.\n *\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.toggleAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.toggleAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * toggleAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {HTMLElement}\n */\nfunction toggleAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n element.setAttribute(key, token);\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).toggle(token).toString());\n\n return element\n}\n\n/**\n * this method can be used to add a token to an attribute. Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.addAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.addAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * addAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {HTMLElement}\n */\nfunction addAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n element.setAttribute(key, token);\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).add(token).toString());\n\n return element\n}\n\n/**\n * This function can be used to remove tokens from an attribute.\n *\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.removeAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.removeAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * removeAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {HTMLElement}\n */\nfunction removeAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).remove(token).toString());\n\n return element\n}\n\n/**\n * This method can be used to determine whether an attribute has a token.\n *\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.containsAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.containsAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * containsAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} token\n * @return {boolean}\n */\nfunction containsAttributeToken(element, key, token) {\n validateInstance(element, HTMLElement);\n validateString(token)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return false;\n }\n\n return new TokenList(element.getAttribute(key)).contains(token);\n\n}\n\n/**\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.replaceAttributeToken()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.replaceAttributeToken();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * replaceAttributeToken();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} from\n * @param {string} to\n * @return {HTMLElement}\n */\nfunction replaceAttributeToken(element, key, from, to) {\n validateInstance(element, HTMLElement);\n validateString(from)\n validateString(to)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).replace(from, to).toString());\n\n return element\n}\n\n/**\n * Tokens are always separated by a space.\n *\n * You can call the method via the monster namespace `new Monster.DOM.clearAttributeTokens()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.clearAttributeTokens();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * clearAttributeTokens();\n * </script>\n * ```\n *\n * @since 1.9.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @return {HTMLElement}\n */\nfunction clearAttributeTokens(element, key) {\n validateInstance(element, HTMLElement);\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, \"\");\n\n return element\n}\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.findClosestByAttribute()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * Monster.DOM.findClosestByAttribute();\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/attributes.js';\n * findClosestByAttribute();\n * </script>\n * ```\n *\n * @since 1.14.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @param {HTMLElement} element\n * @param {string} key\n * @return {HTMLElement|undefined}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an instance of HTMLElement\n */\n\n/**\n *\n * @since 1.14.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string|undefined} value\n * @return {HTMLElement|undefined}\n */\nfunction findClosestByAttribute(element, key, value) {\n validateInstance(element, getGlobalFunction('HTMLElement'));\n\n if (element.hasAttribute(key) && element.getAttribute(key) === value) {\n return element;\n }\n\n let selector = validateString(key);\n if (value !== undefined) selector += \"=\" + validateString(value);\n let result = element.closest('[' + selector + ']');\n if (result instanceof HTMLElement) {\n return result;\n }\n return undefined;\n}\n\n// exports\nassignToNamespace('Monster.DOM', getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);\nexport {\n Monster,\n addToObjectLink,\n removeObjectLink,\n hasObjectLink,\n findClosestByAttribute,\n clearAttributeTokens,\n replaceAttributeToken,\n containsAttributeToken,\n removeAttributeToken,\n addAttributeToken,\n toggleAttributeToken,\n getLinkedObjects,\n findClosestObjectLink\n}\n","'use strict';\n\nimport {Monster} from '../namespace.js';\n/**\n * @author schukai GmbH\n */\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_PREFIX = 'data-monster-';\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';\n\n\n/**\n * default theme\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst DEFAULT_THEME = 'monster';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_THEME_PREFIX = ATTRIBUTE_PREFIX + 'theme-';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst ATTRIBUTE_THEME_NAME = ATTRIBUTE_THEME_PREFIX + 'name';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_ATTRIBUTES = ATTRIBUTE_PREFIX + 'attributes';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REPLACE = ATTRIBUTE_PREFIX + 'replace';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT = ATTRIBUTE_PREFIX + 'insert';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_PREFIX + 'insert-reference';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.9.0\n */\nconst ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.14.0\n */\nconst ATTRIBUTE_ROLE = ATTRIBUTE_PREFIX + 'role';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.9.0\n */\nconst ATTRIBUTE_OBJECTLINK = ATTRIBUTE_PREFIX + 'objectlink';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.10.0\n */\nconst OBJECTLINK_KEY_UPDATER = 'monsterUpdater';\n\n\nexport {\n Monster,\n ATTRIBUTE_PREFIX,\n ATTRIBUTE_OPTIONS,\n DEFAULT_THEME,\n ATTRIBUTE_THEME_PREFIX,\n ATTRIBUTE_ROLE,\n ATTRIBUTE_THEME_NAME,\n ATTRIBUTE_UPDATER_ATTRIBUTES,\n ATTRIBUTE_UPDATER_REPLACE,\n ATTRIBUTE_UPDATER_INSERT,\n ATTRIBUTE_UPDATER_INSERT_REFERENCE,\n ATTRIBUTE_UPDATER_REMOVE,\n ATTRIBUTE_UPDATER_BIND,\n ATTRIBUTE_OBJECTLINK,\n OBJECTLINK_KEY_UPDATER\n}","'use strict';\n\nimport {extend} from \"../data/extend.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {CustomElement} from \"./customelement.js\";\n\n\n/**\n * @private\n * @type {symbol}\n */\nconst internalSymbol = Symbol('internalSymbol');\n\n/**\n * To define a new HTML control we need the power of CustomElement\n *\n * IMPORTANT: after defining a `CustomElement`, the `registerCustomElement` method must be called\n * with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.\n *\n * This control uses `attachInternals()` to integrate the control into a form.\n * If the target environment does not support this method, the [polyfill](https://www.npmjs.com/package/element-internals-polyfill ) can be used.\n *\n * You can create the object via the monster namespace `new Monster.DOM.CustomControl()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/customcontrol.js';\n * console.log(new Monster.DOM.CustomControl())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/customcontrol.js';\n * console.log(new CustomControl())\n * </script>\n * ```\n *\n * @see https://www.npmjs.com/package/element-internals-polyfill\n * @see https://github.com/WICG/webcomponents\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements\n * @since 1.14.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass CustomControl extends CustomElement {\n\n /**\n *\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n constructor() {\n super();\n\n if (typeof this['attachInternals'] === 'function') {\n // currently only supported by chrome\n this[internalSymbol] = this.attachInternals();\n }\n\n }\n\n /**\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals\n * @since 1.14.0\n * @return {boolean}\n */\n static get formAssociated() {\n return true;\n }\n\n /**\n * | option | description |\n * |----------------|---------------------------------|\n * | | |\n *\n * Derived classes can override and extend this method as follows.\n *\n * ```\n * get defaults() {\n * return extends{}, super.defaults, {\n * myValue:true\n * });\n * }\n * ```\n *\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals\n * @return {object}\n * @since 1.14.0\n */\n get defaults() {\n return extend({}, super.defaults);\n }\n\n /**\n * Must be overridden by a derived class and return the value of the control.\n *\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @since 1.14.0\n * @throws {Error} the value getter must be overwritten by the derived class\n */\n get value() {\n throw Error('the value getter must be overwritten by the derived class');\n }\n\n /**\n * Must be overridden by a derived class and return the value of the control.\n *\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @param {*} value\n * @since 1.14.0\n * @throws {Error} the value setter must be overwritten by the derived class\n */\n set value(value) {\n throw Error('the value setter must be overwritten by the derived class');\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {NodeList}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/labels\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get labels() {\n return getInternal.call(this)?.labels;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {string|null}\n */\n get name() {\n return this.getAttribute('name');\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {string}\n */\n get type() {\n return this.constructor.getTag();\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {ValidityState}\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n * @see https://developer.mozilla.org/en-US/docs/Web/API/validity\n */\n get validity() {\n return getInternal.call(this)?.validity;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {string}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/validationMessage\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get validationMessage() {\n return getInternal.call(this)?.validationMessage;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {boolean}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get willValidate() {\n return getInternal.call(this)?.willValidate;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {CustomStateSet}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/states\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get states() {\n return getInternal.call(this)?.states;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {HTMLFontElement|null}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/form\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n get form() {\n return getInternal.call(this)?.form;\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * ```\n * // Use the control's name as the base name for submitted data\n * const n = this.getAttribute('name');\n * const entries = new FormData();\n * entries.append(n + '-first-name', this.firstName_);\n * entries.append(n + '-last-name', this.lastName_);\n * this.setFormValue(entries);\n * ```\n *\n * @param {File|string|FormData} value\n * @param {File|string|FormData} state\n * @since 1.14.0\n * @return {undefined}\n * @throws {DOMException} NotSupportedError\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue\n */\n setFormValue(value, state) {\n getInternal.call(this).setFormValue(value, state);\n }\n\n /**\n *\n * @param {object} flags\n * @param {string|undefined} message\n * @param {HTMLElement} anchor\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setValidity\n * @since 1.14.0\n * @return {undefined}\n * @throws {DOMException} NotSupportedError\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n setValidity(flags, message, anchor) {\n getInternal.call(this).setValidity(flags, message, anchor);\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/checkValidity\n * @since 1.14.0\n * @return {boolean}\n * @throws {DOMException} NotSupportedError\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\n checkValidity() {\n return getInternal.call(this)?.checkValidity();\n }\n\n /**\n * This is a method of [internal api](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)\n *\n * @return {boolean}\n * @since 1.14.0\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/reportValidity\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n * @throws {DOMException} NotSupportedError\n */\n reportValidity() {\n return getInternal.call(this)?.reportValidity();\n }\n\n}\n\n/**\n * @private\n * @return {object}\n * @throws {Error} the ElementInternals is not supported and a polyfill is necessary\n */\nfunction getInternal() {\n const self = this;\n\n if (!(internalSymbol in this)) {\n throw new Error('ElementInternals is not supported and a polyfill is necessary');\n }\n\n return this[internalSymbol];\n}\n\nassignToNamespace('Monster.DOM', CustomControl);\nexport {Monster, CustomControl}\n","'use strict';\n\nimport {PROPERTY_KEY_INTERNALDATA} from \"../constants.js\";\nimport {extend} from \"../data/extend.js\";\nimport {Pathfinder} from \"../data/pathfinder.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getGlobalObject} from \"../types/global.js\";\nimport {isString} from \"../types/is.js\";\nimport {Observer} from \"../types/observer.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\nimport {validateFunction, validateObject} from \"../types/validate.js\";\nimport {clone} from \"../util/clone.js\";\nimport {addToObjectLink, getLinkedObjects, hasObjectLink} from \"./attributes.js\";\nimport {ATTRIBUTE_OPTIONS, OBJECTLINK_KEY_UPDATER} from \"./constants.js\";\nimport {findDocumentTemplate, Template} from \"./template.js\";\nimport {Updater} from \"./updater.js\";\n\n/**\n * @private\n * @type {symbol}\n */\nconst internalDataSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);\n\n/**\n * @private\n * @type {symbol}\n */\nconst objectLinkSymbol = Symbol.for(OBJECTLINK_KEY_UPDATER);\n\n/**\n * @type {symbol}\n */\nconst initMethodSymbol = Symbol('initMethodSymbol');\n\n/**\n * @type {symbol}\n */\nconst assembleMethodSymbol = Symbol('assembleMethodSymbol');\n\n/**\n * To define a new HTML element we need the power of CustomElement\n *\n * IMPORTANT: after defining a `CustomElement`, the `registerCustomElement` method must be called\n * with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.\n *\n * You can create the object via the monster namespace `new Monster.DOM.CustomElement()`.\n *\n * ```\n * <script type=\"module\">\n * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/customelement.js';\n * console.log(new Monster.DOM.CustomElement())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/customelement.js';\n * console.log(new CustomElement())\n * </script>\n * ```\n *\n * ## Styling\n *\n * For optimal display of custom-elements the pseudo-class :defined can be used.\n *\n * To prevent the custom elements from being displayed and flickering until the control is registered, it is recommended to create a css directive.\n *\n * In the simplest case, you can simply hide the control.\n *\n * ```\n * <style>\n *\n * my-custom-element:not(:defined) {\n * display: none;\n * }\n *\n * my-custom-element:defined {\n * display: flex;\n * }\n *\n * </style>\n * ```\n *\n * Alternatively you can also display a loader\n *\n * ```\n * my-custom-element:not(:defined) {\n * display: flex;\n * box-shadow: 0 4px 10px 0 rgba(33, 33, 33, 0.15);\n * border-radius: 4px;\n * height: 200px;\n * position: relative;\n * overflow: hidden;\n * }\n *\n * my-custom-element:not(:defined)::before {\n * content: '';\n * display: block;\n * position: absolute;\n * left: -150px;\n * top: 0;\n * height: 100%;\n * width: 150px;\n * background: linear-gradient(to right, transparent 0%, #E8E8E8 50%, transparent 100%);\n * animation: load 1s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;\n * }\n *\n * @keyframes load {\n * from {\n * left: -150px;\n * }\n * to {\n * left: 100%;\n * }\n * }\n *\n * my-custom-element:defined {\n * display: flex;\n * }\n * ```\n *\n * @example\n *\n * // In the example the the user can use his own template by creating a template in the DOM with the ID `my-custom-element`.\n * // You can also specify a theme (for example `mytheme`), then it will search for the ID `my-custom-element-mytheme` and\n * // if not available for the ID `my-custom-element`.\n *\n * class MyCustomElement extends CustomElement {\n * \n * static getTag() {\n * return \"my-custom-element\"\n * }\n *\n * }\n *\n * // ↦ <my-custom-element></my-custom-element>\n *\n * @see https://github.com/WICG/webcomponents\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass CustomElement extends HTMLElement {\n\n /**\n * A new object is created. First the `initOptions` method is called. Here the\n * options can be defined in derived classes. Subsequently, the shadowRoot is initialized.\n *\n * @throws {Error} the options attribute does not contain a valid json definition.\n * @since 1.7.0\n */\n constructor() {\n super();\n this[internalDataSymbol] = new ProxyObserver({'options': extend({}, this.defaults, getOptionsFromAttributes.call(this))});\n initOptionObserver.call(this);\n this[initMethodSymbol]();\n }\n\n /**\n * This method determines which attributes are to be monitored by `attributeChangedCallback()`.\n *\n * @return {string[]}\n * @since 1.15.0\n */\n static get observedAttributes() {\n return [ATTRIBUTE_OPTIONS];\n }\n\n /**\n * | option | description |\n * |----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | shadowMode | `open` Elements of the shadow root are accessible from JavaScript outside the root, for example using. `close` Denies access to the node(s) of a closed shadow root from JavaScript outside it |\n * | delegatesFocus | A boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability. When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available :focus styling. |\n * | templates.main | Main template |\n *\n * Derived classes can override and extend this method as follows.\n *\n * ```\n * get defaults() {\n * return Object.assign({}, super.defaults, {\n * myValue:true\n * });\n * }\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n * @return {{shadowMode: string, delegatesFocus: boolean}}\n * @since 1.8.0\n */\n get defaults() {\n return {\n shadowMode: 'open',\n delegatesFocus: true,\n templates: {\n main: undefined\n }\n };\n }\n\n /**\n * There is no check on the name by this class. the developer is responsible for assigning an appropriate tag.\n * if the name is not valid, registerCustomElement() will issue an error\n *\n * @link https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * @return {string}\n * @throws {Error} the method getTag must be overwritten by the derived class.\n * @since 1.7.0\n */\n static getTag() {\n throw new Error(\"the method getTag must be overwritten by the derived class.\");\n }\n\n /**\n * At this point a `CSSStyleSheet` object can be returned. If the environment does not\n * support a constructor, then an object can also be built using the following detour.\n *\n * If `undefined` is returned then the shadowRoot does not get a stylesheet.\n *\n * ```\n * const doc = document.implementation.createHTMLDocument('title');\n *\n * let style = doc.createElement(\"style\");\n * style.innerHTML=\"p{color:red;}\";\n *\n * // WebKit Hack\n * style.appendChild(document.createTextNode(\"\"));\n * // Add the <style> element to the page\n * doc.head.appendChild(style);\n * return doc.styleSheets[0];\n * ;\n * ```\n *\n * @return {CSSStyleSheet|undefined}\n */\n static getCSSStyleSheet() {\n return undefined;\n }\n\n /**\n * attach a new observer\n *\n * @param {Observer} observer\n * @returns {CustomElement}\n */\n attachObserver(observer) {\n this[internalDataSymbol].attachObserver(observer)\n return this;\n }\n\n /**\n * detach a observer\n *\n * @param {Observer} observer\n * @returns {CustomElement}\n */\n detachObserver(observer) {\n this[internalDataSymbol].detachObserver(observer)\n return this;\n }\n\n /**\n * @param {Observer} observer\n * @returns {ProxyObserver}\n */\n containsObserver(observer) {\n return this[internalDataSymbol].containsObserver(observer)\n }\n\n /**\n * nested options can be specified by path `a.b.c`\n *\n * @param {string} path\n * @param {*} defaultValue\n * @return {*}\n * @since 1.10.0\n */\n getOption(path, defaultValue) {\n let value;\n\n try {\n value = new Pathfinder(this[internalDataSymbol].getRealSubject()['options']).getVia(path);\n } catch (e) {\n\n }\n\n if (value === undefined) return defaultValue;\n return value;\n }\n\n /**\n * Set option and inform elements\n *\n * @param {string} path\n * @param {*} value\n * @return {CustomElement}\n * @since 1.14.0\n */\n setOption(path, value) {\n new Pathfinder(this[internalDataSymbol].getSubject()['options']).setVia(path, value);\n //this[internalDataSymbol].notifyObservers();\n return this;\n }\n\n /**\n * @since 1.15.0\n * @param {string|object} options\n * @return {CustomElement}\n */\n setOptions(options) {\n\n if (isString(options)) {\n options = parseOptionsJSON(options)\n }\n\n const self = this;\n extend(self[internalDataSymbol].getSubject()['options'], self.defaults, options);\n //this[internalDataSymbol].notifyObservers();\n\n return self;\n }\n\n /**\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n [initMethodSymbol]() {\n return this;\n }\n\n /**\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n [assembleMethodSymbol]() {\n\n const self = this;\n let elements;\n\n if (this.getOption('shadowMode', false) !== false) {\n try {\n initShadowRoot.call(this);\n elements = this.shadowRoot.childNodes;\n } catch (e) {\n\n }\n }\n\n if (!(elements instanceof NodeList)) {\n initHtmlContent.call(this);\n elements = this.childNodes;\n }\n\n const updater = new Set;\n addToObjectLink(this, objectLinkSymbol, updater);\n\n for (const [, element] of Object.entries(elements)) {\n\n if (!(element instanceof HTMLElement)) continue;\n if ((element instanceof HTMLTemplateElement)) continue;\n const u = new Updater(element, clone(self[internalDataSymbol].getRealSubject()['options']))\n updater.add(u);\n\n u.run().then(() => {\n u.enableEventProcessing();\n });\n\n }\n\n return this;\n }\n\n /**\n * Called every time the element is inserted into the DOM. Useful for running setup code, such as\n * fetching resources or rendering. Generally, you should try to delay work until this time.\n *\n * @return {void}\n * @since 1.7.0\n */\n connectedCallback() {\n let self = this;\n if (!hasObjectLink(self, objectLinkSymbol)) {\n setTimeout(() => {\n self[assembleMethodSymbol]()\n }, 0);\n }\n }\n\n /**\n * Called every time the element is removed from the DOM. Useful for running clean up code.\n *\n * @return {void}\n * @since 1.7.0\n */\n disconnectedCallback() {\n\n }\n\n /**\n * The custom element has been moved into a new document (e.g. someone called document.adoptNode(el)).\n *\n * @return {void}\n * @since 1.7.0\n */\n adoptedCallback() {\n\n }\n\n /**\n * Called when an observed attribute has been added, removed, updated, or replaced. Also called for initial\n * values when an element is created by the parser, or upgraded. Note: only attributes listed in the observedAttributes\n * property will receive this callback.\n *\n * @param {string} attrName\n * @param {string} oldVal\n * @param {string} newVal\n * @return {void}\n * @since 1.15.0\n */\n attributeChangedCallback(attrName, oldVal, newVal) {\n const self = this;\n\n if (attrName === ATTRIBUTE_OPTIONS) {\n self.setOptions(newVal);\n }\n\n }\n\n}\n\n/**\n * @since 1.15.0\n * @private\n */\nfunction initOptionObserver() {\n const self = this;\n\n self.attachObserver(new Observer(function () {\n\n // not initialised\n if (!hasObjectLink(self, Symbol.for(OBJECTLINK_KEY_UPDATER))) {\n return;\n }\n // inform every element\n const updaters = getLinkedObjects(self, Symbol.for(OBJECTLINK_KEY_UPDATER));\n\n for (const list of updaters) {\n for (const updater of list) {\n let d = clone(self[internalDataSymbol].getRealSubject()['options']);\n Object.assign(updater.getSubject(), d);\n }\n }\n\n }));\n\n}\n\n/**\n * @private\n * @return {object}\n * @throws {Error} the options attribute does not contain a valid json definition.\n */\nfunction getOptionsFromAttributes() {\n if (this.hasAttribute(ATTRIBUTE_OPTIONS)) {\n try {\n return parseOptionsJSON(this.getAttribute(ATTRIBUTE_OPTIONS))\n } catch (e) {\n throw new Error('the options attribute ' + ATTRIBUTE_OPTIONS + ' does not contain a valid json definition (actual: ' + this.getAttribute(ATTRIBUTE_OPTIONS) + ').');\n }\n }\n\n return {};\n}\n\n\nfunction parseOptionsJSON(data) {\n if (isString(data)) {\n try {\n let obj = JSON.parse(data);\n validateObject(obj);\n return obj;\n } catch (e) {\n throw new Error('the options does not contain a valid json definition (actual: ' + data + ').');\n }\n }\n\n return {};\n}\n\n/**\n * @private\n * @return {initHtmlContent}\n */\nfunction initHtmlContent() {\n\n try {\n let template = findDocumentTemplate(this.constructor.getTag());\n this.appendChild(template.createDocumentFragment());\n } catch (e) {\n\n let html = this.getOption('templates.main', '');\n if (isString(html) && html.length > 0) {\n this.innerHTML = html;\n }\n\n }\n\n return this;\n\n}\n\n/**\n * @private\n * @return {CustomElement}\n * @throws {Error} html is not set.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n * @memberOf CustomElement\n * @since 1.8.0\n */\nfunction initShadowRoot() {\n\n let template, html;\n\n try {\n template = findDocumentTemplate(this.constructor.getTag());\n } catch (e) {\n\n html = this.getOption('templates.main', '');\n if (!isString(html) || html === undefined || html === \"\") {\n throw new Error(\"html is not set.\");\n }\n\n }\n\n this.attachShadow({\n mode: this.getOption('shadowMode', 'open'),\n delegatesFocus: this.getOption('delegatesFocus', true)\n });\n\n const styleSheet = this.constructor.getCSSStyleSheet();\n if (styleSheet instanceof CSSStyleSheet) {\n this.shadowRoot.adoptedStyleSheets = [styleSheet];\n }\n\n if (template instanceof Template) {\n this.shadowRoot.appendChild(template.createDocumentFragment());\n return this;\n }\n\n this.shadowRoot.innerHTML = html;\n return this;\n}\n\n/**\n * This method registers a new element. The string returned by `CustomElement.getTag()` is used as the tag.\n *\n * @param {CustomElement} element\n * @return {void}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {DOMException} Failed to execute 'define' on 'CustomElementRegistry': is not a valid custom element name\n */\nfunction registerCustomElement(element) {\n validateFunction(element);\n getGlobalObject('customElements').define(element.getTag(), element);\n}\n\nassignToNamespace('Monster.DOM', CustomElement, registerCustomElement);\nexport {Monster, registerCustomElement, CustomElement, initMethodSymbol, assembleMethodSymbol}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {getGlobalFunction, getGlobalObject} from '../types/global.js';\nimport {validateInstance, validateString} from \"../types/validate.js\";\nimport {getDocumentTheme} from \"./theme.js\";\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Template()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/template.js';\n * console.log(new Monster.DOM.Template())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/template.js';\n * console.log(new Template())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Template extends Base {\n /**\n *\n * @param {HTMLTemplateElement} template\n * @throws {TypeError} value is not an instance of\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n */\n constructor(template) {\n super();\n const HTMLTemplateElement = getGlobalFunction('HTMLTemplateElement');\n validateInstance(template, HTMLTemplateElement);\n this.template = template;\n }\n\n /**\n *\n * @returns {HTMLTemplateElement}\n */\n getTemplateElement() {\n return this.template;\n }\n\n /**\n *\n * @return {DocumentFragment}\n * @throws {TypeError} value is not an instance of\n */\n createDocumentFragment() {\n return this.template.content.cloneNode(true);\n }\n\n}\n\n/**\n *\n *\n * you can call the method via the monster namespace `Monster.DOM.findDocumentTemplate()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/template.js';\n * console.log(Monster.DOM.findDocumentTemplate())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/template.js';\n * console.log(findDocumentTemplate())\n * </script>\n * ```\n *\n * @param {string} id\n * @param {Node} currentNode\n * @return {Template}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} template id not found.\n * @throws {TypeError} value is not a string\n */\nfunction findDocumentTemplate(id, currentNode) {\n validateString(id);\n\n if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {\n if (currentNode instanceof Node) {\n currentNode = currentNode.ownerDocument;\n }\n\n if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {\n currentNode = getGlobalObject('document');\n }\n }\n\n const HTMLTemplateElement = getGlobalFunction('HTMLTemplateElement');\n\n let theme = getDocumentTheme()\n let themedID = id + '-' + theme.getName();\n\n let template = currentNode.getElementById(themedID);\n if (template instanceof HTMLTemplateElement) {\n return new Template(template);\n }\n\n template = currentNode.getElementById(id);\n if (template instanceof HTMLTemplateElement) {\n return new Template(template);\n }\n\n if (currentNode !== getGlobalObject('document')) {\n return findDocumentTemplate(id)\n }\n\n throw new Error(\"template \" + id + \" not found.\")\n}\n\n\nassignToNamespace('Monster.DOM', Template, findDocumentTemplate);\nexport {Monster, Template, findDocumentTemplate}\n\n\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {getGlobalObject} from '../types/global.js';\nimport {validateString} from \"../types/validate.js\";\nimport {ATTRIBUTE_THEME_NAME, DEFAULT_THEME} from \"./constants.js\";\n\n\n/**\n * You can call the method via the monster namespace `new Monster.DOM.Theme()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/theme.js';\n * console.log(new Monster.DOM.Theme())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/theme.js';\n * console.log(new Theme())\n * </script>\n * ```\n *\n * @example\n *\n * import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/theme.js';\n *\n * const theme = getDocumentTheme();\n * console.log(theme.getName());\n * // ↦ monster\n *\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Theme extends Base {\n\n /**\n *\n * @param name\n * @throws {TypeError} value is not a string\n */\n constructor(name) {\n super();\n validateString(name);\n this.name = name;\n }\n\n /**\n *\n * @returns {string}\n */\n getName() {\n return this.name;\n }\n\n}\n\n/**\n * The theming used in the document can be defined via the html-tag.\n * The theming is specified via the attribute `data-monster-theme-name`.\n *\n * As name for a theme all characters are valid, which are also allowed for a HTMLElement-ID.\n *\n * ```\n * <html data-monster-theme-name=\"my-theme\">\n * ```\n *\n * the default theme name is `monster`.\n *\n * @return {Theme}\n * @since 1.7.0\n */\nfunction getDocumentTheme() {\n let document = getGlobalObject('document');\n let name = DEFAULT_THEME;\n\n let element = document.querySelector('html');\n if (element instanceof HTMLElement) {\n let theme = element.getAttribute(ATTRIBUTE_THEME_NAME);\n if (theme) {\n name = theme;\n }\n }\n\n return new Theme(name);\n\n}\n\nassignToNamespace('Monster.DOM', Theme, getDocumentTheme);\nexport {Monster, Theme, getDocumentTheme}\n","'use strict';\n\nimport {Diff} from \"../data/diff.js\";\nimport {Pathfinder} from \"../data/pathfinder.js\";\nimport {Pipe} from \"../data/pipe.js\";\nimport {\n ATTRIBUTE_UPDATER_ATTRIBUTES,\n ATTRIBUTE_UPDATER_BIND,\n ATTRIBUTE_UPDATER_INSERT,\n ATTRIBUTE_UPDATER_INSERT_REFERENCE,\n ATTRIBUTE_UPDATER_REMOVE,\n ATTRIBUTE_UPDATER_REPLACE\n} from \"../dom/constants.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from \"../types/base.js\";\nimport {isArray, isInstance, isIterable} from \"../types/is.js\";\nimport {Observer} from \"../types/observer.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\nimport {validateArray, validateInstance} from \"../types/validate.js\";\nimport {clone} from \"../util/clone.js\";\nimport {findDocumentTemplate} from \"./template.js\";\nimport {getDocument} from \"./util.js\";\n\n\n/**\n * The updater class connects an object with the dom. in this way, structures and contents in the DOM can be programmatically adapted via attributes.\n *\n * For example, to include a string from an object, the attribute `data-monster-replace` can be used.\n *\n * you can call the method via the monster namespace `new Monster.DOM.Updater()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/updater.js';\n * console.log(new Monster.DOM.Updater())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/updater.js';\n * console.log(new Updater())\n * </script>\n * ```\n *\n * @example\n *\n * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/updater.js';\n *\n * // First we prepare the html document.\n * // This is done here via script, but can also be inserted into the document as pure html.\n * // To do this, simply insert the tag <h1 data-monster-replace=\"path:headline\"></h1>.\n * const body = document.querySelector('body');\n * const headline = document.createElement('h1');\n * headline.setAttribute('data-monster-replace','path:headline')\n * body.appendChild(headline);\n *\n * // the data structure\n * let obj = {\n * headline: \"Hello World\",\n * };\n *\n * // Now comes the real magic. we pass the updater the parent HTMLElement\n * // and the desired data structure.\n * const updater = new Updater(body, obj);\n * updater.run();\n *\n * // Now you can change the data structure and the HTML will follow these changes.\n * const subject = updater.getSubject();\n * subject['headline'] = \"Hello World!\"\n *\n * @since 1.8.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} the value is not iterable\n * @throws {Error} pipes are not allowed when cloning a node.\n * @throws {Error} no template was found with the specified key.\n * @throws {Error} the maximum depth for the recursion is reached.\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not an instance of HTMLElement\n */\nclass Updater extends Base {\n\n /**\n * @since 1.8.0\n * @param {HTMLElement} element\n * @param {object|ProxyObserver|undefined} subject\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not an instance of HTMLElement\n */\n constructor(element, subject) {\n super();\n\n /**\n * @type {HTMLElement}\n */\n this.element = validateInstance(element, HTMLElement);\n\n if (subject === undefined) subject = {}\n let a = subject;\n if (!isInstance(subject, ProxyObserver)) {\n subject = new ProxyObserver(subject);\n }\n\n this.last = {};\n this.callbacks = new Map();\n this.callbacks.set('checkstate', getCheckStateCallback.call(this));\n\n /**\n * @type {object}\n */\n this.subject = subject.attachObserver(new Observer(() => {\n\n const s = this.subject.getRealSubject();\n\n const diff = Diff(this.last, s)\n this.last = clone(s);\n\n for (const [, change] of Object.entries(diff)) {\n removeElement.call(this, change);\n insertElement.call(this, change);\n updateContent.call(this, change);\n updateAttributes.call(this, change);\n }\n }));\n\n this.eventTypes = ['keyup', 'click', 'change', 'drop', 'touchend', 'input'];\n\n }\n\n /**\n * Defaults: 'keyup', 'click', 'change', 'drop', 'touchend'\n *\n * @see https://developer.mozilla.org/de/docs/Web/Events\n * @since 1.9.0\n * @param {Array} types\n * @return {Updater}\n */\n setEventTypes(types) {\n this.eventTypes = validateArray(types);\n return this;\n }\n\n /**\n *\n * @since 1.9.0\n * @return {Updater}\n */\n enableEventProcessing() {\n this.disableEventProcessing();\n\n for (const type of this.eventTypes) {\n this.element.addEventListener(type, getControlEventHandler.call(this));\n }\n\n return this;\n\n }\n\n /**\n *\n * @since 1.9.0\n * @return {Updater}\n */\n disableEventProcessing() {\n\n for (const type of this.eventTypes) {\n this.element.removeEventListener(type, getControlEventHandler.call(this));\n }\n\n return this;\n\n }\n\n // /**\n // * \n // * @param {string} path\n // * @param {*} value\n // * @param {boolean} notifyAnyway\n // * @return {Updater}\n // * @since 1.15.0\n // */\n // setVia(path, value, notifyAnyway) {\n // if(isBoolean(notifyAnyway)&¬ifyAnyway===true) {\n // // the key __init__has no further meaning and is only \n // // used to create the diff for empty objects.\n // new Pathfinder(this.last).setVia(path, {'__init__': true});\n // \n // }\n //\n // new Pathfinder(this.subject.getSubject()).setVia(path, value);\n // return this;\n // }\n\n /**\n * Let the magic begin\n *\n * The run method must be called for the update to start working.\n *\n * @return {Promise}\n */\n run() {\n // the key __init__has no further meaning and is only \n // used to create the diff for empty objects.\n this.last = {'__init__': true};\n return this.subject.notifyObservers();\n }\n\n /**\n * If you have passed a ProxyObserver in the constructor, you will get the same object here.\n * However, if you have passed a simple object, you will get the ProxyObserver here.\n *\n * For changes the ProxyObserver must be used.\n *\n * @since 1.8.0\n * @return {ProxyObserver}\n */\n getSubject() {\n return this.subject.getSubject();\n }\n\n /**\n * This method can be used to register commands that can be called via call: instruction.\n * This can be used to provide a pipe with its own functionality.\n *\n * @param {string} name\n * @param {function} callback\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback) {\n this.callbacks.set(name, callback);\n return this;\n }\n\n}\n\n/**\n * @private\n * @since 1.9.0\n * @return {function}\n */\nfunction getCheckStateCallback() {\n const self = this;\n\n return function (current) {\n\n if (this instanceof HTMLInputElement) {\n if (['radio', 'checkbox'].indexOf(this.type) !== -1) {\n return (this.value + \"\" === current + \"\") ? 'true' : undefined\n }\n } else if (this instanceof HTMLOptionElement) {\n\n if (isArray(current) && current.indexOf(this.value) !== -1) {\n return 'true'\n }\n return undefined;\n\n\n }\n }\n}\n\n/**\n * @private\n */\nconst symbol = Symbol('EventHandler');\n\n/**\n * @private\n * @return {function}\n */\nfunction getControlEventHandler() {\n\n const self = this;\n\n if (self[symbol]) {\n return self[symbol];\n }\n\n const pathfinder = new Pathfinder(this.subject.getSubject());\n\n /**\n * @throws {Error} the bind argument must start as a value with a path.\n * @throws {Error} unsupported object\n * @param {Event} event\n */\n self[symbol] = (event) => {\n const element = event.target;\n\n if (!element.hasAttribute(ATTRIBUTE_UPDATER_BIND)) {\n return;\n }\n\n let path = element.getAttribute(ATTRIBUTE_UPDATER_BIND);\n\n if (path.indexOf('path:') !== 0) {\n throw new Error('the bind argument must start as a value with a path.');\n }\n\n path = path.substr(5);\n\n let value;\n\n if (element instanceof HTMLInputElement) {\n switch (element.type) {\n\n case 'checkbox':\n value = element.checked ? element.value : undefined;\n break;\n default:\n value = element.value;\n break;\n\n\n }\n } else if (element instanceof HTMLTextAreaElement) {\n value = element.value;\n\n } else if (element instanceof HTMLSelectElement) {\n\n switch (element.type) {\n case 'select-one':\n value = element.value;\n break;\n case 'select-multiple':\n value = element.value;\n\n let options = element?.selectedOptions;\n if (options === undefined) options = element.querySelectorAll(\":scope option:checked\");\n value = Array.from(options).map(({value}) => value);\n\n break;\n }\n\n\n // values from customelements \n } else if ((element?.constructor?.prototype && !!Object.getOwnPropertyDescriptor(element.constructor.prototype, 'value')?.['get']) || element.hasOwnProperty('value')) {\n value = element?.['value'];\n } else {\n throw new Error(\"unsupported object\");\n }\n\n const copy = clone(self.subject.getRealSubject());\n const pf = new Pathfinder(copy);\n pf.setVia(path, value);\n\n const diff = new Diff(copy, self.subject.getRealSubject());\n\n if (diff.length > 0) {\n pathfinder.setVia(path, value);\n }\n\n }\n\n return self[symbol];\n\n\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {object} change\n * @return {void}\n */\nfunction removeElement(change) {\n for (const [, element] of this.element.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_REMOVE + ']').entries()) {\n element.parentNode.removeChild(element);\n }\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {object} change\n * @return {void}\n * @throws {Error} the value is not iterable\n * @throws {Error} pipes are not allowed when cloning a node.\n * @throws {Error} no template was found with the specified key.\n * @throws {Error} the maximum depth for the recursion is reached.\n */\nfunction insertElement(change) {\n const self = this;\n const subject = self.subject.getRealSubject();\n const document = getDocument();\n\n let mem = new WeakSet;\n let wd = 0;\n\n\n while (true) {\n let found = false;\n wd++;\n\n let p = clone(change?.['path']);\n if (!isArray(p)) return this;\n\n while (p.length > 0) {\n const current = p.join('.');\n const list = this.element.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_INSERT + '*=\"path:' + current + '\"]').entries()\n\n for (const [, containerElement] of list) {\n\n if (mem.has(containerElement)) continue;\n mem.add(containerElement)\n\n found = true;\n\n const attributes = containerElement.getAttribute(ATTRIBUTE_UPDATER_INSERT);\n let def = attributes.trim();\n let i = def.indexOf(' ');\n let key = def.substr(0, i).trim();\n let refPrefix = key + '-';\n let cmd = def.substr(i).trim();\n\n // this case is actually excluded by the query but is nevertheless checked again here\n if (cmd.indexOf('|') > 0) {\n throw new Error(\"pipes are not allowed when cloning a node.\");\n }\n\n let pipe = new Pipe(cmd);\n this.callbacks.forEach((f, n) => {\n pipe.setCallback(n, f);\n })\n\n let value = pipe.run(subject)\n let dataPath = cmd.split(':').pop();\n\n let insertPoint;\n if (containerElement.hasChildNodes()) {\n insertPoint = containerElement.lastChild;\n }\n\n if (!isIterable(value)) {\n throw new Error('the value is not iterable');\n }\n\n let available = new Set;\n\n for (const [i, obj] of Object.entries(value)) {\n let ref = refPrefix + i;\n let currentPath = dataPath + \".\" + i;\n\n available.add(ref);\n let refElement = containerElement.querySelector('[' + ATTRIBUTE_UPDATER_INSERT_REFERENCE + '=\"' + ref + '\"]');\n\n if (refElement instanceof HTMLElement) {\n insertPoint = refElement;\n continue;\n }\n\n appendNewDocumentFragment(containerElement, key, ref, currentPath);\n }\n\n let nodes = containerElement.querySelectorAll('[' + ATTRIBUTE_UPDATER_INSERT_REFERENCE + '*=\"' + refPrefix + '\"]');\n for (const [, node] of Object.entries(nodes)) {\n if (!available.has(node.getAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {\n containerElement.removeChild(node);\n }\n }\n }\n\n p.pop();\n }\n\n if (found === false) break;\n if (wd++ > 200) {\n throw new Error('the maximum depth for the recursion is reached.');\n }\n\n }\n\n\n}\n\n/**\n *\n * @private\n * @since 1.8.0\n * @param {HTMLElement} container\n * @param {string} key\n * @param {string} ref\n * @param {string} path\n * @throws {Error} no template was found with the specified key.\n */\nfunction appendNewDocumentFragment(container, key, ref, path) {\n\n let template = findDocumentTemplate(key, container);\n\n let nodes = template.createDocumentFragment();\n for (const [, node] of Object.entries(nodes.childNodes)) {\n if (node instanceof HTMLElement) {\n\n applyRecursive(node, key, path);\n node.setAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE, ref);\n }\n\n container.appendChild(node);\n }\n}\n\n/**\n * @private\n * @since 1.10.0\n * @param {HTMLElement} node\n * @param {string} key\n * @param {string} path\n * @return {void}\n */\nfunction applyRecursive(node, key, path) {\n\n if (node instanceof HTMLElement) {\n\n if (node.hasAttribute(ATTRIBUTE_UPDATER_REPLACE)) {\n let value = node.getAttribute(ATTRIBUTE_UPDATER_REPLACE);\n node.setAttribute(ATTRIBUTE_UPDATER_REPLACE, value.replace(\"path:\" + key, \"path:\" + path));\n }\n\n if (node.hasAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES)) {\n let value = node.getAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES);\n node.setAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES, value.replace(\"path:\" + key, \"path:\" + path));\n }\n\n for (const [, child] of Object.entries(node.childNodes)) {\n applyRecursive(child, key, path);\n }\n }\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {object} change\n * @return {void}\n */\nfunction updateContent(change) {\n const self = this;\n const subject = self.subject.getRealSubject();\n\n let p = clone(change?.['path']);\n runUpdateContent.call(this, this.element, p, subject);\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {HTMLElement} container\n * @param {array} parts\n * @param {object} subject\n * @return {void}\n */\nfunction runUpdateContent(container, parts, subject) {\n if (!isArray(parts)) return;\n parts = clone(parts);\n\n let mem = new WeakSet;\n\n while (parts.length > 0) {\n const current = parts.join('.');\n parts.pop();\n\n // Unfortunately, static data is always changed as well, since it is not possible to react to changes here.\n for (const [, element] of container.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_REPLACE + '^=\"path:' + current + '\"], [' + ATTRIBUTE_UPDATER_REPLACE + '^=\"static:\"]').entries()) {\n\n if (mem.has(element)) continue;\n mem.add(element)\n\n const attributes = element.getAttribute(ATTRIBUTE_UPDATER_REPLACE)\n let cmd = attributes.trim();\n\n let pipe = new Pipe(cmd);\n this.callbacks.forEach((f, n) => {\n pipe.setCallback(n, f);\n })\n\n let value = pipe.run(subject)\n\n if (value instanceof HTMLElement) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n element.addNode(value);\n } else {\n element.innerHTML = value;\n }\n\n }\n }\n\n}\n\n/**\n * @private\n * @since 1.8.0\n * @param {string} path\n * @param {object} change\n * @return {void}\n */\nfunction updateAttributes(change) {\n const subject = this.subject.getRealSubject();\n let p = clone(change?.['path']);\n runUpdateAttributes.call(this, this.element, p, subject);\n}\n\n/**\n * @private\n * @param {HTMLElement} container\n * @param {array} parts\n * @param {object} subject\n * @return {void}\n */\nfunction runUpdateAttributes(container, parts, subject) {\n\n const self = this;\n\n if (!isArray(parts)) return;\n parts = clone(parts);\n\n let mem = new WeakSet;\n\n while (parts.length > 0) {\n const current = parts.join('.');\n parts.pop();\n\n for (const [, element] of container.querySelectorAll(':scope [' + ATTRIBUTE_UPDATER_ATTRIBUTES + '*=\"path:' + current + '\"]').entries()) {\n\n if (mem.has(element)) continue;\n mem.add(element)\n\n const attributes = element.getAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES)\n\n for (let [, def] of Object.entries(attributes.split(','))) {\n def = def.trim();\n let i = def.indexOf(' ');\n let name = def.substr(0, i).trim();\n let cmd = def.substr(i).trim();\n\n let pipe = new Pipe(cmd);\n\n self.callbacks.forEach((f, n) => {\n pipe.setCallback(n, f, element);\n })\n\n let value = pipe.run(subject)\n\n if (value === undefined) {\n element.removeAttribute(name)\n\n } else if (element.getAttribute(name) !== value) {\n element.setAttribute(name, value);\n }\n\n handleInputControlAttributeUpdate.call(this, element, name, value);\n\n\n }\n }\n\n }\n\n}\n\n/**\n * @private\n * @param {HTMLElement|*} element\n * @param {string} name\n * @param {string|number|undefined} value\n * @return {void}\n */\n\nfunction handleInputControlAttributeUpdate(element, name, value) {\n const self = this;\n\n if (element instanceof HTMLSelectElement) {\n\n\n switch (element.type) {\n case 'select-multiple':\n\n for (const [index, opt] of Object.entries(element.options)) {\n if (value.indexOf(opt.value) !== -1) {\n opt.selected = true;\n } else {\n opt.selected = false;\n }\n }\n\n break;\n case 'select-one':\n // Only one value may be selected\n\n for (const [index, opt] of Object.entries(element.options)) {\n if (opt.value === value) {\n element.selectedIndex = index;\n break;\n }\n }\n\n break;\n }\n\n\n } else if (element instanceof HTMLInputElement) {\n switch (element.type) {\n\n case 'radio':\n if (name === 'checked' && value !== undefined) {\n element.checked = true;\n } else {\n element.checked = false;\n }\n\n break;\n\n case 'checkbox':\n if (name === 'checked' && value !== undefined) {\n element.checked = true;\n } else {\n element.checked = false;\n }\n\n break;\n case 'text':\n default:\n if (name === 'value') {\n element.value = (value === undefined ? \"\" : value);\n }\n\n break;\n\n\n }\n } else if (element instanceof HTMLTextAreaElement) {\n if (name === 'value') {\n element.value = (value === undefined ? \"\" : value);\n }\n }\n\n}\n\nassignToNamespace('Monster.DOM', Updater);\nexport {Monster, Updater}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getGlobal} from \"../types/global.js\";\nimport {validateString} from \"../types/validate.js\";\n\n\n/**\n * this method fetches the document object\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/util.js';\n * console.log(Monster.DOM.getDocument())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/util.js';\n * console.log(getDocument())\n * </script>\n * ```\n *\n * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).\n *\n * ```\n * import {JSDOM} from \"jsdom\"\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n *\n * [\n * 'self',\n * 'document',\n * 'Document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (getGlobal()[key] = window[key]));\n * }\n * ```\n *\n * @returns {object}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} not supported environment\n */\nfunction getDocument() {\n let document = getGlobal()?.['document'];\n if (typeof document !== 'object') {\n throw new Error(\"not supported environment\")\n }\n\n return document;\n}\n\n/**\n * this method fetches the window object\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/util.js';\n * console.log(Monster.DOM.getWindow())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/util.js';\n * console.log(getWindow(null))\n * </script>\n * ```\n *\n * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).\n *\n * ```\n * import {JSDOM} from \"jsdom\"\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n *\n * getGlobal()['window']=window;\n * \n * [\n * 'self',\n * 'document',\n * 'Document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (getGlobal()[key] = window[key]));\n * }\n * ```\n *\n * @returns {object}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} not supported environment\n */\nfunction getWindow() {\n let window = getGlobal()?.['window'];\n if (typeof window !== 'object') {\n throw new Error(\"not supported environment\")\n }\n\n return window;\n}\n\n\n/**\n *\n *\n * this method fetches the document object\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/util.js';\n * console.log(Monster.DOM.getDocumentFragmentFromString())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/util.js';\n * console.log(getDocumentFragmentFromString('<div></div>'))\n * </script>\n * ```\n *\n * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).\n *\n * ```\n * import {JSDOM} from \"jsdom\"\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n *\n * [\n * 'self',\n * 'document',\n * 'Document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (getGlobal()[key] = window[key]));\n * }\n * ```\n *\n * @returns {DocumentFragment}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} not supported environment\n * @throws {TypeError} value is not a string\n */\nfunction getDocumentFragmentFromString(html) {\n validateString(html);\n\n const document = getDocument();\n const template = document.createElement('template');\n template.innerHTML = html;\n\n return template.content;\n}\n\n\nassignToNamespace('Monster.DOM', getWindow, getDocument, getDocumentFragmentFromString);\nexport {Monster, getWindow, getDocument, getDocumentFragmentFromString}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {validateInstance, validateString} from \"../types/validate.js\";\nimport {findClosestByAttribute} from \"./attributes.js\";\nimport {getDocument} from \"./util.js\";\n\n/**\n * You can call the function via the monster namespace `new Monster.DOM.fireEvent()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/events.js';\n * console.log(new Monster.DOM.fireEvent())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/events.js';\n * console.log(fireEvent())\n * </script>\n * ```\n *\n * @param {HTMLElement|HTMLCollection|NodeList} element\n * @param {string} type\n * @return {void}\n * @since 1.10.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection\n */\nfunction fireEvent(element, type) {\n\n const document = getDocument();\n\n if (element instanceof HTMLElement) {\n\n if (type === 'click') {\n element.click();\n return;\n }\n\n let event = new Event(validateString(type), {\n bubbles: true,\n cancelable: true,\n });\n\n element.dispatchEvent(event);\n\n } else if (element instanceof HTMLCollection || element instanceof NodeList) {\n for (let e of element) {\n fireEvent(e, type);\n }\n } else {\n throw new TypeError('value is not an instance of HTMLElement or HTMLCollection')\n }\n\n}\n\n/**\n * This function gets the path `Event.composedPath()` from an event and tries to find the next element\n * up the tree `element.closest()` with the attribute and value. If no value is specified, only the attribute is searched.\n *\n * You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/events.js';\n * console.log(new Monster.DOM.findTargetElementFromEvent())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/events.js';\n * console.log(findTargetElementFromEvent())\n * </script>\n * ```\n *\n * @since 1.14.0\n * @param {Event} event\n * @param {string} attributeName\n * @param {string|null} attributeValue\n * @throws {Error} unsupported event\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not an instance of HTMLElement\n */\nfunction findTargetElementFromEvent(event, attributeName, attributeValue) {\n validateInstance(event, Event);\n\n if (typeof event.composedPath !== 'function') {\n throw new Error('unsupported event');\n }\n\n const path = event.composedPath();\n const element = path?.[0];\n\n if (element instanceof HTMLElement) {\n return findClosestByAttribute(element, attributeName, attributeValue);\n }\n\n return undefined;\n\n}\n\n\nassignToNamespace('Monster.DOM', findTargetElementFromEvent, fireEvent);\nexport {Monster, findTargetElementFromEvent, fireEvent}\n","'use strict';\n\nimport {parseLocale} from \"../i18n/locale.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getDocument} from \"./util.js\";\n\n/**\n * @type {string}\n */\nconst DEFAULT_LANGUAGE = 'en';\n\n/**\n * With this function you can read the language version set by the document.\n * For this the attibute `lang` in the html tag is read. If no attribute is set, `en` is used as default.\n *\n * You can call the function via the monster namespace `new Monster.DOM.getLocaleOfDocument()`.\n *\n * ```\n * <script type=\"module\">\n * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/locale.js';\n * console.log(new Monster.DOM.getLocaleOfDocument())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/dom/locale.js';\n * console.log(new getLocaleOfDocument())\n * </script>\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not a string\n * @throws {Error} unsupported locale\n */\nfunction getLocaleOfDocument() {\n\n const document = getDocument();\n\n let html = document.querySelector('html')\n if (html instanceof HTMLElement && html.hasAttribute('lang')) {\n let locale = html.getAttribute('lang');\n if (locale) {\n return new parseLocale(locale)\n }\n }\n\n return parseLocale(DEFAULT_LANGUAGE);\n}\n\nassignToNamespace('Monster.DOM', getLocaleOfDocument);\nexport {Monster, getLocaleOfDocument}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from \"../types/base.js\";\nimport {validateString} from \"../types/validate.js\";\nimport {clone} from \"../util/clone.js\";\n\n/**\n * @type {symbol}\n */\nconst propertiesSymbol = Symbol('properties');\n\n/**\n * @type {symbol}\n */\nconst localeStringSymbol = Symbol('localeString');\n\n/**\n * You can call the method via the monster namespace `new Monster.I18n.Locale()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';\n * console.log(new Monster.I18n.Locale())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';\n * console.log(new Locale())\n * </script>\n * ```\n *\n * RFC\n *\n * ```\n * A Language-Tag consists of:\n * langtag ; generated tag\n * -or- private-use ; a private use tag\n *\n * langtag = (language\n * [\"-\" script]\n * [\"-\" region]\n * *(\"-\" variant)\n * *(\"-\" extension)\n * [\"-\" privateuse])\n *\n * language = \"en\", \"ale\", or a registered value\n *\n * script = \"Latn\", \"Cyrl\", \"Hant\" ISO 15924 codes\n *\n * region = \"US\", \"CS\", \"FR\" ISO 3166 codes\n * \"419\", \"019\", or UN M.49 codes\n *\n * variant = \"rozaj\", \"nedis\", \"1996\", multiple subtags can be used in a tag\n *\n * extension = single letter followed by additional subtags; more than one extension\n * may be used in a language tag\n *\n * private-use = \"x-\" followed by additional subtags, as many as are required\n * Note that these can start a tag or appear at the end (but not\n * in the middle)\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Locale extends Base {\n\n /**\n * @param {string|undefined} language\n * @param {string|undefined} region\n * @param {string|undefined} script\n * @param {string|undefined} variants\n * @param {string|undefined} extlang\n * @param {string|undefined} privateUse\n * @throws {Error} unsupported locale\n */\n constructor(language, region, script, variants, extlang, privateUse) {\n super();\n\n this[propertiesSymbol] = {\n language: (language === undefined) ? undefined : validateString(language),\n script: (script === undefined) ? undefined : validateString(script),\n region: (region === undefined) ? undefined : validateString(region),\n variants: (variants === undefined) ? undefined : validateString(variants),\n extlang: (extlang === undefined) ? undefined : validateString(extlang),\n privateUse: (privateUse === undefined) ? undefined : validateString(privateUse),\n };\n\n let s = [];\n if (language !== undefined) s.push(language);\n if (script !== undefined) s.push(script);\n if (region !== undefined) s.push(region);\n if (variants !== undefined) s.push(variants);\n if (extlang !== undefined) s.push(extlang);\n if (privateUse !== undefined) s.push(privateUse);\n\n if (s.length === 0) {\n throw new Error('unsupported locale');\n }\n\n this[localeStringSymbol] = s.join('-');\n\n }\n\n /**\n * @return {string}\n */\n get localeString() {\n return this[localeStringSymbol];\n }\n\n /**\n * @return {string|undefined}\n */\n get language() {\n return this[propertiesSymbol].language;\n }\n\n /**\n * @return {string|undefined}\n */\n get region() {\n return this[propertiesSymbol].region;\n }\n\n /**\n * @return {string|undefined}\n */\n get script() {\n return this[propertiesSymbol].script;\n }\n\n /**\n * @return {string|undefined}\n */\n get variants() {\n return this[propertiesSymbol].variants;\n }\n\n /**\n * @return {string|undefined}\n */\n get extlang() {\n return this[propertiesSymbol].extlang;\n }\n\n /**\n * @return {string|undefined}\n */\n get privateUse() {\n return this[propertiesSymbol].privateValue;\n }\n\n\n /**\n * @return {string}\n */\n toString() {\n return \"\" + this.localeString;\n }\n\n /**\n * @return {object}\n */\n getMap() {\n return clone(this[propertiesSymbol])\n }\n\n\n}\n\n\n/**\n * Parse local according to rfc4646 standard\n *\n * Limitations: The regex cannot handle multiple variants or private.\n *\n * You can call the method via the monster namespace `Monster.I18n.createLocale()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';\n * console.log(new Monster.I18n.createLocale())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/locale.js';\n * console.log(createLocale())\n * </script>\n * ```\n *\n * RFC\n *\n * ```\n * The syntax of the language tag in ABNF [RFC4234] is:\n *\n * Language-Tag = langtag\n * / privateuse ; private use tag\n * / grandfathered ; grandfathered registrations\n *\n * langtag = (language\n * [\"-\" script]\n * [\"-\" region]\n * *(\"-\" variant)\n * *(\"-\" extension)\n * [\"-\" privateuse])\n *\n * language = (2*3ALPHA [ extlang ]) ; shortest ISO 639 code\n * / 4ALPHA ; reserved for future use\n * / 5*8ALPHA ; registered language subtag\n *\n * extlang = *3(\"-\" 3ALPHA) ; reserved for future use\n *\n * script = 4ALPHA ; ISO 15924 code\n *\n * region = 2ALPHA ; ISO 3166 code\n * / 3DIGIT ; UN M.49 code\n *\n * variant = 5*8alphanum ; registered variants\n * / (DIGIT 3alphanum)\n *\n * extension = singleton 1*(\"-\" (2*8alphanum))\n *\n * singleton = %x41-57 / %x59-5A / %x61-77 / %x79-7A / DIGIT\n * ; \"a\"-\"w\" / \"y\"-\"z\" / \"A\"-\"W\" / \"Y\"-\"Z\" / \"0\"-\"9\"\n * ; Single letters: x/X is reserved for private use\n *\n * privateuse = (\"x\"/\"X\") 1*(\"-\" (1*8alphanum))\n *\n * grandfathered = 1*3ALPHA 1*2(\"-\" (2*8alphanum))\n * ; grandfathered registration\n * ; Note: i is the only singleton\n * ; that starts a grandfathered tag\n *\n * alphanum = (ALPHA / DIGIT) ; letters and numbers\n *\n * Figure 1: Language Tag ABNF\n * ```\n *\n * @param {string} locale\n * @returns {Locale}\n * @since 1.14.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @throws {TypeError} value is not a string\n * @throws {Error} unsupported locale\n */\nfunction parseLocale(locale) {\n\n locale = validateString(locale).replace(/_/g, \"-\");\n\n let language, region, variants, parts, script, extlang,\n regexRegular = \"(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)\",\n regexIrregular = \"(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)\",\n regexGrandfathered = \"(\" + regexIrregular + \"|\" + regexRegular + \")\",\n regexPrivateUse = \"(x(-[A-Za-z0-9]{1,8})+)\",\n regexSingleton = \"[0-9A-WY-Za-wy-z]\",\n regexExtension = \"(\" + regexSingleton + \"(-[A-Za-z0-9]{2,8})+)\",\n regexVariant = \"([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3})\",\n regexRegion = \"([A-Za-z]{2}|[0-9]{3})\",\n regexScript = \"([A-Za-z]{4})\",\n regexExtlang = \"([A-Za-z]{3}(-[A-Za-z]{3}){0,2})\",\n regexLanguage = \"(([A-Za-z]{2,3}(-\" + regexExtlang + \")?)|[A-Za-z]{4}|[A-Za-z]{5,8})\",\n regexLangtag = \"(\" + regexLanguage + \"(-\" + regexScript + \")?\" + \"(-\" + regexRegion + \")?\" + \"(-\" + regexVariant + \")*\" + \"(-\" + regexExtension + \")*\" + \"(-\" + regexPrivateUse + \")?\" + \")\",\n regexLanguageTag = \"^(\" + regexGrandfathered + \"|\" + regexLangtag + \"|\" + regexPrivateUse + \")$\",\n regex = new RegExp(regexLanguageTag), match;\n\n\n if ((match = regex.exec(locale)) !== null) {\n if (match.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n }\n\n if (match === undefined || match === null) {\n throw new Error('unsupported locale');\n }\n\n if (match[6] !== undefined) {\n language = match[6];\n\n parts = language.split('-');\n if (parts.length > 1) {\n language = parts[0];\n extlang = parts[1];\n }\n\n }\n\n if (match[14] !== undefined) {\n region = match[14];\n }\n\n if (match[12] !== undefined) {\n script = match[12];\n }\n\n if (match[16] !== undefined) {\n variants = match[16];\n }\n\n return new Locale(language, region, script, variants, extlang);\n\n}\n\n\nassignToNamespace('Monster.I18n', Locale, parseLocale);\nexport {Monster, Locale, parseLocale}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {BaseWithOptions} from \"../types/basewithoptions.js\";\nimport {Locale} from \"./locale.js\"\nimport {Translations} from \"./translations.js\"\n\n/**\n * A provider makes a translation object available.\n *\n * You can call the method via the monster namespace `new Monster.I18n.Provider()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/provider.js';\n * console.log(new Monster.I18n.Provider())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/provider.js';\n * console.log(new Provider())\n * </script>\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Provider extends BaseWithOptions {\n\n /**\n * @param {Locale|string} locale\n * @return {Promise}\n */\n getTranslations(locale) {\n return new Promise((resolve, reject) => {\n try {\n resolve(new Translations(locale));\n } catch (e) {\n reject(e);\n }\n\n });\n }\n\n}\n\n\nassignToNamespace('Monster.I18n', Provider);\nexport {Monster, Provider}\n","'use strict';\n\nimport {PROPERTY_KEY_INTERNALDATA} from \"../constants.js\";\nimport {extend} from \"../data/extend.js\";\nimport {Pathfinder} from \"../data/pathfinder.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from \"./base.js\";\nimport {validateObject} from \"./validate.js\";\n\n/**\n * @private\n * @type {symbol}\n */\nconst optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);\n\n/**\n * This is the base class with options from which some monster classes are derived.\n *\n * You can call the method via the monster namespace `new Monster.Types.BaseWithOptions()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/basewithoptions.js';\n * console.log(new Monster.Types.BaseWithOptions())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/basewithoptions.js';\n * console.log(new BaseWithOptions())\n * </script>\n * ```\n *\n * The class was formerly called Object.\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass BaseWithOptions extends Base {\n\n /**\n *\n * @param {object} options\n */\n constructor(options) {\n super();\n\n if (options === undefined) {\n options = {};\n }\n\n this[optionsSymbol] = extend({}, this.defaults, validateObject(options));\n\n }\n\n /**\n * can be overridden by child class values\n *\n * @return {object}\n */\n get defaults() {\n return {}\n }\n\n /**\n * nested options can be specified by path `a.b.c`\n *\n * @param {string} path\n * @param {*} defaultValue\n * @return {*}\n * @since 1.10.0\n */\n getOption(path, defaultValue) {\n let value;\n\n try {\n value = new Pathfinder(this[optionsSymbol]).getVia(path);\n } catch (e) {\n\n }\n\n if (value === undefined) return defaultValue;\n return value;\n }\n\n\n}\n\nassignToNamespace('Monster.Types', BaseWithOptions);\nexport {Monster, BaseWithOptions}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from \"../types/base.js\";\nimport {isObject, isString} from \"../types/is.js\";\nimport {validateInstance, validateInteger, validateObject, validateString} from \"../types/validate.js\";\nimport {Locale, parseLocale} from \"./locale.js\";\n\n\n/**\n * With this class you can manage translations and access the keys.\n *\n * You can call the method via the monster namespace `new Monster.I18n.Translations()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/translations.js';\n * console.log(new Monster.I18n.Translations())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/translations.js';\n * console.log(new Translations())\n * </script>\n * ```\n *\n * @example\n *\n * const translation = new Translations(parseLocale('en-GB'));\n *\n * translation.assignTranslations({\n * text1: \"abc\",\n * text2: {'other': 'xyz'}\n * });\n *\n * translation.getText('text1);\n * translation.getPluralRuleText('text1',2);\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Translations extends Base {\n\n /**\n *\n * @param {Locale} locale\n */\n constructor(locale) {\n super();\n\n if (isString(locale)) {\n locale = parseLocale(locale);\n }\n\n this.locale = validateInstance(locale, Locale);\n this.storage = new Map();\n\n }\n\n\n /**\n * Fetches a text using the specified key.\n * If no suitable key is found, `defaultText` is taken.\n *\n * @param {string} key\n * @param {string|undefined} defaultText\n * @return {string}\n * @throws {Error} key not found\n */\n getText(key, defaultText) {\n if (!this.storage.has(key)) {\n if (defaultText === undefined) {\n throw new Error('key ' + key + ' not found');\n }\n\n return validateString(defaultText);\n }\n\n let r = this.storage.get(key);\n if (isObject(r)) {\n return this.getPluralRuleText(key, 'other', defaultText);\n }\n\n return this.storage.get(key);\n }\n\n /**\n * A number `count` can be passed to this method. In addition to a number, one of the keywords can also be passed directly.\n * \"zero\", \"one\", \"two\", \"few\", \"many\" and \"other\". Remember: not every language has all rules.\n *\n * The appropriate text for this number is then selected. If no suitable key is found, `defaultText` is taken.\n *\n * @param {string} key\n * @param {integer|count} count\n * @param {string|undefined} defaultText\n * @return {string}\n */\n getPluralRuleText(key, count, defaultText) {\n if (!this.storage.has(key)) {\n return validateString(defaultText);\n }\n\n let r = validateObject(this.storage.get(key));\n\n let keyword;\n if (isString(count)) {\n keyword = count.toLocaleString();\n } else {\n count = validateInteger(count);\n if (count === 0) {\n // special handlig for zero count\n if (r.hasOwnProperty('zero')) {\n return validateString(r['zero']);\n }\n }\n\n keyword = new Intl.PluralRules(this.locale.toString()).select(validateInteger(count));\n }\n\n if (r.hasOwnProperty(keyword)) {\n return validateString(r[keyword]);\n }\n\n if (r.hasOwnProperty(DEFAULT_KEY)) {\n return validateString(r[DEFAULT_KEY]);\n }\n\n return validateString(defaultText);\n }\n\n /**\n * Set a text for a key\n *\n * ```\n * translations.setText(\"text1\": \"Make my day!\");\n * // plural rules\n * translations.setText(\"text6\": {\n * \"zero\": \"There are no files on Disk.\",\n * \"one\": \"There is one file on Disk.\",\n * \"other\": \"There are files on Disk.\"\n * \"default\": \"There are files on Disk.\"\n * });\n * ```\n *\n * @param {string} key\n * @param {string|object} text\n * @return {Translations}\n * @throws {TypeError} value is not a string or object\n */\n setText(key, text) {\n\n if (isString(text) || isObject(text)) {\n this.storage.set(validateString(key), text);\n return this;\n }\n\n throw new TypeError('value is not a string or object');\n\n }\n\n /**\n * This method can be used to transfer overlays from an object. The keys are transferred and the values are entered as text.\n *\n * The values can either be character strings or, in the case of texts with plural forms, objects. The plural forms must be stored as text via a standard key \"zero\", \"one\", \"two\", \"few\", \"many\" and \"other\".\n *\n * Additionally, the key default can be specified, which will be used if no other key fits.\n *\n * In some languages, like for example in german, there is no own more number at the value 0. In these languages the function applies additionally zero.\n *\n * ```\n * translations.assignTranslations({\n * \"text1\": \"Make my day!\",\n * \"text2\": \"I'll be back!\",\n * \"text6\": {\n * \"zero\": \"There are no files on Disk.\",\n * \"one\": \"There is one file on Disk.\",\n * \"other\": \"There are files on Disk.\"\n * \"default\": \"There are files on Disk.\"\n * });\n * ```\n *\n * @param {object} translations\n * @return {Translations}\n */\n assignTranslations(translations) {\n validateObject(translations);\n\n for (const [k, v] of Object.entries(translations)) {\n this.setText(k, v);\n }\n\n return this;\n\n }\n\n}\n\n\nassignToNamespace('Monster.I18n', Translations);\nexport {Monster, Translations}\n","'use strict';\n\nimport {PROPERTY_KEY_INTERNALDATA} from \"../../constants.js\";\nimport {extend} from \"../../data/extend.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../../namespace.js';\nimport {Formatter} from \"../../text/formatter.js\";\nimport {getGlobalFunction} from \"../../types/global.js\";\nimport {isInstance, isString} from \"../../types/is.js\";\nimport {validateObject, validateString} from \"../../types/validate.js\";\nimport {parseLocale} from \"../locale.js\";\nimport {Provider} from \"../provider.js\";\nimport {Translations} from \"../translations.js\";\n\n/**\n * @private\n * @type {symbol}\n */\nconst optionsSymbol = Symbol.for(PROPERTY_KEY_INTERNALDATA);\n\n/**\n * The fetch provider retrieves a JSON file from the given URL and returns a translation object.\n *\n * You can call the method via the monster namespace `new Monster.I18n.Provider()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/providers/fetch.js';\n * console.log(new Monster.I18n.Providers.Fetch())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/i18n/providers/fetch.js';\n * console.log(new Fetch())\n * </script>\n * ```\n *\n * @since 1.13.0\n * @copyright schukai GmbH\n * @memberOf Monster/I18n/Providers\n * @see https://datatracker.ietf.org/doc/html/rfc3066\n */\nclass Fetch extends Provider {\n\n /**\n * As options the key `fetch` can be passed. This config object is passed to the fetch method as init.\n *\n * @param {string|URL} url\n * @param {object} options\n * @see https://developer.mozilla.org/en-US/docs/Web/API/fetch\n */\n constructor(url, options) {\n super(options);\n\n if (isInstance(url, URL)) {\n url = url.toString();\n }\n\n if (options === undefined) {\n options = {};\n }\n\n validateString(url);\n\n this.url = url;\n this[optionsSymbol] = extend({}, super.defaults, this.defaults, validateObject(options));\n\n }\n\n /**\n * Defaults\n * @return {object}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\n get defaults() {\n\n return {\n fetch: {\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\n mode: 'cors', // no-cors, *cors, same-origin\n cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached\n credentials: 'omit', // include, *same-origin, omit\n redirect: 'follow', // manual, *follow, error\n referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url\n }\n }\n\n }\n\n /**\n *\n * @param {Locale|string} locale\n * @return {Promise}\n */\n getTranslations(locale) {\n\n if (isString(locale)) {\n locale = parseLocale(locale);\n }\n\n let formatter = new Formatter(locale.getMap())\n\n return getGlobalFunction('fetch')(formatter.format(this.url), this.getOption('fetch', {}))\n .then((response) => response.json()).then(data => {\n return new Translations(locale).assignTranslations(data);\n });\n\n }\n\n\n}\n\n\nassignToNamespace('Monster.I18n.Providers', Fetch);\nexport {Monster, Fetch}\n","'use strict';\n\nimport {Pipe} from \"../data/pipe.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from \"../types/base.js\";\nimport {validateObject, validateString} from \"../types/validate.js\";\n\n\n/**\n * Messages can be formatted with the formatter. To do this, an object with the values must be passed to the formatter. The message can then contain placeholders.\n *\n * Look at the example below. The placeholders use the logic of Pipe.\n *\n * You can call the method via the monster namespace `new Monster.Text.Formatter()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/text/formatter.js';\n * console.log(new Monster.Text.Formatter())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/text/formatter.js';\n * console.log(new Formatter())\n * </script>\n * ```\n *\n * @example\n *\n * new Formatter({\n * a: {\n * b: {\n * c: \"Hello\"\n * },\n * d: \"world\",\n * }\n * }).format(\"${a.b.c} ${a.d | ucfirst}!\");\n *\n * // ↦ Hello World!\n *\n * @since 1.12.0\n * @copyright schukai GmbH\n * @memberOf Monster/Text\n */\nclass Formatter extends Base {\n\n /**\n * Default values for the markers are `${` and `}`\n *\n * @param {object} object\n * @throws {TypeError} value is not a object\n */\n constructor(object) {\n super();\n this.object = validateObject(object);\n this.openMarker = '${';\n this.closeMarker = '}';\n }\n\n /**\n * Set new Marker\n *\n * Default values for the markers are `${` and `}`\n *\n * ```\n * formatter.setMarker('#'); // open and close are both #\n * formatter.setMarker('[',']');\n * formatter.setMarker('i18n{','}');\n * ```\n *\n * @param {string} open\n * @param {string} close\n * @return {Formatter}\n * @since 1.12.0\n * @throws {TypeError} value is not a string\n */\n setMarker(open, close) {\n\n if (close === undefined) {\n close = open;\n }\n\n this.openMarker = validateString(open);\n this.closeMarker = validateString(close);\n return this;\n }\n\n /**\n *\n * @param {string} text\n * @return {string}\n * @throws {TypeError} value is not a string\n */\n format(text) {\n return tokenizer.call(this, validateString(text))\n }\n\n}\n\n/**\n * @private\n * @since 1.12.0\n * @param text\n * @return {string}\n */\nfunction tokenizer(text) {\n const self = this;\n\n let formatted = [];\n\n while (true) {\n\n\n let startIndex = text.indexOf(self.openMarker);\n // no marker \n if (startIndex === -1) {\n formatted.push(text);\n break;\n } else if (startIndex > 0) {\n formatted.push(text.substring(0, startIndex))\n text = text.substring(startIndex)\n }\n\n let endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker) + self.openMarker.length;\n\n if (endIndex === -1) {\n throw new Error(\"syntax error in formatter template\")\n return;\n }\n\n let command = \"path:\" + text.substring(self.openMarker.length, endIndex);\n\n formatted.push(validateString(new Pipe(command).run(self.object)));\n\n text = text.substring(endIndex + self.closeMarker.length);\n\n }\n\n return formatted.join('');\n}\n\nassignToNamespace('Monster.Text', Formatter);\nexport {Monster, Formatter}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {validateInstance, validateInteger} from \"../types/validate.js\";\nimport {LogEntry} from \"./logentry.js\";\nimport {ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN} from \"./logger.js\";\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Handler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler.js';\n * console.log(new Monster.Logging.Handler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler.js';\n * console.log(new Handler())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass Handler extends Base {\n constructor() {\n super();\n\n /**\n * Loglevel\n *\n * @type {integer}\n */\n this.loglevel = OFF;\n }\n\n /**\n * this is the central log function. this method must be\n * overwritten by derived handlers with their own logic.\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {LogEntry} entry\n * @returns {boolean}\n */\n log(entry) {\n validateInstance(entry, LogEntry);\n\n if (this.loglevel < entry.getLogLevel()) {\n return false;\n }\n\n return true;\n }\n\n /**\n * set loglevel\n *\n * @param {integer} loglevel\n * @returns {Handler}\n * @since 1.5.0\n */\n setLogLevel(loglevel) {\n validateInteger(loglevel)\n this.loglevel = loglevel;\n return this;\n }\n\n /**\n * get loglevel\n *\n * @returns {integer}\n * @since 1.5.0\n */\n getLogLevel() {\n return this.loglevel;\n }\n\n /**\n * Set log level to All\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setAll() {\n this.setLogLevel(ALL);\n return this;\n };\n\n /**\n * Set log level to Trace\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setTrace() {\n this.setLogLevel(TRACE);\n return this;\n };\n\n /**\n * Set log level to Debug\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setDebug() {\n this.setLogLevel(DEBUG);\n return this;\n };\n\n /**\n * Set log level to Info\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setInfo() {\n this.setLogLevel(INFO);\n return this;\n };\n\n /**\n * Set log level to Warn\n *\n * @returns {undefined}\n * @since 1.5.0\n */\n setWarn() {\n this.setLogLevel(WARN);\n return this;\n };\n\n /**\n * Set log level to Error\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setError() {\n this.setLogLevel(ERROR);\n return this;\n };\n\n /**\n * Set log level to Fatal\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setFatal() {\n this.setLogLevel(FATAL);\n return this;\n };\n\n\n /**\n * Set log level to Off\n *\n * @returns {Handler}\n * @since 1.5.0\n */\n setOff() {\n this.setLogLevel(OFF);\n return this;\n };\n\n\n}\n\n\nassignToNamespace('Monster.Logging', Handler);\nexport {Monster, Handler};\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {validateInteger} from '../types/validate.js';\n\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.LogEntry()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logentry.js';\n * console.log(new Monster.Logging.LogEntry())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logentry.js';\n * console.log(new LogEntry())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass LogEntry extends Base {\n /**\n *\n * @param {int} loglevel\n * @param {*} args\n */\n constructor(loglevel, ...args) {\n super();\n validateInteger(loglevel);\n\n this.loglevel = loglevel\n this.arguments = args\n }\n\n /**\n *\n * @returns {integerr}\n */\n getLogLevel() {\n return this.loglevel\n }\n\n /**\n *\n * @returns {array}\n */\n getArguments() {\n return this.arguments\n }\n\n}\n\nassignToNamespace('Monster.Logging', LogEntry);\nexport {Monster, LogEntry}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Handler} from '../logging/handler.js';\nimport {LogEntry} from '../logging/logentry.js';\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {validateInteger, validateObject, validateString} from '../types/validate.js';\n\n\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst ALL = 255;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst TRACE = 64;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst DEBUG = 32;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst INFO = 16;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst WARN = 8;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst ERROR = 4;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst FATAL = 2;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst OFF = 0;\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Logger()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logger.js';\n * console.log(new Monster.Logging.Logger())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/logger.js';\n * console.log(new Logger())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass Logger extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.handler = new Set;\n }\n\n /**\n *\n * @param {Handler} handler\n * @returns {Logger}\n * @throws {Error} the handler must be an instance of Handler\n */\n addHandler(handler) {\n validateObject(handler)\n if (!(handler instanceof Handler)) {\n throw new Error(\"the handler must be an instance of Handler\")\n }\n\n this.handler.add(handler)\n return this;\n }\n\n /**\n *\n * @param {Handler} handler\n * @returns {Logger}\n * @throws {Error} the handler must be an instance of Handler\n */\n removeHandler(handler) {\n validateObject(handler)\n if (!(handler instanceof Handler)) {\n throw new Error(\"the handler must be an instance of Handler\")\n }\n\n this.handler.delete(handler);\n return this;\n }\n\n /**\n * log Trace message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logTrace() {\n triggerLog.apply(this, [TRACE, ...arguments]);\n return this;\n };\n\n /**\n * log Debug message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logDebug() {\n triggerLog.apply(this, [DEBUG, ...arguments]);\n return this;\n };\n\n /**\n * log Info message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logInfo() {\n triggerLog.apply(this, [INFO, ...arguments]);\n return this;\n };\n\n /**\n * log Warn message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logWarn() {\n triggerLog.apply(this, [WARN, ...arguments]);\n return this;\n };\n\n /**\n * log Error message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logError() {\n triggerLog.apply(this, [ERROR, ...arguments]);\n return this;\n };\n\n /**\n * log Fatal message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logFatal() {\n triggerLog.apply(this, [FATAL, ...arguments]);\n return this;\n };\n\n\n /**\n * Labels\n *\n * @param {integer} level\n * @returns {string}\n */\n getLabel(level) {\n validateInteger(level);\n\n if (level === ALL) return 'ALL';\n if (level === TRACE) return 'TRACE';\n if (level === DEBUG) return 'DEBUG';\n if (level === INFO) return 'INFO';\n if (level === WARN) return 'WARN';\n if (level === ERROR) return 'ERROR';\n if (level === FATAL) return 'FATAL';\n if (level === OFF) return 'OFF';\n\n return 'unknown';\n };\n\n /**\n * Level\n *\n * @param {string} label\n * @returns {integer}\n */\n getLevel(label) {\n validateString(label);\n\n if (label === 'ALL') return ALL;\n if (label === 'TRACE') return TRACE;\n if (label === 'DEBUG') return DEBUG;\n if (label === 'INFO') return INFO;\n if (label === 'WARN') return WARN;\n if (label === 'ERROR') return ERROR;\n if (label === 'FATAL') return FATAL;\n if (label === 'OFF') return OFF;\n\n return 0;\n };\n\n\n}\n\nassignToNamespace('Monster.Logging', Logger);\nexport {Monster, Logger, ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF};\n\n\n/**\n * Log triggern\n *\n * @param {integer} loglevel\n * @param {*} args\n * @returns {Logger}\n * @private\n */\nfunction triggerLog(loglevel, ...args) {\n var logger = this;\n\n for (let handler of logger.handler) {\n handler.log(new LogEntry(loglevel, args))\n }\n\n return logger;\n\n}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Handler} from '../../logging/handler.js';\nimport {Base} from '../../types/base.js';\nimport {assignToNamespace, Monster} from '../namespace.js';\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Handler.ConsoleHandler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler/console.js';\n * console.log(new Monster.Logging.Handler.ConsoleHandler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/logging/handler/console.js';\n * console.log(new ConsoleHandler())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging/Handler\n */\nclass ConsoleHandler extends Base {\n constructor() {\n super();\n }\n}\n\n\nassignToNamespace('Monster.Logging', ConsoleHandler);\nexport {Monster, Handler};\n","'use strict';\n\n/**\n * Namespace for logging.\n *\n * @namespace Monster/Logging\n * @author schukai GmbH\n */\n\n\n/**\n * @private\n * @type {string}\n */\nconst namespace = \"Monster.Logging\";","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getGlobal} from '../types/global.js';\n\n\n/**\n * this function uses crypt and returns a random number.\n *\n * you can call the method via the monster namespace `Monster.Math.random()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/math/random.js';\n * console.log(Monster.Math.random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/math/random.js';\n * console.log(random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * @param {number} min starting value of the definition set (default is 0)\n * @param {number} max end value of the definition set (default is 1000000000)\n * @returns {number}\n * @memberOf Monster/Math\n * @throws {Error} missing crypt\n * @throws {Error} we cannot generate numbers larger than 53 bits.\n * @throws {Error} the distance is too small to create a random number.\n\n * @since 1.0.0\n * @copyright schukai GmbH\n */\nfunction random(min, max) {\n\n if (min === undefined) {\n min = 0;\n }\n if (max === undefined) {\n max = MAX;\n }\n\n if (max < min) {\n throw new Error(\"max must be greater than min\");\n }\n\n return Math.round(create(min, max));\n\n}\n\n/**\n * @private\n * @type {number}\n */\nvar MAX = 1000000000;\n\n\nMath.log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\n\n/**\n *\n * @param {number} min\n * @param {number} max\n * @returns {number}\n * @private\n * @throws {Error} missing crypt\n * @throws {Error} we cannot generate numbers larger than 53 bits.\n * @throws {Error} the distance is too small to create a random number.\n */\nfunction create(min, max) {\n let crypt;\n let globalReference = getGlobal();\n\n crypt = globalReference?.['crypto'] || globalReference?.['msCrypto'] || globalReference?.['crypto'] || undefined;\n\n if (typeof crypt === \"undefined\") {\n throw new Error(\"missing crypt\")\n }\n\n let rval = 0;\n const range = max - min;\n if (range < 2) {\n throw new Error('the distance is too small to create a random number.')\n }\n\n const bitsNeeded = Math.ceil(Math.log2(range));\n if (bitsNeeded > 53) {\n throw new Error(\"we cannot generate numbers larger than 53 bits.\");\n }\n const bytesNeeded = Math.ceil(bitsNeeded / 8);\n const mask = Math.pow(2, bitsNeeded) - 1;\n\n const byteArray = new Uint8Array(bytesNeeded);\n crypt.getRandomValues(byteArray);\n\n let p = (bytesNeeded - 1) * 8;\n for (var i = 0; i < bytesNeeded; i++) {\n rval += byteArray[i] * Math.pow(2, p);\n p -= 8;\n }\n\n rval = rval & mask;\n\n if (rval >= range) {\n return create(min, max);\n }\n\n return min + rval;\n\n}\n\nassignToNamespace('Monster.Math', random);\nexport {Monster, random}\n\n\n\n\n","'use strict';\n\nimport {random} from \"../math/random.js\";\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {getGlobal} from \"./global.js\";\nimport {ID} from \"./id.js\";\n\n/**\n * @private\n * @type {number}\n */\nlet internalCounter = 0;\n\n/**\n * You can call the method via the monster namespace `new Monster.Types.RandomID()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/randomid.js';\n * console.log(new Monster.Types.RandomID())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/randomid.js';\n * console.log(new RandomID())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass RandomID extends ID {\n\n /**\n * create new object\n */\n constructor() {\n super();\n\n internalCounter += 1;\n\n this.id = getGlobal().btoa(random(1, 10000))\n .replace(/=/g, '')\n /** No numbers at the beginning of the ID, because of possible problems with DOM */\n .replace(/^[0-9]+/, 'X') + internalCounter;\n }\n\n}\n\nassignToNamespace('Monster.Types', RandomID);\nexport {Monster, RandomID}\n","'use strict';\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from './base.js';\n\n/**\n * The version object contains a sematic version number\n *\n * You can create the object via the monster namespace `new Monster.Types.Version()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/version.js';\n * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this class individually.\n *\n * ```\n * <script type=\"module\">\n * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/version.js';\n * console.log(new Version('1.2.3')) // ↦ 1.2.3\n * console.log(new Version('1')) // ↦ 1.0.0\n * </script>\n * ```\n *\n * @example\n *\n * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/version.js';\n *\n * new Version('1.0.0') // ↦ 1.0.0\n * new Version(1) // ↦ 1.0.0\n * new Version(1, 0, 0) // ↦ 1.0.0\n * new Version('1.2.3', 4, 5) // ↦ 1.4.5\n *\n * @since 1.0.0\n * @author schukai GmbH\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Version extends Base {\n\n /**\n *\n * @param major\n * @param minor\n * @param patch\n * @throws {Error} major is not a number\n * @throws {Error} minor is not a number\n * @throws {Error} patch is not a number\n */\n constructor(major, minor, patch) {\n super();\n\n if (typeof major === 'string' && minor === undefined && patch === undefined) {\n\n let parts = major.toString().split('.');\n major = parseInt(parts[0] || 0);\n minor = parseInt(parts[1] || 0);\n patch = parseInt(parts[2] || 0);\n }\n\n if (major === undefined) {\n throw new Error(\"major version is undefined\");\n }\n\n if (minor === undefined) {\n minor = 0;\n }\n\n if (patch === undefined) {\n patch = 0;\n }\n\n this.major = parseInt(major);\n this.minor = parseInt(minor);\n this.patch = parseInt(patch);\n\n if (isNaN(this.major)) {\n throw new Error(\"major is not a number\");\n }\n\n if (isNaN(this.minor)) {\n throw new Error(\"minor is not a number\");\n }\n\n if (isNaN(this.patch)) {\n throw new Error(\"patch is not a number\");\n }\n\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.major + '.' + this.minor + '.' + this.patch;\n }\n\n /**\n * returns 0 if equal, -1 if the object version is less and 1 if greater\n * then the compared version\n *\n * @param {string|Version} version Version to compare\n * @returns {number}\n */\n compareTo(version) {\n\n if (version instanceof Version) {\n version = version.toString();\n }\n\n if (typeof version !== 'string') {\n throw new Error(\"type exception\");\n }\n\n if (version === this.toString()) {\n return 0;\n }\n\n let a = [this.major, this.minor, this.patch];\n let b = version.split('.');\n let len = Math.max(a.length, b.length);\n\n for (let i = 0; i < len; i += 1) {\n if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {\n return 1;\n } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {\n return -1;\n }\n }\n\n return 0;\n };\n\n}\n\nassignToNamespace('Monster.Types', Version);\n\n\nlet monsterVersion;\n\n/**\n * Version of monster\n *\n * You can call the method via the monster namespace `Monster.getVersion()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/version.js';\n * console.log(Monster.getVersion())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/types/version.js';\n * console.log(getVersion())\n * </script>\n * ```\n *\n * @returns {Monster.Types.Version}\n * @since 1.0.0\n * @copyright schukai GmbH\n * @author schukai GmbH\n * @memberOf Monster\n */\nfunction getVersion() {\n if (monsterVersion instanceof Version) {\n return monsterVersion;\n }\n /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('1.15.2')\n /**#@-*/\n\n return monsterVersion;\n\n}\n\nassignToNamespace('Monster', getVersion);\nexport {Monster, Version, getVersion}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {isFunction} from '../types/is.js';\n\n/**\n * The comparator allows a comparison function to be abstracted.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/comparator.js';\n * console.log(new Monster.Util.Comparator())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/comparator.js';\n * console.log(new Comparator())\n * </script>\n * ```\n *\n * The following are some examples of the application of the class.\n *\n * ```\n * new Comparator().lessThanOrEqual(2, 5) // ↦ true\n * new Comparator().greaterThan(4, 2) // ↦ true\n * new Comparator().equal(4, 4) // ↦ true\n * new Comparator().equal(4, 5) // ↦ false\n * ```\n *\n * You can also pass your own comparison function, and thus define the comparison function.\n *\n * ```\n * new Comparator(function (a, b) {\n * if (a.v === b.v) return 0;\n * return a.v < b.v ? -1 : 1;\n * }).equal({v: 2}, {v: 2}); // ↦ true\n * ```\n *\n * @example\n *\n * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/comparator.js';\n *\n * console.log(new Comparator().lessThanOrEqual(2, 5))\n * // ↦ true\n * console.log(new Comparator().greaterThan(4, 2))\n * // ↦ true\n * console.log(new Comparator().equal(4, 4))\n * // ↦ true\n * console.log(new Comparator().equal(4, 5))\n * // ↦ false\n *\n * @since 1.3.0\n * @memberOf Monster/Util\n */\nclass Comparator extends Base {\n\n /**\n * create new comparator\n *\n * @param {function} callback\n * @throw {TypeError} \"unsupported type\"\n * @throw {TypeError} \"impractical comparison\"\n */\n constructor(callback) {\n super();\n\n if (isFunction(callback)) {\n this.compare = callback\n } else if (callback !== undefined) {\n throw new TypeError(\"unsupported type\")\n } else {\n // default compare function\n this.compare = function (a, b) {\n\n if (typeof a !== typeof b) {\n throw new TypeError(\"impractical comparison\")\n }\n\n if (a === b) {\n return 0;\n }\n return a < b ? -1 : 1;\n };\n }\n\n }\n\n /**\n * changes the order of the operators\n *\n * @return {Comparator}\n */\n reverse() {\n const original = this.compare;\n this.compare = (a, b) => original(b, a);\n return this;\n }\n\n /**\n * Checks if two variables are equal.\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n equal(a, b) {\n return this.compare(a, b) === 0;\n }\n\n\n /**\n * Checks if variable `a` is greater than `b`\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n greaterThan(a, b) {\n return this.compare(a, b) > 0;\n }\n\n /**\n * Checks if variable `a` is greater than or equal to `b`\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n greaterThanOrEqual(a, b) {\n return this.greaterThan(a, b) || this.equal(a, b);\n }\n\n /**\n * Checks if variable `a` is less than or equal to `b`\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n lessThanOrEqual(a, b) {\n return this.lessThan(a, b) || this.equal(a, b);\n }\n\n /**\n * Checks if variable a is less than b\n *\n * @param {*} a\n * @param {*} b\n *\n * @return {boolean}\n */\n lessThan(a, b) {\n return this.compare(a, b) < 0;\n }\n\n\n}\n\nassignToNamespace('Monster.Util', Comparator);\nexport {Monster, Comparator}\n","'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {assignToNamespace, Monster} from '../namespace.js';\nimport {validateObject} from '../types/validate.js';\n\n/**\n * Deep freeze a object\n *\n * You can call the method via the monster namespace `Monster.Util.deepFreeze()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/freeze.js';\n * console.log(Monster.Util.deepFreeze({}))\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.2/dist/modules/util/freeze.js';\n * console.log(deepFreeze({}))\n * </script>\n * ```\n *\n * @param {object} obj object to be freeze\n * @since 1.0.0\n * @returns {object}\n * @memberOf Monster/Util\n * @copyright schukai GmbH\n * @throws {TypeError} value is not a object\n */\nfunction deepFreeze(object) {\n\n validateObject(object)\n\n // Retrieve the defined property names of the object\n var propNames = Object.getOwnPropertyNames(object);\n\n // Freeze properties before freezing yourself\n for (let name of propNames) {\n let value = object[name];\n\n object[name] = value && typeof value === \"object\" ?\n deepFreeze(value) : value;\n }\n\n return Object.freeze(object);\n}\n\nassignToNamespace('Monster.Util', deepFreeze);\nexport {Monster, deepFreeze}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * @license\n * Copyright 2021 schukai GmbH\n * SPDX-License-Identifier: AGPL-3.0-only or COMMERCIAL\n * @author schukai GmbH\n */\n\n'use strict';\n\nimport './constants.js';\nimport './constraints/abstract.js';\nimport './constraints/abstractoperator.js';\nimport './constraints/andoperator.js';\nimport './constraints/invalid.js';\nimport './constraints/isarray.js';\n\n// find packages/monster/source/ -type f -name \"*.js\" -not -name \"*namespace*\" -not -iname \"monster.js\"\nimport './constraints/isobject.js';\nimport './constraints/oroperator.js';\nimport './constraints/valid.js';\nimport './data/buildmap.js';\nimport './data/diff.js';\nimport './data/extend.js';\nimport './data/pathfinder.js';\nimport './data/pipe.js';\nimport './data/transformer.js';\nimport './dom/assembler.js';\nimport './dom/attributes.js';\nimport './dom/constants.js';\nimport './dom/customcontrol.js';\nimport './dom/customelement.js';\nimport './dom/events.js';\nimport './dom/locale.js';\nimport './dom/template.js';\nimport './dom/theme.js';\nimport './dom/updater.js';\nimport './dom/util.js';\nimport './i18n/locale.js';\nimport './i18n/provider.js';\nimport './i18n/providers/fetch.js';\nimport './i18n/translations.js';\nimport './logging/handler.js';\nimport './logging/handler/console.js';\nimport './logging/logentry.js';\nimport './logging/logger.js';\nimport './math/random.js';\nimport {Monster} from './namespace.js';\nimport './text/formatter.js';\nimport './types/base.js';\nimport './types/basewithoptions.js';\nimport './types/global.js';\nimport './types/id.js';\nimport './types/is.js';\nimport './types/observer.js';\nimport './types/observerlist.js';\nimport './types/proxyobserver.js';\nimport './types/queue.js';\nimport './types/randomid.js';\nimport './types/stack.js';\nimport './types/tokenlist.js';\nimport './types/typeof.js';\nimport './types/uniquequeue.js';\nimport './types/validate.js';\nimport './types/version.js';\nimport './util/clone.js';\nimport './util/comparator.js';\nimport './util/freeze.js';\n\n\nlet rootName\ntry {\n rootName = Monster.Types.getGlobalObject('__MonsterRootName__');\n} catch (e) {\n\n}\n\nif (!rootName) rootName = \"Monster\";\n\nMonster.Types.getGlobal()[rootName] = Monster\nexport {Monster};"],"names":["Monster","PROPERTY_KEY_INTERNALDATA","Namespace","namespace","undefined","Error","getNamespace","assignToNamespace","ns","current","namespaceFor","split","i","l","objectName","fn","hasOwnProperty","name","toString","s","f","match","Array","isArray","c","e","parts","space","length","Base","AbstractConstraint","value","Promise","reject","JSON","stringify","Object","AbstractOperator","operantA","operantB","TypeError","AndOperator","all","isValid","Invalid","IsArray","resolve","isIterable","Symbol","iterator","isPrimitive","type","NaN","isSymbol","isBoolean","isString","isObject","isInstance","instance","isFunction","isInteger","Number","IsObject","OrOperator","self","a","b","then","catch","Valid","validateString","Pathfinder","buildMap","subject","selector","valueTemplate","keyTemplate","filter","result","Map","finder","map","getVia","forEach","v","k","m","call","build","set","definition","defaultValue","regexp","array","matchAll","groups","placeholder","path","replaceAll","validateIterable","validatePrimitive","validateBoolean","validateObject","validateInstance","n","validateArray","validateSymbol","validateFunction","validateInteger","Stack","DELIMITER","WILDCARD","object","wildCard","wildcard","getValueViaPath","setValueViaPath","deleteValueViaPath","iterate","check","entries","key","shift","join","anchor","WeakMap","get","Set","WeakSet","parseInt","WeakRef","last","pop","subpath","stack","push","isEmpty","obj","peek","append","assignProperty","delete","data","Diff","first","second","doDiff","getKeys","keys","fill","_","concat","diff","typeA","typeB","currPath","currDiff","prototype","buildResult","o","getOperator","operator","getPrototypeOf","constructor","isNotEqual","Date","getTime","typeOf","extend","arguments","results","exec","toLowerCase","Transformer","Pipe","pipe","callback","context","t","setCallback","reduce","accumulator","transformer","currentIndex","run","getGlobal","ID","clone","args","disassemble","command","callbacks","transform","apply","regex","g","p","r","replace","trim","convertToString","toUpperCase","parse","encodeURIComponent","callbackName","has","window","unshift","doc","DOMParser","parseFromString","body","textContent","trueStatement","falseStatement","condition","firstchar","charAt","substr","btoa","prefix","suffix","start","end","substring","globalReference","globalThis","defineProperty","configurable","__monster__","Function","getGlobalObject","getGlobalFunction","internalCounter","count","id","copy","len","setTime","Element","HTMLDocument","DocumentFragment","globalContext","document","navigator","Proxy","cloneObject","getClone","Types","ProxyObserver","ATTRIBUTEPREFIX","Assembler","fragment","attributePrefix","cloneNode","Observer","ObserverList","realSubject","getHandler","objectMap","proxyMap","observers","observer","attach","detach","notify","contains","proxy","handler","target","receiver","Reflect","descriptor","getOwnPropertyDescriptor","writable","enumerable","deleteProperty","setPrototypeOf","object1","TokenList","UniqueQueue","tags","queue","tag","add","remove","setTimeout","poll","init","tokens","index","next","done","counter","token","clear","newToken","from","indexOf","splice","toggleValue","Queue","unique","pomises","update","ATTRIBUTE_OBJECTLINK","findClosestObjectLink","element","findClosestByAttribute","addToObjectLink","symbol","HTMLElement","addAttributeToken","removeObjectLink","removeAttributeToken","hasObjectLink","containsAttributeToken","getLinkedObjects","toggleAttributeToken","hasAttribute","setAttribute","getAttribute","toggle","replaceAttributeToken","to","clearAttributeTokens","closest","ATTRIBUTE_PREFIX","ATTRIBUTE_OPTIONS","DEFAULT_THEME","ATTRIBUTE_THEME_PREFIX","ATTRIBUTE_THEME_NAME","ATTRIBUTE_UPDATER_ATTRIBUTES","ATTRIBUTE_UPDATER_REPLACE","ATTRIBUTE_UPDATER_INSERT","ATTRIBUTE_UPDATER_INSERT_REFERENCE","ATTRIBUTE_UPDATER_REMOVE","ATTRIBUTE_UPDATER_BIND","ATTRIBUTE_ROLE","OBJECTLINK_KEY_UPDATER","CustomElement","internalSymbol","CustomControl","attachInternals","getInternal","labels","getTag","validity","validationMessage","willValidate","states","form","state","setFormValue","flags","message","setValidity","checkValidity","reportValidity","findDocumentTemplate","Template","Updater","internalDataSymbol","for","objectLinkSymbol","initMethodSymbol","assembleMethodSymbol","defaults","getOptionsFromAttributes","initOptionObserver","shadowMode","delegatesFocus","templates","main","attachObserver","detachObserver","containsObserver","getRealSubject","getSubject","setVia","options","parseOptionsJSON","elements","getOption","initShadowRoot","shadowRoot","childNodes","NodeList","initHtmlContent","updater","HTMLTemplateElement","u","enableEventProcessing","attrName","oldVal","newVal","setOptions","updaters","list","d","assign","template","appendChild","createDocumentFragment","html","innerHTML","attachShadow","mode","styleSheet","getCSSStyleSheet","CSSStyleSheet","adoptedStyleSheets","registerCustomElement","define","getDocumentTheme","content","currentNode","Document","Node","ownerDocument","theme","themedID","getName","getElementById","Theme","querySelector","getDocument","getCheckStateCallback","change","removeElement","insertElement","updateContent","updateAttributes","eventTypes","types","disableEventProcessing","addEventListener","getControlEventHandler","removeEventListener","notifyObservers","HTMLInputElement","HTMLOptionElement","pathfinder","event","checked","HTMLTextAreaElement","HTMLSelectElement","selectedOptions","querySelectorAll","pf","parentNode","removeChild","mem","wd","found","containerElement","attributes","def","refPrefix","cmd","dataPath","insertPoint","hasChildNodes","lastChild","available","ref","currentPath","refElement","appendNewDocumentFragment","nodes","node","container","applyRecursive","child","runUpdateContent","firstChild","addNode","runUpdateAttributes","removeAttribute","handleInputControlAttributeUpdate","opt","selected","selectedIndex","getWindow","getDocumentFragmentFromString","createElement","fireEvent","click","Event","bubbles","cancelable","dispatchEvent","HTMLCollection","findTargetElementFromEvent","attributeName","attributeValue","composedPath","parseLocale","DEFAULT_LANGUAGE","getLocaleOfDocument","locale","propertiesSymbol","localeStringSymbol","Locale","language","region","script","variants","extlang","privateUse","privateValue","localeString","regexRegular","regexIrregular","regexGrandfathered","regexPrivateUse","regexSingleton","regexExtension","regexVariant","regexRegion","regexScript","regexExtlang","regexLanguage","regexLangtag","regexLanguageTag","RegExp","lastIndex","BaseWithOptions","Translations","Provider","optionsSymbol","storage","defaultText","getPluralRuleText","keyword","toLocaleString","Intl","PluralRules","select","DEFAULT_KEY","text","translations","setText","Formatter","Fetch","url","URL","fetch","method","cache","credentials","redirect","referrerPolicy","formatter","getMap","format","response","json","assignTranslations","openMarker","closeMarker","open","close","tokenizer","formatted","startIndex","endIndex","LogEntry","ALL","DEBUG","ERROR","FATAL","INFO","OFF","TRACE","WARN","Handler","loglevel","entry","getLogLevel","setLogLevel","Logger","triggerLog","level","label","logger","log","ConsoleHandler","random","min","max","MAX","Math","round","create","log2","crypt","rval","range","bitsNeeded","ceil","bytesNeeded","mask","pow","byteArray","Uint8Array","getRandomValues","RandomID","Version","major","minor","patch","isNaN","version","monsterVersion","getVersion","Comparator","compare","original","greaterThan","equal","lessThan","deepFreeze","propNames","getOwnPropertyNames","freeze","rootName"],"sourceRoot":""}
|