@ezeep/ezeep-js 1.0.151 → 1.0.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cjs/ezeep.cjs.js +3 -3
  2. package/dist/cjs/ezp-auth_14.cjs.entry.js +126 -71
  3. package/dist/cjs/{index-62fc857c.js → index-d547be4e.js} +23 -0
  4. package/dist/cjs/loader.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/components/ezp-auth/ezp-auth.js +1 -3
  7. package/dist/collection/components/ezp-dialog/ezp-dialog.js +0 -2
  8. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +87 -52
  9. package/dist/collection/components/ezp-printing/ezp-printing.js +24 -3
  10. package/dist/collection/components/ezp-status/ezp-status.js +0 -2
  11. package/dist/collection/components/ezp-upload/ezp-upload.js +0 -2
  12. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +0 -2
  13. package/dist/collection/services/auth.js +2 -0
  14. package/dist/collection/utils/utils.js +20 -8
  15. package/dist/custom-elements/index.js +127 -72
  16. package/dist/directives/proxies.ts +2 -2
  17. package/dist/esm/ezeep.js +3 -3
  18. package/dist/esm/ezp-auth_14.entry.js +126 -71
  19. package/dist/esm/{index-265d8cca.js → index-485041ac.js} +23 -0
  20. package/dist/esm/loader.js +3 -3
  21. package/dist/esm/polyfills/css-shim.js +1 -1
  22. package/dist/esm-es5/ezeep.js +1 -1
  23. package/dist/esm-es5/ezp-auth_14.entry.js +3 -3
  24. package/dist/esm-es5/index-485041ac.js +1 -0
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/ezeep/ezeep.esm.js +1 -1
  27. package/dist/ezeep/ezeep.js +1 -1
  28. package/dist/ezeep/p-cc2bb341.system.js +1 -0
  29. package/dist/ezeep/p-d4dae139.system.js +1 -0
  30. package/dist/ezeep/p-e149771a.system.entry.js +21 -0
  31. package/dist/ezeep/{p-a7b7b386.entry.js → p-f310e367.entry.js} +2 -2
  32. package/dist/ezeep/{p-f3065800.js → p-fa808a39.js} +0 -0
  33. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +1 -1
  34. package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -0
  35. package/dist/types/components.d.ts +2 -0
  36. package/dist/types/stencil-public-runtime.d.ts +6 -4
  37. package/dist/types/utils/utils.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/readme.md +2 -0
  40. package/www/build/ezeep.esm.js +1 -1
  41. package/www/build/ezeep.js +1 -1
  42. package/www/build/p-cc2bb341.system.js +1 -0
  43. package/www/build/p-d4dae139.system.js +1 -0
  44. package/www/build/p-e149771a.system.entry.js +21 -0
  45. package/www/build/{p-a7b7b386.entry.js → p-f310e367.entry.js} +2 -2
  46. package/www/build/{p-f3065800.js → p-fa808a39.js} +0 -0
  47. package/www/data/locales/de.json +7 -3
  48. package/www/data/locales/en.json +6 -2
  49. package/www/index.html +1 -1
  50. package/dist/esm-es5/index-265d8cca.js +0 -1
  51. package/dist/ezeep/p-98ec6965.system.js +0 -1
  52. package/dist/ezeep/p-a1b0d17a.system.entry.js +0 -21
  53. package/dist/ezeep/p-f89804ee.system.js +0 -1
  54. package/www/build/p-98ec6965.system.js +0 -1
  55. package/www/build/p-a1b0d17a.system.entry.js +0 -21
  56. package/www/build/p-f89804ee.system.js +0 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-62fc857c.js');
3
+ const index = require('./index-d547be4e.js');
4
4
  const appGlobals = require('./app-globals-53afb196.js');
5
5
 
6
6
  /*
7
- Stencil Client Patch Browser v2.11.0 | MIT Licensed | https://stenciljs.com
7
+ Stencil Client Patch Browser v2.14.0 | MIT Licensed | https://stenciljs.com
8
8
  */
9
9
  const patchBrowser = () => {
10
10
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('ezeep.cjs.js', document.baseURI).href));
@@ -17,5 +17,5 @@ const patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(options => {
19
19
  appGlobals.globalScripts();
20
- return index.bootstrapLazy([["ezp-auth_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"previouslySelectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
20
+ return index.bootstrapLazy([["ezp-auth_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
21
21
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-62fc857c.js');
5
+ const index = require('./index-d547be4e.js');
6
6
 
7
7
  const appendToMap = (map, propName, value) => {
8
8
  const items = map.get(propName);
@@ -2868,7 +2868,11 @@ const printer_selection$1 = {
2868
2868
  unknown_location: "Unbekannter Standort",
2869
2869
  no_printers: "Keine Drucker gefunden.",
2870
2870
  prepare_upload: "Vorbereiten…",
2871
- uploading: "Hochladen…"
2871
+ uploading: "Hochladen…",
2872
+ duplex_none: "Keine",
2873
+ copies: "Kopien",
2874
+ duplex_long: "auf der langen Seite umdrehen",
2875
+ duplex_short: "auf der kurzen Seite umdrehen"
2872
2876
  };
2873
2877
  const button_actions$1 = {
2874
2878
  login: "Anmelden",
@@ -2885,12 +2889,12 @@ const upload$1 = {
2885
2889
  };
2886
2890
  const user_menu$1 = {
2887
2891
  theme: "Farbschema",
2888
- appearance: "Erscheinungsbild",
2892
+ appearance: "Darstellung",
2889
2893
  system: "System",
2890
2894
  light: "Hell",
2891
2895
  dark: "Dunkel",
2892
2896
  account: "Account verwalten",
2893
- help: "Hilfe & Support",
2897
+ help: "Hilfe & Unterstützung",
2894
2898
  logout: "Ausloggen"
2895
2899
  };
2896
2900
  const translationsDE = {
@@ -2926,6 +2930,9 @@ const printer_selection = {
2926
2930
  orientation: "Orientation",
2927
2931
  size: "Paper Size",
2928
2932
  duplex: "Double-sided",
2933
+ duplex_none: "None",
2934
+ duplex_long: "flip on long side",
2935
+ duplex_short: "flip on short side",
2929
2936
  quality: "Print Quality",
2930
2937
  select_printer: "Select a printer",
2931
2938
  select_color: "Select Color/Grayscale",
@@ -2938,7 +2945,8 @@ const printer_selection = {
2938
2945
  orientation_portrait: "Portrait",
2939
2946
  orientation_landscape: "Landscape",
2940
2947
  unknown_location: "Unknown location",
2941
- no_printers: "No printers found."
2948
+ no_printers: "No printers found.",
2949
+ copies: "Copies"
2942
2950
  };
2943
2951
  const button_actions = {
2944
2952
  login: "Sign In",
@@ -2960,7 +2968,7 @@ const user_menu = {
2960
2968
  light: "Light",
2961
2969
  dark: "Dark",
2962
2970
  account: "Manage account",
2963
- help: "Help & support",
2971
+ help: "Help & Support",
2964
2972
  logout: "Logout"
2965
2973
  };
2966
2974
  const translationsEN = {
@@ -2977,7 +2985,7 @@ function encodeFormData(data) {
2977
2985
  .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
2978
2986
  .join('&');
2979
2987
  }
2980
- function initi18n() {
2988
+ function initi18n(language) {
2981
2989
  const resources = {
2982
2990
  en: {
2983
2991
  translation: translationsEN,
@@ -2986,13 +2994,25 @@ function initi18n() {
2986
2994
  translation: translationsDE,
2987
2995
  },
2988
2996
  };
2989
- i18next.init({
2990
- resources,
2991
- lng: navigator.language,
2992
- // allow keys to be phrases having `:`, `.`
2993
- nsSeparator: false,
2994
- fallbackLng: 'en',
2995
- });
2997
+ // override browserlanguage if language is provided
2998
+ if (language != '') {
2999
+ i18next.init({
3000
+ resources,
3001
+ lng: language,
3002
+ // allow keys to be phrases having `:`, `.`
3003
+ nsSeparator: false,
3004
+ fallbackLng: 'en',
3005
+ });
3006
+ }
3007
+ else {
3008
+ i18next.init({
3009
+ resources,
3010
+ lng: navigator.language,
3011
+ // allow keys to be phrases having `:`, `.`
3012
+ nsSeparator: false,
3013
+ fallbackLng: 'en',
3014
+ });
3015
+ }
2996
3016
  }
2997
3017
  const poll = async ({ fn, validate, interval, maxAttempts }) => {
2998
3018
  let attempts = 0;
@@ -3060,6 +3080,7 @@ class EzpAuthorizationService {
3060
3080
  }
3061
3081
  getAccessToken() {
3062
3082
  return fetch(this.accessTokenURL, {
3083
+ credentials: 'include',
3063
3084
  headers: {
3064
3085
  Authorization: 'Basic ' + btoa(this.clientID + ':'),
3065
3086
  'Content-Type': 'application/x-www-form-urlencoded',
@@ -3093,6 +3114,7 @@ class EzpAuthorizationService {
3093
3114
  }
3094
3115
  refreshTokens() {
3095
3116
  fetch(this.accessTokenURL, {
3117
+ credentials: 'include',
3096
3118
  headers: {
3097
3119
  Authorization: 'Basic ' + btoa(this.clientID + ':'),
3098
3120
  'Content-Type': 'application/x-www-form-urlencoded',
@@ -3193,13 +3215,12 @@ let EzpAuth = class {
3193
3215
  }
3194
3216
  receiveMessage(event) {
3195
3217
  this.auth.code = event.data;
3196
- this.auth.getAccessToken().finally(() => {
3218
+ this.auth.getAccessToken().then(() => {
3197
3219
  this.authCancel.emit();
3198
3220
  this.authSuccess.emit();
3199
3221
  });
3200
3222
  }
3201
3223
  async componentWillLoad() {
3202
- initi18n();
3203
3224
  this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
3204
3225
  if (authStore.state.isAuthorized === false) {
3205
3226
  this.auth.generateCodeVerifier();
@@ -3269,7 +3290,6 @@ let EzpDialog = class {
3269
3290
  *
3270
3291
  */
3271
3292
  componentWillLoad() {
3272
- initi18n();
3273
3293
  }
3274
3294
  /**
3275
3295
  *
@@ -32683,15 +32703,15 @@ let EzpPrinterSelection = class {
32683
32703
  this.duplexOptions = [
32684
32704
  {
32685
32705
  id: 1,
32686
- title: 'None',
32706
+ title: i18next.t('printer_selection.duplex_none'),
32687
32707
  },
32688
32708
  {
32689
32709
  id: 2,
32690
- title: 'Long edge binding',
32710
+ title: i18next.t('printer_selection.duplex_long'),
32691
32711
  },
32692
32712
  {
32693
32713
  id: 3,
32694
- title: 'Short edge binding',
32714
+ title: i18next.t('printer_selection.duplex_short'),
32695
32715
  },
32696
32716
  ];
32697
32717
  this.hidemenu = false;
@@ -32729,16 +32749,6 @@ let EzpPrinterSelection = class {
32729
32749
  copies: '',
32730
32750
  resolution: '',
32731
32751
  };
32732
- this.previouslySelectedProperties = {
32733
- paper: '',
32734
- paperid: '',
32735
- color: false,
32736
- duplex: false,
32737
- duplexmode: '',
32738
- orientation: '',
32739
- copies: '',
32740
- resolution: '',
32741
- };
32742
32752
  /**
32743
32753
  *
32744
32754
  * Private methods
@@ -32783,6 +32793,10 @@ let EzpPrinterSelection = class {
32783
32793
  }
32784
32794
  })
32785
32795
  .then((data) => {
32796
+ if (data.code === 804) {
32797
+ this.printFailed = true;
32798
+ this.printProcessing = false;
32799
+ }
32786
32800
  if (data.jobid) {
32787
32801
  printStore.state.jobID = data.jobid;
32788
32802
  poll({
@@ -32792,15 +32806,19 @@ let EzpPrinterSelection = class {
32792
32806
  maxAttempts: 10,
32793
32807
  }).catch((err) => {
32794
32808
  console.warn(err);
32809
+ this.printFailed = true;
32810
+ this.printProcessing = false;
32795
32811
  });
32796
32812
  }
32797
32813
  else {
32798
32814
  this.printFailed = true;
32815
+ this.printProcessing = false;
32799
32816
  }
32800
32817
  })
32801
32818
  .catch((error) => {
32802
32819
  console.log(error);
32803
32820
  this.printFailed = true;
32821
+ this.printProcessing = false;
32804
32822
  });
32805
32823
  }
32806
32824
  if (this.file) {
@@ -32808,7 +32826,6 @@ let EzpPrinterSelection = class {
32808
32826
  }
32809
32827
  localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
32810
32828
  localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
32811
- localStorage.setItem('previouslySelectedProperties', JSON.stringify(this.previouslySelectedProperties));
32812
32829
  this.printStopped = false;
32813
32830
  };
32814
32831
  this.handleUserMenu = () => {
@@ -32880,9 +32897,6 @@ let EzpPrinterSelection = class {
32880
32897
  else {
32881
32898
  this.selectedPrinter = { id: '', location: '', name: '' };
32882
32899
  }
32883
- if (localStorage.getItem('previouslySelectedProperties')) {
32884
- this.previouslySelectedProperties = JSON.parse(localStorage.getItem('previouslySelectedProperties'));
32885
- }
32886
32900
  }
32887
32901
  getUserInfo() {
32888
32902
  const userService = new EzpUserService();
@@ -32899,24 +32913,20 @@ let EzpPrinterSelection = class {
32899
32913
  await this.printService
32900
32914
  .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
32901
32915
  .then((data) => (this.selectedPrinterConfig = data[0]));
32916
+ this.setDefaultPaperFormat();
32902
32917
  break;
32903
32918
  case 'color':
32904
32919
  this.selectedProperties.color = !!eventDetails.id;
32905
- this.previouslySelectedProperties.color = eventDetails.title;
32906
32920
  break;
32907
32921
  case 'orientation':
32908
32922
  this.selectedProperties.orientation = eventDetails.id;
32909
- this.previouslySelectedProperties.orientation = eventDetails.title;
32910
32923
  break;
32911
32924
  case 'format':
32912
32925
  this.selectedProperties.paper = eventDetails.title;
32913
32926
  this.selectedProperties.paperid = eventDetails.id;
32914
- this.previouslySelectedProperties.paper = eventDetails.title;
32915
- this.previouslySelectedProperties.paperid = eventDetails.id;
32916
32927
  break;
32917
32928
  case 'quality':
32918
32929
  this.selectedProperties.resolution = eventDetails.title;
32919
- this.previouslySelectedProperties.resolution = eventDetails.title;
32920
32930
  break;
32921
32931
  case 'duplex':
32922
32932
  if (eventDetails.title === 'None') {
@@ -32926,7 +32936,6 @@ let EzpPrinterSelection = class {
32926
32936
  this.selectedProperties.duplex = true;
32927
32937
  }
32928
32938
  this.selectedProperties.duplexmode = eventDetails.id;
32929
- this.previouslySelectedProperties.duplexmode = eventDetails.id;
32930
32939
  break;
32931
32940
  }
32932
32941
  }
@@ -32951,6 +32960,10 @@ let EzpPrinterSelection = class {
32951
32960
  this.printService
32952
32961
  .printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
32953
32962
  .then((data) => {
32963
+ if (data.code === 804) {
32964
+ this.printFailed = true;
32965
+ this.printProcessing = false;
32966
+ }
32954
32967
  if (data.jobid) {
32955
32968
  printStore.state.jobID = data.jobid;
32956
32969
  poll({
@@ -32961,21 +32974,40 @@ let EzpPrinterSelection = class {
32961
32974
  }).catch((err) => {
32962
32975
  console.log(err);
32963
32976
  this.printFailed = true;
32977
+ this.printProcessing = false;
32964
32978
  });
32965
32979
  }
32966
32980
  else {
32967
32981
  this.printFailed = true;
32982
+ this.printProcessing = false;
32968
32983
  }
32969
32984
  })
32970
32985
  .catch((error) => {
32971
32986
  console.log(error);
32972
32987
  this.printFailed = true;
32988
+ this.printProcessing = false;
32973
32989
  });
32974
32990
  }
32975
32991
  else {
32976
32992
  this.printFailed = true;
32993
+ this.printProcessing = false;
32977
32994
  }
32978
32995
  }
32996
+ setDefaultPaperFormat() {
32997
+ let format;
32998
+ const language = navigator.language;
32999
+ if (language === 'en-US') {
33000
+ format = 'Letter';
33001
+ }
33002
+ else if (language === 'my') {
33003
+ format = 'Letter';
33004
+ }
33005
+ else {
33006
+ format = 'A4';
33007
+ }
33008
+ this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Name;
33009
+ this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Id;
33010
+ }
32979
33011
  /**
32980
33012
  *
32981
33013
  * Lifecycle methods
@@ -32983,11 +33015,19 @@ let EzpPrinterSelection = class {
32983
33015
  */
32984
33016
  /** Description... */
32985
33017
  async componentWillLoad() {
32986
- initi18n();
32987
33018
  this.loading = true;
32988
33019
  this.getPropertiesFromLocalStorage();
32989
33020
  this.getUserInfo();
32990
33021
  this.printService = new EzpPrintService(this.redirectURI, this.clientID);
33022
+ // if printer is stored from previous print, get the config to enable property selection
33023
+ if (this.selectedPrinter.id != '') {
33024
+ await this.printService
33025
+ .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
33026
+ .then((data) => (this.selectedPrinterConfig = data[0]));
33027
+ if (this.selectedProperties.paper === '') {
33028
+ this.setDefaultPaperFormat();
33029
+ }
33030
+ }
32991
33031
  await (await this.printService.getConfig(authStore.state.accessToken))
32992
33032
  .json()
32993
33033
  .then((response) => {
@@ -33032,7 +33072,9 @@ let EzpPrinterSelection = class {
33032
33072
  ? printer.location
33033
33073
  : i18next.t('printer_selection.unknown_location'),
33034
33074
  type: 'printer',
33035
- })), preSelected: this.selectedPrinter ? this.selectedPrinter.name : null, disabled: !(this.printers.length > 0) })), index.h("div", { id: "options" }, index.h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
33075
+ })),
33076
+ // preSelected={this.selectedPrinter ? this.selectedPrinter.name : null}
33077
+ disabled: !(this.printers.length > 0) })), index.h("div", { id: "options" }, index.h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
33036
33078
  ? [
33037
33079
  {
33038
33080
  id: 1,
@@ -33056,11 +33098,25 @@ let EzpPrinterSelection = class {
33056
33098
  },
33057
33099
  ],
33058
33100
  // preSelected={
33059
- // this.previouslySelectedProperties.color
33060
- // ? this.previouslySelectedProperties.color
33061
- // : this.selectedPrinterConfig.Color
33062
- // ? i18next.t('printer_selection.color_grayscale')
33063
- // : null
33101
+ // this.selectedProperties.color ?
33102
+ // [
33103
+ // {
33104
+ // id: 1,
33105
+ // title: i18next.t('printer_selection.color'),
33106
+ // meta: '',
33107
+ // type: 'color',
33108
+ // },
33109
+ // ]
33110
+ // : !this.selectedProperties.color ?
33111
+ // [
33112
+ // {
33113
+ // id: 0,
33114
+ // title: i18next.t('printer_selection.color_grayscale'),
33115
+ // meta: '',
33116
+ // type: 'color',
33117
+ // },
33118
+ // ]
33119
+ // : null
33064
33120
  // }
33065
33121
  disabled: !this.selectedPrinterConfig.Color }), index.h("ezp-select", { label: i18next.t('printer_selection.duplex'), icon: "duplex", placeholder: i18next.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: this.duplexOptions.map((option) => ({
33066
33122
  id: option.id,
@@ -33069,10 +33125,10 @@ let EzpPrinterSelection = class {
33069
33125
  type: 'duplex',
33070
33126
  })),
33071
33127
  // preSelected={
33072
- // this.previouslySelectedProperties.duplex
33073
- // ? this.previouslySelectedProperties.duplex
33074
- // : this.selectedPrinterConfig.DuplexSupported
33075
- // ? 'None'
33128
+ // this.selectedProperties.duplex
33129
+ // ? this.selectedProperties.duplex
33130
+ // // : this.selectedPrinterConfig.DuplexSupported
33131
+ // // ? 'None'
33076
33132
  // : null
33077
33133
  // }
33078
33134
  disabled: !this.selectedPrinterConfig.DuplexSupported }), index.h("ezp-select", { label: i18next.t('printer_selection.size'), icon: "size", placeholder: i18next.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats.map((format) => ({
@@ -33082,10 +33138,10 @@ let EzpPrinterSelection = class {
33082
33138
  type: 'format',
33083
33139
  })),
33084
33140
  // preSelected={
33085
- // this.previouslySelectedProperties.paper
33086
- // ? this.previouslySelectedProperties.paper
33087
- // : this.selectedPrinterConfig.PaperFormats.length > 0
33088
- // ? this.selectedPrinterConfig.PaperFormats[0].Name
33141
+ // this.selectedProperties.paper
33142
+ // ? this.selectedProperties.paper
33143
+ // // : this.selectedPrinterConfig.PaperFormats.length > 0
33144
+ // // ? this.selectedPrinterConfig.PaperFormats[0].Name
33089
33145
  // : null
33090
33146
  // }
33091
33147
  disabled: !(this.selectedPrinterConfig.PaperFormats.length > 0) }), index.h("ezp-select", { label: i18next.t('printer_selection.orientation'), icon: "orientation", placeholder: i18next.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.OrientationsSupported.map((orientation, index) => ({
@@ -33095,12 +33151,12 @@ let EzpPrinterSelection = class {
33095
33151
  type: 'orientation',
33096
33152
  })),
33097
33153
  // preSelected={
33098
- // this.previouslySelectedProperties.orientation
33099
- // ? this.previouslySelectedProperties.orientation
33100
- // : this.selectedPrinterConfig.OrientationsSupported.length > 0
33101
- // ? i18next.t(
33102
- // `printer_selection.orientation_${this.selectedPrinterConfig.OrientationsSupported[0]}`
33103
- // )
33154
+ // this.selectedProperties.orientation
33155
+ // ? this.selectedProperties.orientation
33156
+ // // : this.selectedPrinterConfig.OrientationsSupported.length > 0
33157
+ // // ? i18next.t(
33158
+ // // `printer_selection.orientation_${this.selectedPrinterConfig.OrientationsSupported[0]}`
33159
+ // // )
33104
33160
  // : null
33105
33161
  // }
33106
33162
  disabled: !(this.selectedPrinterConfig.OrientationsSupported.length > 0) }), index.h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", placeholder: i18next.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Resolutions.map((option, index) => ({
@@ -33110,13 +33166,13 @@ let EzpPrinterSelection = class {
33110
33166
  type: 'quality',
33111
33167
  })),
33112
33168
  // preSelected={
33113
- // this.previouslySelectedProperties.resolution
33114
- // ? this.previouslySelectedProperties.resolution
33115
- // : this.selectedPrinterConfig.Resolutions.length > 0
33116
- // ? this.selectedPrinterConfig.Resolutions[0]
33169
+ // this.selectedProperties.resolution
33170
+ // ? this.selectedProperties.resolution
33171
+ // // : this.selectedPrinterConfig.Resolutions.length > 0
33172
+ // // ? this.selectedPrinterConfig.Resolutions[0]
33117
33173
  // : null
33118
33174
  // }
33119
- disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), index.h("ezp-stepper", { label: "Copies", max: 10, icon: "copies" })), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel') }), index.h("ezp-text-button", { disabled: this.selectedPrinter.id === '', type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print') })), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
33175
+ disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), index.h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel') }), index.h("ezp-text-button", { disabled: this.selectedPrinter.id === '', type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print') })), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
33120
33176
  }
33121
33177
  };
33122
33178
  EzpPrinterSelection.style = ezpPrinterSelectionCss;
@@ -33133,9 +33189,11 @@ const ezpPrintingCss = ":host{font-family:\"Inter\", sans-serif;-webkit-font-fea
33133
33189
  let EzpPrinting = class {
33134
33190
  constructor(hostRef) {
33135
33191
  index.registerInstance(this, hostRef);
33192
+ this.filename = '';
33136
33193
  this.hidemenu = false;
33137
33194
  this.theme = 'cyan';
33138
33195
  this.appearance = 'system';
33196
+ this.language = '';
33139
33197
  /**
33140
33198
  *
33141
33199
  * States
@@ -33164,7 +33222,7 @@ let EzpPrinting = class {
33164
33222
  this.authOpen = false;
33165
33223
  }
33166
33224
  listenAuthSuccess() {
33167
- if (this.filename) {
33225
+ if (this.filename != '') {
33168
33226
  this.printOpen = true;
33169
33227
  }
33170
33228
  else {
@@ -33250,7 +33308,7 @@ let EzpPrinting = class {
33250
33308
  else {
33251
33309
  printStore.state.printApiHostUrl = config.printingApiHostUrl;
33252
33310
  }
33253
- initi18n();
33311
+ initi18n(this.language);
33254
33312
  sendCodeToParentWindow();
33255
33313
  this.checkAuth();
33256
33314
  }
@@ -33449,7 +33507,6 @@ let EzpStatus = class {
33449
33507
  *
33450
33508
  */
33451
33509
  componentWillLoad() {
33452
- initi18n();
33453
33510
  }
33454
33511
  /**
33455
33512
  *
@@ -33630,7 +33687,6 @@ let EzpUpload = class {
33630
33687
  *
33631
33688
  */
33632
33689
  componentWillLoad() {
33633
- initi18n();
33634
33690
  }
33635
33691
  /**
33636
33692
  *
@@ -33712,7 +33768,6 @@ let EzpUserMenu = class {
33712
33768
  *
33713
33769
  */
33714
33770
  componentWillLoad() {
33715
- initi18n();
33716
33771
  this.container = this.component.closest('[data-backdrop-surface]');
33717
33772
  this.backdrop.addEventListener('backdropHideStart', () => {
33718
33773
  this.open = false;
@@ -933,6 +933,29 @@ const then = (promise, thenFn) => {
933
933
  };
934
934
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
935
935
  ;
936
+ /**
937
+ * Parse a new property value for a given property type.
938
+ *
939
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
940
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
941
+ * 1. `any`, the type given to `propValue` in the function signature
942
+ * 2. the type stored from `propType`.
943
+ *
944
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
945
+ *
946
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
947
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
948
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
949
+ * ```tsx
950
+ * <my-cmp prop-val={0}></my-cmp>
951
+ * ```
952
+ *
953
+ * HTML prop values on the other hand, will always a string
954
+ *
955
+ * @param propValue the new value to coerce to some type
956
+ * @param propType the type of the prop, expressed as a binary number
957
+ * @returns the parsed/coerced value
958
+ */
936
959
  const parsePropertyValue = (propValue, propType) => {
937
960
  // ensure this value is of the correct prop type
938
961
  if (propValue != null && !isComplexType(propValue)) {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-62fc857c.js');
5
+ const index = require('./index-d547be4e.js');
6
6
  const appGlobals = require('./app-globals-53afb196.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Esm v2.11.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Esm v2.14.0 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  const patchEsm = () => {
12
12
  return index.promiseResolve();
@@ -16,7 +16,7 @@ const defineCustomElements = (win, options) => {
16
16
  if (typeof window === 'undefined') return Promise.resolve();
17
17
  return patchEsm().then(() => {
18
18
  appGlobals.globalScripts();
19
- return index.bootstrapLazy([["ezp-auth_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"previouslySelectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
19
+ return index.bootstrapLazy([["ezp-auth_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
20
20
  });
21
21
  };
22
22
 
@@ -17,8 +17,8 @@
17
17
  ],
18
18
  "compiler": {
19
19
  "name": "@stencil/core",
20
- "version": "2.11.0",
21
- "typescriptVersion": "4.3.5"
20
+ "version": "2.14.0",
21
+ "typescriptVersion": "4.5.4"
22
22
  },
23
23
  "collections": [],
24
24
  "bundles": [],
@@ -2,7 +2,6 @@ import { Component, Host, h, Prop, State, Event, Listen } from '@stencil/core';
2
2
  import { EzpAuthorizationService } from '../../services/auth';
3
3
  import authStore from '../../services/auth';
4
4
  import i18next from 'i18next';
5
- import { initi18n } from '../../utils/utils';
6
5
  export class EzpAuth {
7
6
  constructor() {
8
7
  this.windowObjectReference = null;
@@ -53,13 +52,12 @@ export class EzpAuth {
53
52
  }
54
53
  receiveMessage(event) {
55
54
  this.auth.code = event.data;
56
- this.auth.getAccessToken().finally(() => {
55
+ this.auth.getAccessToken().then(() => {
57
56
  this.authCancel.emit();
58
57
  this.authSuccess.emit();
59
58
  });
60
59
  }
61
60
  async componentWillLoad() {
62
- initi18n();
63
61
  this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
64
62
  if (authStore.state.isAuthorized === false) {
65
63
  this.auth.generateCodeVerifier();
@@ -1,5 +1,4 @@
1
1
  import { Component, Host, Prop, Event, h } from '@stencil/core';
2
- import { initi18n } from '../../utils/utils';
3
2
  import i18next from 'i18next';
4
3
  export class EzpDialog {
5
4
  constructor() {
@@ -24,7 +23,6 @@ export class EzpDialog {
24
23
  *
25
24
  */
26
25
  componentWillLoad() {
27
- initi18n();
28
26
  }
29
27
  /**
30
28
  *