cronapp-framework-mobile-js 3.2.1 → 4.0.1

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 (118) hide show
  1. package/components/templates/button.template.html +2 -2
  2. package/css/themes/custom/theme-general/button.css +7 -1
  3. package/dist/components/js/format.min.js +1 -1
  4. package/dist/components/js/jquery.inputmask.bundle.js +1 -3
  5. package/dist/components/js/jquery.mask.min.js +1 -1
  6. package/dist/components/js/pouchdb.cordova-sqlite.js +1 -2
  7. package/dist/components/js/qrcode.js +1 -1
  8. package/dist/components/templates/anchor.template.html +1 -1
  9. package/dist/components/templates/button.template.html +1 -1
  10. package/dist/components/templates/combobox.designtime.html +1 -1
  11. package/dist/components/templates/combobox.template.html +1 -1
  12. package/dist/components/templates/crn-frame.designtime.html +1 -1
  13. package/dist/components/templates/crn-signature-pad.designtime.html +1 -1
  14. package/dist/components/templates/cron-combobox.designtime.html +1 -1
  15. package/dist/components/templates/dynamic-combobox.template.html +1 -1
  16. package/dist/components/templates/evaluation.designtime.html +1 -1
  17. package/dist/components/templates/image.template.html +1 -1
  18. package/dist/components/templates/ion-footer-bar.template.html +1 -1
  19. package/dist/components/templates/ion-header-bar.template.html +1 -1
  20. package/dist/components/templates/ion-tab-item.designtime.html +1 -1
  21. package/dist/components/templates/item.icon.template.html +1 -1
  22. package/dist/components/templates/item.slider.template.html +1 -1
  23. package/dist/components/templates/kendo-chat.designtime.html +1 -1
  24. package/dist/components/templates/kendo-chat.template.html +1 -1
  25. package/dist/components/templates/list.swipe.template.html +1 -1
  26. package/dist/components/templates/maps.designtime.html +1 -1
  27. package/dist/components/templates/multiselect.template.html +1 -1
  28. package/dist/components/templates/slider.template.html +1 -1
  29. package/dist/components/templates/textarea.template.html +1 -1
  30. package/dist/components/templates/views/public/home.view.html +1 -1
  31. package/dist/components/templates/views/public/menu.view.html +1 -1
  32. package/dist/css/themes/custom/theme-general/button.css +1 -1
  33. package/dist/js/LanguageSelectDirective.js +1 -1
  34. package/dist/js/LocaleService.js +1 -1
  35. package/dist/js/app.authentication.js +1 -1
  36. package/dist/js/app.js +1 -1
  37. package/dist/js/controllers.authentication.js +1 -1
  38. package/dist/js/controllers.js +1 -1
  39. package/dist/js/custom.controllers.js +1 -1
  40. package/dist/js/customStateProvider.js +105 -0
  41. package/dist/js/directives.js +1 -17
  42. package/dist/js/filters.js +1 -1
  43. package/dist/js/local-dateformat.directive.js +1 -1
  44. package/dist/js/reports/parameters.controller.js +1 -1
  45. package/dist/js/reports/reports.service.js +1 -1
  46. package/dist/js/services.js +1 -1
  47. package/dist/js/upload.service.js +1 -1
  48. package/gulpfile.js +24 -39
  49. package/js/app.authentication.js +10 -1
  50. package/js/controllers.authentication.js +54 -26
  51. package/package.json +21 -19
  52. package/dist/img/cron-icon/crn-QRCode.svg +0 -1
  53. package/dist/img/cron-icon/crn-anchor.svg +0 -1
  54. package/dist/img/cron-icon/crn-button-bar.svg +0 -1
  55. package/dist/img/cron-icon/crn-button.svg +0 -1
  56. package/dist/img/cron-icon/crn-card.svg +0 -1
  57. package/dist/img/cron-icon/crn-carousel.svg +0 -1
  58. package/dist/img/cron-icon/crn-chart.svg +0 -1
  59. package/dist/img/cron-icon/crn-checkbox.svg +0 -1
  60. package/dist/img/cron-icon/crn-component.svg +0 -1
  61. package/dist/img/cron-icon/crn-container.svg +0 -1
  62. package/dist/img/cron-icon/crn-cron-crud.svg +0 -1
  63. package/dist/img/cron-icon/crn-datasource.svg +0 -1
  64. package/dist/img/cron-icon/crn-dynamic-file.svg +0 -1
  65. package/dist/img/cron-icon/crn-dynamic-image.svg +0 -1
  66. package/dist/img/cron-icon/crn-enterprise-combobox.svg +0 -1
  67. package/dist/img/cron-icon/crn-enterprise-dynamic-combobox.svg +0 -1
  68. package/dist/img/cron-icon/crn-evaluation.svg +0 -1
  69. package/dist/img/cron-icon/crn-form.svg +0 -1
  70. package/dist/img/cron-icon/crn-frame.svg +0 -1
  71. package/dist/img/cron-icon/crn-header.svg +0 -1
  72. package/dist/img/cron-icon/crn-icon.svg +0 -1
  73. package/dist/img/cron-icon/crn-image.svg +0 -1
  74. package/dist/img/cron-icon/crn-infinite-scroll.svg +0 -1
  75. package/dist/img/cron-icon/crn-input-floating.svg +0 -1
  76. package/dist/img/cron-icon/crn-input-inline.svg +0 -1
  77. package/dist/img/cron-icon/crn-ion-footer-bar.svg +0 -1
  78. package/dist/img/cron-icon/crn-ion-list.svg +0 -1
  79. package/dist/img/cron-icon/crn-item-swipe.svg +0 -1
  80. package/dist/img/cron-icon/crn-kendo-chat.svg +0 -1
  81. package/dist/img/cron-icon/crn-label.svg +0 -1
  82. package/dist/img/cron-icon/crn-list-avatar.svg +0 -1
  83. package/dist/img/cron-icon/crn-list-icon.svg +0 -1
  84. package/dist/img/cron-icon/crn-list-item-avatar.svg +0 -1
  85. package/dist/img/cron-icon/crn-list-item-icon.svg +0 -1
  86. package/dist/img/cron-icon/crn-list-item-thumbnail.svg +0 -1
  87. package/dist/img/cron-icon/crn-list-item.svg +0 -1
  88. package/dist/img/cron-icon/crn-list-swipe.svg +0 -1
  89. package/dist/img/cron-icon/crn-list-thumbnail.svg +0 -1
  90. package/dist/img/cron-icon/crn-list.svg +0 -1
  91. package/dist/img/cron-icon/crn-map.svg +0 -1
  92. package/dist/img/cron-icon/crn-multiselect.svg +0 -1
  93. package/dist/img/cron-icon/crn-paragraph.svg +0 -1
  94. package/dist/img/cron-icon/crn-plugin.svg +0 -1
  95. package/dist/img/cron-icon/crn-radio.svg +0 -1
  96. package/dist/img/cron-icon/crn-radiogroup.svg +0 -1
  97. package/dist/img/cron-icon/crn-range.svg +0 -1
  98. package/dist/img/cron-icon/crn-rating.svg +0 -1
  99. package/dist/img/cron-icon/crn-select.svg +0 -1
  100. package/dist/img/cron-icon/crn-signature-pad.svg +0 -1
  101. package/dist/img/cron-icon/crn-spacer.svg +0 -1
  102. package/dist/img/cron-icon/crn-tabs-icon-only.svg +0 -1
  103. package/dist/img/cron-icon/crn-tabs.svg +0 -1
  104. package/dist/img/cron-icon/crn-text-component.svg +0 -1
  105. package/dist/img/cron-icon/crn-textarea.svg +0 -1
  106. package/dist/img/cron-icon/crn-textinput.svg +0 -1
  107. package/dist/img/cron-icon/crn-textinputbutton.svg +0 -1
  108. package/dist/img/cron-icon/crn-textinputicon.svg +0 -1
  109. package/dist/img/cron-icon/crn-toggle.svg +0 -1
  110. package/dist/img/cron-icon/crn-video.svg +0 -1
  111. package/dist/img/logo.svg +0 -1
  112. package/dist/img/placehold-100x100.png +0 -0
  113. package/dist/img/placehold-300x200.png +0 -0
  114. package/dist/img/placehold-900x500.png +0 -0
  115. package/dist/img/qr-code.png +0 -0
  116. package/dist/img/svg-charts.svg +0 -1
  117. package/dist/img/user.svg +0 -1
  118. package/dist/img/web.png +0 -0
@@ -1,2 +1 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.PouchAdapterCordovaSqlite=e()}}(function(){var e;return function(){function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return i(n||e)},f,f.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}return e}()({1:[function(e,t,n){var r;r="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},t.exports=r},{}],2:[function(e,t,n){"use strict";function r(e){return function(){var t=arguments.length;if(t){for(var n=[],r=-1;++r<t;)n[r]=arguments[r];return e.call(this,n)}return e.call(this,[])}}t.exports=r},{}],3:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,o,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(n=this._events[e],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(s(n))for(o=Array.prototype.slice.call(arguments,1),c=n.slice(),r=c.length,u=0;u<r;u++)c[u].apply(this,o);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=o;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],4:[function(e,t,n){(function(e){"use strict";function n(){f=!0;for(var e,t,n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}f=!1}function r(e){1!==l.push(e)||f||i()}var i,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var s=0,a=new o(n),u=e.document.createTextNode("");a.observe(u,{characterData:!0}),i=function(){u.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)i="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){n(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(n,0)};else{var c=new e.MessageChannel;c.port1.onmessage=n,i=function(){c.port2.postMessage(0)}}var f,l=[];t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],6:[function(e,t,n){"use strict";function r(e,t){var n=t.keys,r={offset:t.skip};return Promise.all(n.map(function(n){var i=_.assign({key:n,deleted:"ok"},t);return["limit","skip","keys"].forEach(function(e){delete i[e]}),new Promise(function(o,s){e._allDocs(i,function(e,i){if(e)return s(e);t.update_seq&&void 0!==i.update_seq&&(r.update_seq=i.update_seq),r.total_rows=i.total_rows,o(i.rows[0]||{key:n,error:"not_found"})})})})).then(function(e){return r.rows=e,r})}function i(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}function o(e){if(!/^\d+-./.test(e))return g.createError(g.INVALID_REV);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function s(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,i=[r[0],t,[]],o=1,s=r.length;o<s;o++)i=[r[o],{status:"missing"},[i]];return[{pos:n,ids:i}]}function a(e,t,n){n||(n={deterministic_revs:!0});var r,i,a,u={status:"available"};if(e._deleted&&(u.deleted=!0),t)if(e._id||(e._id=_.uuid()),i=_.rev(e,n.deterministic_revs),e._rev){if(a=o(e._rev),a.error)return a;e._rev_tree=[{pos:a.prefix,ids:[a.id,{status:"missing"},[[i,u,[]]]]}],r=a.prefix+1}else e._rev_tree=[{pos:1,ids:[i,u,[]]}],r=1;else if(e._revisions&&(e._rev_tree=s(e._revisions,u),r=e._revisions.start,i=e._revisions.ids[0]),!e._rev_tree){if(a=o(e._rev),a.error)return a;r=a.prefix,i=a.id,e._rev_tree=[{pos:r,ids:[i,u,[]]}]}_.invalidIdError(e._id),e._rev=r+"-"+i;var c={metadata:{},data:{}};for(var f in e)if(Object.prototype.hasOwnProperty.call(e,f)){var l="_"===f[0];if(l&&!b[f]){var d=g.createError(g.DOC_VALIDATION,f);throw d.message=g.DOC_VALIDATION.message+": "+f,d}l&&!w[f]?c.metadata[f.slice(1)]=e[f]:c.data[f]=e[f]}return c}function u(e){try{return E.atob(e)}catch(e){var t=g.createError(g.BAD_ARG,"Attachment is not a valid base64 string");return{error:t}}}function c(e,t,n){var r=u(e.data);if(r.error)return n(r.error);e.length=r.length,e.data="blob"===t?E.binaryStringToBlobOrBuffer(r,e.content_type):"base64"===t?E.btoa(r):r,y.binaryMd5(r,function(t){e.digest="md5-"+t,n()})}function f(e,t,n){y.binaryMd5(e.data,function(r){e.digest="md5-"+r,e.length=e.data.size||e.data.length||0,"binary"===t?E.blobOrBufferToBinaryString(e.data,function(t){e.data=t,n()}):"base64"===t?E.blobOrBufferToBase64(e.data,function(t){e.data=t,n()}):n()})}function l(e,t,n){if(e.stub)return n();"string"==typeof e.data?c(e,t,n):f(e,t,n)}function d(e,t,n){function r(){o++,e.length===o&&(i?n(i):n())}if(!e.length)return n();var i,o=0;e.forEach(function(e){function n(e){i=e,++s===o.length&&r()}var o=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],s=0;if(!o.length)return r();for(var a in e.data._attachments)e.data._attachments.hasOwnProperty(a)&&l(e.data._attachments[a],t,n)})}function h(e,t,n,r,i,o,s,u){if(m.revExists(t.rev_tree,n.metadata.rev)&&!u)return r[i]=n,o();var c=t.winningRev||m.winningRev(t),f="deleted"in t?t.deleted:m.isDeleted(t,c),l="deleted"in n.metadata?n.metadata.deleted:m.isDeleted(n.metadata),d=/^1-/.test(n.metadata.rev);if(f&&!l&&u&&d){var h=n.data;h._rev=c,h._id=n.metadata.id,n=a(h,u)}var v=m.merge(t.rev_tree,n.metadata.rev_tree[0],e);if(u&&(f&&l&&"new_leaf"!==v.conflicts||!f&&"new_leaf"!==v.conflicts||f&&!l&&"new_branch"===v.conflicts)){var p=g.createError(g.REV_CONFLICT);return r[i]=p,o()}var _=n.metadata.rev;n.metadata.rev_tree=v.tree,n.stemmedRevs=v.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var E,y=m.winningRev(n.metadata),S=m.isDeleted(n.metadata,y),b=f===S?0:f<S?-1:1;E=_===y?S:m.isDeleted(n.metadata,_),s(n,y,S,E,!0,b,i,o)}function v(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}function p(e,t,n,r,i,o,s,a,u){function c(e,t,n){var r=m.winningRev(e.metadata),i=m.isDeleted(e.metadata,r);if("was_delete"in a&&i)return o[t]=g.createError(g.MISSING_DOC,"deleted"),n();if(l&&v(e)){var u=g.createError(g.REV_CONFLICT);return o[t]=u,n()}s(e,r,i,i,!1,i?0:1,t,n)}function f(){++p===_&&u&&u()}e=e||1e3;var l=a.new_edits,d=new S.Map,p=0,_=t.length;t.forEach(function(e,t){if(e._id&&m.isLocalId(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";return void n[r](e,{ctx:i},function(e,n){o[t]=e||n,f()})}var s=e.metadata.id;d.has(s)?(_--,d.get(s).push([e,t])):d.set(s,[[e,t]])}),d.forEach(function(t,n){function i(){++u<t.length?a():f()}function a(){var a=t[u],f=a[0],d=a[1];if(r.has(n))h(e,r.get(n),f,o,d,i,s,l);else{var v=m.merge([],f.metadata.rev_tree[0],e);f.metadata.rev_tree=v.tree,f.stemmedRevs=v.stemmedRevs||[],c(f,d,i)}}var u=0;a()})}Object.defineProperty(n,"__esModule",{value:!0});var _=e(14),g=e(10),E=e(8),y=e(12),m=e(13),S=e(9),b=i(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),w=i(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);n.invalidIdError=_.invalidIdError,n.normalizeDdocFunctionName=_.normalizeDdocFunctionName,n.parseDdocFunctionName=_.parseDdocFunctionName,n.isDeleted=m.isDeleted,n.isLocalId=m.isLocalId,n.allDocsKeysQuery=r,n.parseDoc=a,n.preprocessAttachments=d,n.processDocs=p,n.updateDoc=h},{10:10,12:12,13:13,14:14,8:8,9:9}],7:[function(e,t,n){"use strict";function r(e){return decodeURIComponent(escape(e))}function i(e){return e<65?e-48:e-55}function o(e,t,n){for(var r="";t<n;)r+=String.fromCharCode(i(e.charCodeAt(t++))<<4|i(e.charCodeAt(t++)));return r}function s(e,t,n){for(var r="";t<n;)r+=String.fromCharCode(i(e.charCodeAt(t+2))<<12|i(e.charCodeAt(t+3))<<8|i(e.charCodeAt(t))<<4|i(e.charCodeAt(t+1))),t+=4;return r}function a(e,t){return"UTF-8"===t?r(o(e,0,e.length)):s(e,0,e.length)}function u(e){return"'"+e+"'"}function c(e){return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"")}function f(e){return e.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,"")}function l(e){return delete e._id,delete e._rev,JSON.stringify(e)}function d(e,t,n){return e=JSON.parse(e),e._id=t,e._rev=n,e}function h(e){for(var t="(";e--;)t+="?",e&&(t+=",");return t+")"}function v(e,t,n,r,i){return"SELECT "+e+" FROM "+("string"==typeof t?t:t.join(" JOIN "))+(n?" ON "+n:"")+(r?" WHERE "+("string"==typeof r?r:r.join(" AND ")):"")+(i?" ORDER BY "+i:"")}function p(e,t,n){function r(){++o===e.length&&i()}function i(){if(s.length){var e="SELECT DISTINCT digest AS digest FROM "+U+" WHERE seq IN "+h(s.length);n.executeSql(e,s,function(e,t){for(var n=[],r=0;r<t.rows.length;r++)n.push(t.rows.item(r).digest);if(n.length){var i="DELETE FROM "+U+" WHERE seq IN ("+s.map(function(){return"?"}).join(",")+")";e.executeSql(i,s,function(e){var t="SELECT digest FROM "+U+" WHERE digest IN ("+n.map(function(){return"?"}).join(",")+")";e.executeSql(t,n,function(e,t){for(var r=new T.Set,i=0;i<t.rows.length;i++)r.add(t.rows.item(i).digest);n.forEach(function(t){r.has(t)||(e.executeSql("DELETE FROM "+U+" WHERE digest=?",[t]),e.executeSql("DELETE FROM "+C+" WHERE digest=?",[t]))})})})}})}}if(e.length){var o=0,s=[];e.forEach(function(e){var i="SELECT seq FROM "+D+" WHERE doc_id=? AND rev=?";n.executeSql(i,[t,e],function(e,t){if(!t.rows.length)return r();var n=t.rows.item(0).seq;s.push(n),e.executeSql("DELETE FROM "+D+" WHERE seq=?",[n],r)})})}}function _(e){return function(t){I.guardedConsole("error","WebSQL threw an error",t);var n=t&&t.constructor.toString().match(/function ([^(]+)/),r=n&&n[1]||t.type,i=t.target||t.message;e(A.createError(A.WSQ_ERROR,i,r))}}function g(e){return"size"in e?1e6*e.size:"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent)?5e6:1}function E(e,t,n,r,i,o,s){function a(){if(I)return s(I);o.notify(r._name),s(null,N)}function u(e,t){var n="SELECT count(*) as cnt FROM "+C+" WHERE digest=?";w.executeSql(n,[e],function(n,r){if(0===r.rows.item(0).cnt){var i=A.createError(A.MISSING_STUB,"unknown stub attachment with digest "+e);t(i)}else t()})}function f(e){function t(){++i===n.length&&e(r)}var n=[];if(S.forEach(function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach(function(t){var r=e.data._attachments[t];r.stub&&n.push(r.digest)})}),!n.length)return e();var r,i=0;n.forEach(function(e){u(e,function(e){e&&!r&&(r=e),t()})})}function d(e,t,n,i,o,s,a,u){function c(){function t(e,t){function r(){return++i===o.length&&t(),!1}var i=0,o=Object.keys(n._attachments||{});if(!o.length)return t();for(var s=0;s<o.length;s++)!function(t){var i="INSERT INTO "+U+" (digest, seq) VALUES (?,?)",o=[n._attachments[t].digest,e];w.executeSql(i,o,r,r)}(o[s])}var n=e.data,r=i?1:0,o=n._id,s=n._rev,a=l(n),u="INSERT INTO "+D+" (doc_id, rev, json, deleted) VALUES (?, ?, ?, ?);",c=[o,s,a,r];w.executeSql(u,c,function(e,n){var r=n.insertId;t(r,function(){h(e,r)})},function(){var e=v("seq",D,null,"doc_id=? AND rev=?");return w.executeSql(e,[o,s],function(e,n){var i=n.rows.item(0).seq,u="UPDATE "+D+" SET json=?, deleted=? WHERE doc_id=? AND rev=?;",c=[a,r,o,s];e.executeSql(u,c,function(e){t(i,function(){h(e,i)})})}),!1})}function f(e){_||(e?(_=e,u(_)):g===y.length&&c())}function d(e){g++,f(e)}function h(n,i){var s=e.metadata.id,c=e.stemmedRevs||[];o&&r.auto_compaction&&(c=O.compactTree(e.metadata).concat(c)),c.length&&p(c,s,n),e.metadata.seq=i;var f=e.metadata.rev;delete e.metadata.rev;var l=o?"UPDATE "+L+" SET json=?, max_seq=?, winningseq=(SELECT seq FROM "+D+" WHERE doc_id="+L+".id AND rev=?) WHERE id=?":"INSERT INTO "+L+" (id, winningseq, max_seq, json) VALUES (?,?,?,?);",d=x.safeJsonStringify(e.metadata),h=o?[d,i,t,s]:[s,i,i,d];n.executeSql(l,h,function(){N[a]={ok:!0,id:e.metadata.id,rev:f},R.set(s,e.metadata),u()})}var _=null,g=0;e.data._id=e.metadata.id,e.data._rev=e.metadata.rev;var y=Object.keys(e.data._attachments||{});i&&(e.data._deleted=!0),y.forEach(function(n){var r=e.data._attachments[n];if(r.stub)g++,f();else{var i=r.data;delete r.data,r.revpos=parseInt(t,10);E(r.digest,i,d)}}),y.length||c()}function h(){q.processDocs(e.revs_limit,S,r,R,w,N,d,n)}function g(e){function t(){++n===S.length&&e()}if(!S.length)return e();var n=0;S.forEach(function(e){if(e._id&&q.isLocalId(e._id))return t();var n=e.metadata.id;w.executeSql("SELECT json FROM "+L+" WHERE id = ?",[n],function(e,r){if(r.rows.length){var i=x.safeJsonParse(r.rows.item(0).json);R.set(n,i)}t()})})}function E(e,t,n){var r="SELECT digest FROM "+C+" WHERE digest=?";w.executeSql(r,[e],function(i,o){if(o.rows.length)return n();r="INSERT INTO "+C+" (digest, body, escaped) VALUES (?,?,1)",i.executeSql(r,[e,c(t)],function(){n()},function(){return n(),!1})})}var y=n.new_edits,m=t.docs,S=m.map(function(t){return t._id&&q.isLocalId(t._id)?t:q.parseDoc(t,y,e)}),b=S.filter(function(e){return e.error});if(b.length)return s(b[0]);var w,I,N=new Array(S.length),R=new T.Map;q.preprocessAttachments(S,"binary",function(e){if(e)return s(e);i.transaction(function(e){w=e,f(function(e){e?I=e:g(h)})},_(s),a)})}function y(e){return e.websql(e.name,e.version,e.description,e.size)}function m(e){try{return{db:y(e)}}catch(e){return{error:e}}}function S(e){var t=j.get(e.name);return t||(t=m(e),j.set(e.name,t)),t}function b(e,t,n,r,i){function o(){++u===a.length&&i&&i()}function s(e,i){var s=e._attachments[i],a={binary:t.binary,ctx:r};n._getAttachment(e._id,i,s,a,function(t,n){e._attachments[i]=I.assign(I.pick(s,["digest","content_type"]),{data:n}),o()})}var a=Object.keys(e._attachments||{});if(!a.length)return i&&i();var u=0;a.forEach(function(n){t.attachments&&t.include_docs?s(e,n):(e._attachments[n].stub=!0,o())})}function w(e,t){function n(){I.hasLocalStorage()&&(window.localStorage["_pouch__websqldb_"+K._name]=!0),t(null,K)}function r(e,t){e.executeSql(H),e.executeSql("ALTER TABLE "+D+" ADD COLUMN deleted TINYINT(1) DEFAULT 0",[],function(){e.executeSql(P),e.executeSql("ALTER TABLE "+L+" ADD COLUMN local TINYINT(1) DEFAULT 0",[],function(){e.executeSql("CREATE INDEX IF NOT EXISTS 'doc-store-local-idx' ON "+L+" (local, id)");var n="SELECT "+L+".winningseq AS seq, "+L+".json AS metadata FROM "+D+" JOIN "+L+" ON "+D+".seq = "+L+".winningseq";e.executeSql(n,[],function(e,n){for(var r=[],i=[],o=0;o<n.rows.length;o++){var s=n.rows.item(o),a=s.seq,u=JSON.parse(s.metadata);q.isDeleted(u)&&r.push(a),q.isLocalId(u.id)&&i.push(u.id)}e.executeSql("UPDATE "+L+"SET local = 1 WHERE id IN "+h(i.length),i,function(){e.executeSql("UPDATE "+D+" SET deleted = 1 WHERE seq IN "+h(r.length),r,t)})})})})}function i(e,t){var n="CREATE TABLE IF NOT EXISTS "+B+" (id UNIQUE, rev, json)";e.executeSql(n,[],function(){var n="SELECT "+L+".id AS id, "+D+".json AS data FROM "+D+" JOIN "+L+" ON "+D+".seq = "+L+".winningseq WHERE local = 1";e.executeSql(n,[],function(e,n){function r(){if(!i.length)return t(e);var n=i.shift(),o=JSON.parse(n.data)._rev;e.executeSql("INSERT INTO "+B+" (id, rev, json) VALUES (?,?,?)",[n.id,o,n.data],function(e){e.executeSql("DELETE FROM "+L+" WHERE id=?",[n.id],function(e){e.executeSql("DELETE FROM "+D+" WHERE seq=?",[n.seq],function(){r()})})})}for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o));r()})})}function o(e,t){function n(n){function r(){if(!n.length)return t(e);var i=n.shift(),o=a(i.hex,Y),s=o.lastIndexOf("::"),u=o.substring(0,s),c=o.substring(s+2),f="UPDATE "+D+" SET doc_id=?, rev=? WHERE doc_id_rev=?";e.executeSql(f,[u,c,o],function(){r()})}r()}var r="ALTER TABLE "+D+" ADD COLUMN doc_id";e.executeSql(r,[],function(e){var t="ALTER TABLE "+D+" ADD COLUMN rev";e.executeSql(t,[],function(e){e.executeSql(W,[],function(e){var t="SELECT hex(doc_id_rev) as hex FROM "+D;e.executeSql(t,[],function(e,t){for(var r=[],i=0;i<t.rows.length;i++)r.push(t.rows.item(i));n(r)})})})})}function s(e,t){function n(e){var n="SELECT COUNT(*) AS cnt FROM "+C;e.executeSql(n,[],function(e,n){function r(){var n=v(G+", "+L+".id AS id",[L,D],X,null,L+".id ");n+=" LIMIT "+o+" OFFSET "+i,i+=o,e.executeSql(n,[],function(e,n){if(!n.rows.length)return t(e);for(var i={},o=0;o<n.rows.length;o++)for(var s=n.rows.item(o),a=d(s.data,s.id,s.rev),u=Object.keys(a._attachments||{}),c=0;c<u.length;c++){var f=a._attachments[u[c]];!function(e,t){var n=i[e]=i[e]||[];-1===n.indexOf(t)&&n.push(t)}(f.digest,s.seq)}var l=[];if(Object.keys(i).forEach(function(e){i[e].forEach(function(t){l.push([e,t])})}),!l.length)return r();var h=0;l.forEach(function(t){var n="INSERT INTO "+U+" (digest, seq) VALUES (?,?)";e.executeSql(n,t,function(){++h===l.length&&r()})})})}if(!n.rows.item(0).cnt)return t(e);var i=0,o=10;r()})}var r="CREATE TABLE IF NOT EXISTS "+U+" (digest, seq INTEGER)";e.executeSql(r,[],function(e){e.executeSql(V,[],function(e){e.executeSql(J,[],n)})})}function u(e,t){var n="ALTER TABLE "+C+" ADD COLUMN escaped TINYINT(1) DEFAULT 0";e.executeSql(n,[],t)}function c(e,t){var n="ALTER TABLE "+L+" ADD COLUMN max_seq INTEGER";e.executeSql(n,[],function(e){var n="UPDATE "+L+" SET max_seq=(SELECT MAX(seq) FROM "+D+" WHERE doc_id=id)";e.executeSql(n,[],function(e){var n="CREATE UNIQUE INDEX IF NOT EXISTS 'doc-max-seq-idx' ON "+L+" (max_seq)";e.executeSql(n,[],t)})})}function y(e,t){e.executeSql('SELECT HEX("a") AS hex',[],function(e,n){var r=n.rows.item(0).hex;Y=2===r.length?"UTF-8":"UTF-16",t()})}function m(){for(;ee.length>0;){ee.pop()(null,$)}}function w(e,t){if(0===t){var n="CREATE TABLE IF NOT EXISTS "+M+" (dbid, db_version INTEGER)",a="CREATE TABLE IF NOT EXISTS "+C+" (digest UNIQUE, escaped TINYINT(1), body BLOB)",f="CREATE TABLE IF NOT EXISTS "+U+" (digest, seq INTEGER)",l="CREATE TABLE IF NOT EXISTS "+L+" (id unique, json, winningseq, max_seq INTEGER UNIQUE)",d="CREATE TABLE IF NOT EXISTS "+D+" (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, json, deleted TINYINT(1), doc_id, rev)",h="CREATE TABLE IF NOT EXISTS "+B+" (id UNIQUE, rev, json)";e.executeSql(a),e.executeSql(h),e.executeSql(f,[],function(){e.executeSql(J),e.executeSql(V)}),e.executeSql(l,[],function(){e.executeSql(H),e.executeSql(d,[],function(){e.executeSql(P),e.executeSql(W),e.executeSql(n,[],function(){var t="INSERT INTO "+M+" (db_version, dbid) VALUES (?,?)";$=I.uuid();var n=[R,$];e.executeSql(t,n,function(){m()})})})})}else{var v=function(){t<R&&e.executeSql("UPDATE "+M+" SET db_version = "+R);var n="SELECT dbid FROM "+M;e.executeSql(n,[],function(e,t){$=t.rows.item(0).dbid,m()})},p=[r,i,o,s,u,c,v],_=t,g=function(e){p[_-1](e,g),_++};g(e)}}function T(e){var t="SELECT sql FROM sqlite_master WHERE tbl_name = "+M;e.executeSql(t,[],function(e,t){t.rows.length?/db_version/.test(t.rows.item(0).sql)?e.executeSql("SELECT db_version FROM "+M,[],function(e,t){w(e,t.rows.item(0).db_version)}):e.executeSql("ALTER TABLE "+M+" ADD COLUMN db_version INTEGER",[],function(){w(e,1)}):w(e,0)})}function j(e,t){var n="SELECT MAX(seq) AS seq FROM "+D;e.executeSql(n,[],function(e,n){var r=n.rows.item(0).seq||0;t(r)})}function z(e,t){var n=v("COUNT("+L+".id) AS 'num'",[L,D],X,D+".deleted=0");e.executeSql(n,[],function(e,n){t(n.rows.item(0).num)})}function Q(e,t,n,r,i){var o=v(G,[L,D],X,L+".id=?"),s=[t];e.executeSql(o,s,function(e,t){if(!t.rows.length){var o=A.createError(A.MISSING_DOC,"missing");return i(o)}var s=t.rows.item(0),a=x.safeJsonParse(s.metadata);r(O.latest(n,a))})}var Y,K=this,$=null,Z=g(e),ee=[];K._name=e.name;var te=I.assign({},e,{version:k,description:e.name,size:Z}),ne=S(te);if(ne.error)return _(t)(ne.error);var re=ne.db;"function"!=typeof re.readTransaction&&(re.readTransaction=re.transaction),function(){re.transaction(function(e){y(e,function(){T(e)})},_(t),n)}(),K._remote=!1,K.type=function(){return"websql"},K._id=I.toPromise(function(e){e(null,$)}),K._info=function(e){var t,n;re.readTransaction(function(e){j(e,function(e){t=e}),z(e,function(e){n=e})},_(e),function(){e(null,{doc_count:n,update_seq:t,websql_encoding:Y})})},K._bulkDocs=function(t,n,r){E(e,t,n,K,re,F,r)},K._get=function(e,t,n){function r(e){n(e,{doc:i,metadata:o,ctx:s})}var i,o,s=t.ctx;if(!s)return re.readTransaction(function(r){K._get(e,I.assign({ctx:r},t),n)});var a,u;if(t.rev){if(t.latest)return void Q(s,e,t.rev,function(r){t.latest=!1,t.rev=r,K._get(e,t,n)},r);a=v(G,[L,D],L+".id="+D+".doc_id",[D+".doc_id=?",D+".rev=?"]),u=[e,t.rev]}else a=v(G,[L,D],X,L+".id=?"),u=[e];s.executeSql(a,u,function(e,n){if(!n.rows.length){return r(A.createError(A.MISSING_DOC,"missing"))}var s=n.rows.item(0);if(o=x.safeJsonParse(s.metadata),s.deleted&&!t.rev){return r(A.createError(A.MISSING_DOC,"deleted"))}i=d(s.data,o.id,s.rev),r()})},K._allDocs=function(e,t){var n,r,i=[],o="startkey"in e&&e.startkey,s="endkey"in e&&e.endkey,a="key"in e&&e.key,u="keys"in e&&e.keys,c="descending"in e&&e.descending,f="limit"in e?e.limit:-1,l="skip"in e?e.skip:0,h=!1!==e.inclusive_end,p=[],g=[];if(u){var E=[],y="";u.forEach(function(e){-1===E.indexOf(e)&&(E.push(e),y+="?,")}),y=y.substring(0,y.length-1),g.push(L+".id IN ("+y+")"),p=p.concat(E)}else if(!1!==a)g.push(L+".id = ?"),p.push(a);else if(!1!==o||!1!==s){if(!1!==o&&(g.push(L+".id "+(c?"<=":">=")+" ?"),p.push(o)),!1!==s){var m=c?">":"<";h&&(m+="="),g.push(L+".id "+m+" ?"),p.push(s)}!1!==a&&(g.push(L+".id = ?"),p.push(a))}u||g.push(D+".deleted = 0"),re.readTransaction(function(t){if(z(t,function(e){n=e}),e.update_seq&&j(t,function(e){r=e}),0!==f){var o=v(G,[L,D],X,g,L+".id "+(c?"DESC":"ASC"));o+=" LIMIT "+f+" OFFSET "+l,t.executeSql(o,p,function(t,n){for(var r=0,o=n.rows.length;r<o;r++){var s=n.rows.item(r),a=x.safeJsonParse(s.metadata),c=a.id,f=d(s.data,c,s.rev),l=f._rev,h={id:c,key:c,value:{rev:l}};if(e.include_docs){if(h.doc=f,h.doc._rev=l,e.conflicts){var v=O.collectConflicts(a);v.length&&(h.doc._conflicts=v)}b(h.doc,e,K,t)}if(s.deleted){if(!u)continue;h.value.deleted=!0,h.doc=null}if(u){var p=u.indexOf(c,p);do{i[p]=h,p=u.indexOf(c,p+1)}while(p>-1&&p<u.length)}else i.push(h)}u&&u.forEach(function(e,t){i[t]||(i[t]={key:e,error:"not_found"})})})}},_(t),function(){var o={total_rows:n,offset:e.skip,rows:i};e.update_seq&&(o.update_seq=r),t(null,o)})},K._changes=function(e){if(e=I.clone(e),e.continuous){var t=K._name+":"+I.uuid();return F.addListener(K._name,t,K,e),F.notify(K._name),{cancel:function(){F.removeListener(K._name,t)}}}var n=e.descending;e.since=e.since&&!n?e.since:0;var r="limit"in e?e.limit:-1;0===r&&(r=1);var i=[],o=0;!function(){var t=L+".json AS metadata, "+L+".max_seq AS maxSeq, "+D+".json AS winningDoc, "+D+".rev AS winningRev ",s=L+" JOIN "+D,a=L+".id="+D+".doc_id AND "+L+".winningseq="+D+".seq",u=["maxSeq > ?"],c=[e.since];e.doc_ids&&(u.push(L+".id IN "+h(e.doc_ids.length)),c=c.concat(e.doc_ids));var f="maxSeq "+(n?"DESC":"ASC"),l=v(t,s,a,u,f),p=I.filterChange(e);e.view||e.filter||(l+=" LIMIT "+r);var g=e.since||0;re.readTransaction(function(t){t.executeSql(l,c,function(t,n){function s(t){return function(){e.onChange(t)}}for(var a=0,u=n.rows.length;a<u;a++){var c=n.rows.item(a),f=x.safeJsonParse(c.metadata);g=c.maxSeq;var l=d(c.winningDoc,f.id,c.winningRev),h=e.processChange(l,f,e);h.seq=c.maxSeq;var v=p(h);if("object"==typeof v)return e.complete(v);if(v&&(o++,e.return_docs&&i.push(h),e.attachments&&e.include_docs?b(l,e,K,t,s(h)):s(h)()),o===r)break}})},_(e.complete),function(){e.continuous||e.complete(null,{results:i,last_seq:g})})}()},K._close=function(e){e()},K._getAttachment=function(e,t,n,r,i){var o,s=r.ctx,u=n.digest,c=n.content_type,l="SELECT escaped, CASE WHEN escaped = 1 THEN body ELSE HEX(body) END AS body FROM "+C+" WHERE digest=?";s.executeSql(l,[u],function(e,t){var n=t.rows.item(0),s=n.escaped?f(n.body):a(n.body,Y);o=r.binary?N.binaryStringToBlobOrBuffer(s,c):N.btoa(s),i(null,o)})},K._getRevisionTree=function(e,t){re.readTransaction(function(n){var r="SELECT json AS metadata FROM "+L+" WHERE id = ?";n.executeSql(r,[e],function(e,n){if(n.rows.length){var r=x.safeJsonParse(n.rows.item(0).metadata);t(null,r.rev_tree)}else t(A.createError(A.MISSING_DOC))})})},K._doCompaction=function(e,t,n){if(!t.length)return n();re.transaction(function(n){var r="SELECT json AS metadata FROM "+L+" WHERE id = ?";n.executeSql(r,[e],function(n,r){var i=x.safeJsonParse(r.rows.item(0).metadata);O.traverseRevTree(i.rev_tree,function(e,n,r,i,o){var s=n+"-"+r;-1!==t.indexOf(s)&&(o.status="missing")});var o="UPDATE "+L+" SET json = ? WHERE id = ?";n.executeSql(o,[x.safeJsonStringify(i),e])}),p(t,e,n)},_(n),function(){n()})},K._getLocal=function(e,t){re.readTransaction(function(n){var r="SELECT json, rev FROM "+B+" WHERE id=?";n.executeSql(r,[e],function(n,r){if(r.rows.length){var i=r.rows.item(0),o=d(i.json,e,i.rev);t(null,o)}else t(A.createError(A.MISSING_DOC))})})},K._putLocal=function(e,t,n){function r(e){var r,c;o?(r="UPDATE "+B+" SET rev=?, json=? WHERE id=? AND rev=?",c=[i,u,s,o]):(r="INSERT INTO "+B+" (id, rev, json) VALUES (?,?,?)",c=[s,i,u]),e.executeSql(r,c,function(e,r){r.rowsAffected?(a={ok:!0,id:s,rev:i},t.ctx&&n(null,a)):n(A.createError(A.REV_CONFLICT))},function(){return n(A.createError(A.REV_CONFLICT)),!1})}"function"==typeof t&&(n=t,t={}),delete e._revisions;var i,o=e._rev,s=e._id;i=e._rev=o?"0-"+(parseInt(o.split("-")[1],10)+1):"0-1";var a,u=l(e);t.ctx?r(t.ctx):re.transaction(r,_(n),function(){a&&n(null,a)})},K._removeLocal=function(e,t,n){function r(r){var o="DELETE FROM "+B+" WHERE id=? AND rev=?",s=[e._id,e._rev];r.executeSql(o,s,function(r,o){if(!o.rowsAffected)return n(A.createError(A.MISSING_DOC));i={ok:!0,id:e._id,rev:"0-0"},t.ctx&&n(null,i)})}"function"==typeof t&&(n=t,t={});var i;t.ctx?r(t.ctx):re.transaction(r,_(n),function(){i&&n(null,i)})},K._destroy=function(e,t){F.removeAllListeners(K._name),re.transaction(function(e){[L,D,C,M,B,U].forEach(function(t){e.executeSql("DROP TABLE IF EXISTS "+t,[])})},_(t),function(){I.hasLocalStorage()&&(delete window.localStorage["_pouch__websqldb_"+K._name],delete window.localStorage[K._name]),t(null,{ok:!0})})}}var T=e(9),A=e(10),I=e(14),q=e(6),O=e(13),x=e(11),N=e(8),R=7,L=u("document-store"),D=u("by-sequence"),C=u("attach-store"),B=u("local-store"),M=u("metadata-store"),U=u("attach-seq-store"),j=new T.Map,F=new I.changesHandler,k=1,P="CREATE INDEX IF NOT EXISTS 'by-seq-deleted-idx' ON "+D+" (seq, deleted)",W="CREATE UNIQUE INDEX IF NOT EXISTS 'by-seq-doc-id-rev' ON "+D+" (doc_id, rev)",H="CREATE INDEX IF NOT EXISTS 'doc-winningseq-idx' ON "+L+" (winningseq)",J="CREATE INDEX IF NOT EXISTS 'attach-seq-seq-idx' ON "+U+" (seq)",V="CREATE UNIQUE INDEX IF NOT EXISTS 'attach-seq-digest-idx' ON "+U+" (digest, seq)",X=D+".seq = "+L+".winningseq",G=D+".seq AS seq, "+D+".deleted AS deleted, "+D+".json AS data, "+D+".rev AS rev, "+L+".json AS metadata";t.exports=w},{10:10,11:11,13:13,14:14,6:6,8:8,9:9}],8:[function(e,t,n){"use strict";function r(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,r=new n,i=0;i<e.length;i+=1)r.append(e[i]);return r.getBlob(t.type)}}function i(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function o(e,t){return r([i(e)],{type:t})}function s(e,t){return o(h(e),t)}function a(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return t}function u(e,t){var n=new FileReader,r="function"==typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";if(r)return t(n);t(a(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function c(e,t){u(e,function(e){t(e)})}function f(e,t){c(e,function(e){t(v(e))})}function l(e,t){var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}function d(){}Object.defineProperty(n,"__esModule",{value:!0});var h=function(e){return atob(e)},v=function(e){return btoa(e)};n.atob=h,n.btoa=v,n.base64StringToBlobOrBuffer=s,n.binaryStringToArrayBuffer=i,n.binaryStringToBlobOrBuffer=o,n.blob=r,n.blobOrBufferToBase64=f,n.blobOrBufferToBinaryString=c,n.readAsArrayBuffer=l,n.readAsBinaryString=u,n.typedBuffer=d},{}],9:[function(e,t,n){"use strict"
2
- ;function r(e){return"$"+e}function i(e){return e.substring(1)}function o(){this._store={}}function s(e){if(this._store=new o,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o.prototype.get=function(e){var t=r(e);return this._store[t]},o.prototype.set=function(e,t){var n=r(e);return this._store[n]=t,!0},o.prototype.has=function(e){return r(e)in this._store},o.prototype.delete=function(e){var t=r(e),n=t in this._store;return delete this._store[t],n},o.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;n<r;n++){var o=t[n],s=this._store[o];o=i(o),e(s,o)}},Object.defineProperty(o.prototype,"size",{get:function(){return Object.keys(this._store).length}}),s.prototype.add=function(e){return this._store.set(e,!0)},s.prototype.has=function(e){return this._store.has(e)},s.prototype.forEach=function(e){this._store.forEach(function(t,n){e(n)})},Object.defineProperty(s.prototype,"size",{get:function(){return this._store.size}}),!function(){if("undefined"==typeof Symbol||"undefined"==typeof Map||"undefined"==typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?(n.Set=s,n.Map=o):(n.Set=Set,n.Map=Map)},{}],10:[function(e,t,n){"use strict";function r(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}function i(e,t){function n(t){for(var n in e)"function"!=typeof e[n]&&(this[n]=e[n]);void 0!==t&&(this.reason=t)}return n.prototype=r.prototype,new n(t)}function o(e){if("object"!=typeof e){var t=e;e=v,e.data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}Object.defineProperty(n,"__esModule",{value:!0}),function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(e(5))(r,Error),r.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};var s=new r(401,"unauthorized","Name or password is incorrect."),a=new r(400,"bad_request","Missing JSON list of 'docs'"),u=new r(404,"not_found","missing"),c=new r(409,"conflict","Document update conflict"),f=new r(400,"bad_request","_id field must contain a string"),l=new r(412,"missing_id","_id is required for puts"),d=new r(400,"bad_request","Only reserved document ids may start with underscore."),h=new r(412,"precondition_failed","Database not open"),v=new r(500,"unknown_error","Database encountered an unknown error"),p=new r(500,"badarg","Some query argument is invalid"),_=new r(400,"invalid_request","Request was invalid"),g=new r(400,"query_parse_error","Some query parameter is invalid"),E=new r(500,"doc_validation","Bad special document member"),y=new r(400,"bad_request","Something wrong with the request"),m=new r(400,"bad_request","Document must be a JSON object"),S=new r(404,"not_found","Database not found"),b=new r(500,"indexed_db_went_bad","unknown"),w=new r(500,"web_sql_went_bad","unknown"),T=new r(500,"levelDB_went_went_bad","unknown"),A=new r(403,"forbidden","Forbidden by design doc validate_doc_update function"),I=new r(400,"bad_request","Invalid rev format"),q=new r(412,"file_exists","The database could not be created, the file already exists."),O=new r(412,"missing_stub","A pre-existing attachment stub wasn't found"),x=new r(413,"invalid_url","Provided URL is invalid");n.UNAUTHORIZED=s,n.MISSING_BULK_DOCS=a,n.MISSING_DOC=u,n.REV_CONFLICT=c,n.INVALID_ID=f,n.MISSING_ID=l,n.RESERVED_ID=d,n.NOT_OPEN=h,n.UNKNOWN_ERROR=v,n.BAD_ARG=p,n.INVALID_REQUEST=_,n.QUERY_PARSE_ERROR=g,n.DOC_VALIDATION=E,n.BAD_REQUEST=y,n.NOT_AN_OBJECT=m,n.DB_MISSING=S,n.WSQ_ERROR=w,n.LDB_ERROR=T,n.FORBIDDEN=A,n.INVALID_REV=I,n.FILE_EXISTS=q,n.MISSING_STUB=O,n.IDB_ERROR=b,n.INVALID_URL=x,n.createError=i,n.generateErrorFromResponse=o},{5:5}],11:[function(e,t,n){"use strict";function r(e){try{return JSON.parse(e)}catch(t){return o.parse(e)}}function i(e){try{return JSON.stringify(e)}catch(t){return o.stringify(e)}}Object.defineProperty(n,"__esModule",{value:!0});var o=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(e(21));n.safeJsonParse=r,n.safeJsonStringify=i},{21:21}],12:[function(e,t,n){(function(t){"use strict";function r(e){return c.btoa(e)}function i(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}function o(e,t,n,r,o){(n>0||r<t.size)&&(t=i(t,n,r)),c.readAsArrayBuffer(t,function(t){e.append(t),o()})}function s(e,t,n,r,i){(n>0||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),i()}function a(e,t){function n(){l(a)}function i(){var e=_.end(!0),n=r(e);t(n),_.destroy()}function a(){var t=p*h,r=t+h;p++,p<v?g(_,e,t,r,n):g(_,e,t,r,i)}var u="string"==typeof e,c=u?e.length:e.size,h=Math.min(d,c),v=Math.ceil(c/h),p=0,_=u?new f:new f.ArrayBuffer,g=u?s:o;a()}function u(e){return f.hash(e)}Object.defineProperty(n,"__esModule",{value:!0});var c=e(8),f=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(e(15)),l=t.setImmediate||t.setTimeout,d=32768;n.binaryMd5=a,n.stringMd5=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{15:15,8:8}],13:[function(e,t,n){"use strict";function r(e){for(var t,n,r,i,o=e.rev_tree.slice();i=o.pop();){var s=i.ids,a=s[2],u=i.pos;if(a.length)for(var c=0,f=a.length;c<f;c++)o.push({pos:u+1,ids:a[c]});else{var l=!!s[1].deleted,d=s[0];t&&!(r!==l?r:n!==u?n<u:t<d)||(t=d,n=u,r=l)}}return n+"-"+t}function i(e,t){for(var n,r=e.slice();n=r.pop();)for(var i=n.pos,o=n.ids,s=o[2],a=t(0===s.length,i,o[0],n.ctx,o[1]),u=0,c=s.length;u<c;u++)r.push({pos:i+1,ids:s[u],ctx:a})}function o(e,t){return e.pos-t.pos}function s(e){var t=[];i(e,function(e,n,r,i,o){e&&t.push({rev:n+"-"+r,pos:n,opts:o})}),t.sort(o).reverse();for(var n=0,r=t.length;n<r;n++)delete t[n].pos;return t}function a(e){for(var t=r(e),n=s(e.rev_tree),i=[],o=0,a=n.length;o<a;o++){var u=n[o];u.rev===t||u.opts.deleted||i.push(u.rev)}return i}function u(e){var t=[];return i(e.rev_tree,function(e,n,r,i,o){"available"!==o.status||e||(t.push(n+"-"+r),o.status="missing")}),t}function c(e){for(var t,n=[],r=e.slice();t=r.pop();){var i=t.pos,o=t.ids,s=o[0],a=o[1],u=o[2],c=0===u.length,f=t.history?t.history.slice():[];f.push({id:s,opts:a}),c&&n.push({pos:i+1-f.length,ids:f});for(var l=0,d=u.length;l<d;l++)r.push({pos:i+1,ids:u[l],history:f})}return n.reverse()}function f(e,t){return e.pos-t.pos}function l(e,t,n){for(var r,i=0,o=e.length;i<o;)r=i+o>>>1,n(e[r],t)<0?i=r+1:o=r;return i}function d(e,t,n){var r=l(e,t,n);e.splice(r,0,t)}function h(e,t){for(var n,r,i=t,o=e.length;i<o;i++){var s=e[i],a=[s.id,s.opts,[]];r?(r[2].push(a),r=a):n=r=a}return n}function v(e,t){return e[0]<t[0]?-1:1}function p(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var i=n.pop(),o=i.tree1,s=i.tree2;(o[1].status||s[1].status)&&(o[1].status="available"===o[1].status||"available"===s[1].status?"available":"missing");for(var a=0;a<s[2].length;a++)if(o[2][0]){for(var u=!1,c=0;c<o[2].length;c++)o[2][c][0]===s[2][a][0]&&(n.push({tree1:o[2][c],tree2:s[2][a]}),u=!0);u||(r="new_branch",d(o[2],s[2][a],v))}else r="new_leaf",o[2][0]=s[2][a]}return{conflicts:r,tree:e}}function _(e,t,n){var r,i=[],o=!1,s=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var a=0,u=e.length;a<u;a++){var c=e[a];if(c.pos===t.pos&&c.ids[0]===t.ids[0])r=p(c.ids,t.ids),i.push({pos:c.pos,ids:r.tree}),o=o||r.conflicts,s=!0;else if(!0!==n){var l=c.pos<t.pos?c:t,d=c.pos<t.pos?t:c,h=d.pos-l.pos,v=[],_=[];for(_.push({ids:l.ids,diff:h,parent:null,parentIdx:null});_.length>0;){var g=_.pop();if(0!==g.diff)for(var E=g.ids[2],y=0,m=E.length;y<m;y++)_.push({ids:E[y],diff:g.diff-1,parent:g.ids,parentIdx:y});else g.ids[0]===d.ids[0]&&v.push(g)}var S=v[0];S?(r=p(S.ids,d.ids),S.parent[2][S.parentIdx]=r.tree,i.push({pos:l.pos,ids:l.ids}),o=o||r.conflicts,s=!0):i.push(c)}else i.push(c)}return s||i.push(t),i.sort(f),{tree:i,conflicts:o||"internal_node"}}function g(e,t){for(var n,r,o=c(e),s=0,a=o.length;s<a;s++){var u,f=o[s],l=f.ids;if(l.length>t){n||(n={});var d=l.length-t;u={pos:f.pos+d,ids:h(l,d)};for(var v=0;v<d;v++){var p=f.pos+v+"-"+l[v].id;n[p]=!0}}else u={pos:f.pos,ids:h(l,0)};r=r?_(r,u,!0).tree:[u]}return n&&i(r,function(e,t,r){delete n[t+"-"+r]}),{tree:r,revs:n?Object.keys(n):[]}}function E(e,t,n){var r=_(e,t),i=g(r.tree,n);return{tree:i.tree,stemmedRevs:i.revs,conflicts:r.conflicts}}function y(e,t){for(var n,r=e.slice(),i=t.split("-"),o=parseInt(i[0],10),s=i[1];n=r.pop();){if(n.pos===o&&n.ids[0]===s)return!0;for(var a=n.ids[2],u=0,c=a.length;u<c;u++)r.push({pos:n.pos+1,ids:a[u]})}return!1}function m(e){return e.ids}function S(e,t){t||(t=r(e));for(var n,i=t.substring(t.indexOf("-")+1),o=e.rev_tree.map(m);n=o.pop();){if(n[0]===i)return!!n[1].deleted;o=o.concat(n[2])}}function b(e){return/^_local/.test(e)}function w(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var i=n.pos,o=n.ids,s=o[0],a=o[1],u=o[2],c=0===u.length,f=n.history?n.history.slice():[];if(f.push({id:s,pos:i,opts:a}),c)for(var l=0,d=f.length;l<d;l++){var h=f[l],v=h.pos+"-"+h.id;if(v===e)return i+"-"+s}for(var p=0,_=u.length;p<_;p++)r.push({pos:i+1,ids:u[p],history:f})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}Object.defineProperty(n,"__esModule",{value:!0}),n.collectConflicts=a,n.collectLeaves=s,n.compactTree=u,n.isDeleted=S,n.isLocalId=b,n.merge=E,n.revExists=y,n.rootToLeaf=c,n.traverseRevTree=i,n.winningRev=r,n.latest=w},{}],14:[function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function i(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}function o(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}function s(e){if(e instanceof ArrayBuffer)return o(e);var t=e.size,n=e.type;return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}function a(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&z.call(n)==Q}function u(e){var t,n,r;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=u(e[n]);return t}if(e instanceof Date)return e.toISOString();if(i(e))return s(e);if(!a(e))return e;t={};for(n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=u(e[n]);void 0!==o&&(t[n]=o)}return t}function c(e){var t=!1;return F(function(n){if(t)throw new Error("once called more than once");t=!0,e.apply(this,n)})}function f(e){return F(function(t){t=u(t);var n=this,r="function"==typeof t[t.length-1]&&t.pop(),i=new Promise(function(r,i){var o;try{var s=c(function(e,t){e?i(e):r(t)});t.push(s),o=e.apply(n,t),o&&"function"==typeof o.then&&r(o)}catch(e){i(e)}});return r&&i.then(function(e){r(null,e)},r),i})}function l(e,t,n){if(e.constructor.listeners("debug").length){for(var r=["api",e.name,t],i=0;i<n.length-1;i++)r.push(n[i]);e.constructor.emit("debug",r);var o=n[n.length-1];n[n.length-1]=function(n,r){var i=["api",e.name,t];i=i.concat(n?["error",n]:["success",r]),e.constructor.emit("debug",i),o(n,r)}}}function d(e,t){return f(F(function(n){if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var r=this;return l(r,e,n),this.taskqueue.isReady?t.apply(this,n):new Promise(function(t,i){r.taskqueue.addTask(function(o){o?i(o):t(r[e].apply(r,n))})})}))}function h(e,t){for(var n={},r=0,i=t.length;r<i;r++){var o=t[r];o in e&&(n[o]=e[o])}return n}function v(e){return e}function p(e){return[{ok:e}]}function _(e,t,n){function r(){var e=[];d.forEach(function(t){t.docs.forEach(function(n){e.push({id:t.id,docs:[n]})})}),n(null,{results:e})}function i(){++l===f&&r()}function o(e,t,n){d[e]={id:t,docs:n},i()}function s(){if(!(g>=_.length)){var e=Math.min(g+Y,_.length),t=_.slice(g,e);a(t,g),g+=t.length}}function a(n,r){n.forEach(function(n,i){var a=r+i,u=c.get(n),f=h(u[0],["atts_since","attachments"]);f.open_revs=u.map(function(e){return e.rev}),f.open_revs=f.open_revs.filter(v);var l=v;0===f.open_revs.length&&(delete f.open_revs,l=p),["revs","attachments","binary","ajax","latest"].forEach(function(e){e in t&&(f[e]=t[e])}),e.get(n,f,function(e,t){var r;r=e?[{error:e}]:l(t),o(a,n,r),s()})})}var u=t.docs,c=new k.Map;u.forEach(function(e){c.has(e.id)?c.get(e.id).push(e):c.set(e.id,[e])});var f=c.size,l=0,d=new Array(f),_=[];c.forEach(function(e,t){_.push(t)});var g=0;s()}function g(){return j}function E(e){g()&&addEventListener("storage",function(t){e.emit(t.key)})}function y(){W.EventEmitter.call(this),this._listeners={},E(this)}function m(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function S(e,t){return e=parseInt(e,10)||0,t=parseInt(t,10),t!==t||t<=e?t=(e||1)<<1:t+=1,t>6e5&&(e=3e5,t=6e5),~~((t-e)*Math.random()+e)}function b(e){var t=0;return e||(t=2e3),S(e,t)}function w(e,t){m("info","The above "+e+" is totally normal. "+t)}function T(e,t,n){try{return!e(t,n)}catch(e){var r="Filter function threw: "+e.toString();return J.createError(J.BAD_REQUEST,r)}}function A(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var i=n&&T(e.filter,r.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in r.doc._attachments)r.doc._attachments.hasOwnProperty(o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}function I(e){for(var t=[],n=0,r=e.length;n<r;n++)t=t.concat(e[n]);return t}function q(){}function O(e){var t;if(e?"string"!=typeof e?t=J.createError(J.INVALID_ID):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=J.createError(J.RESERVED_ID)):t=J.createError(J.MISSING_ID),t)throw t}function x(e){return"boolean"==typeof e._remote?e._remote:"function"==typeof e.type&&(m("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())}function N(e,t){return"listenerCount"in e?e.listenerCount(t):W.EventEmitter.listenerCount(e,t)}function R(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function L(e){var t=R(e);return t?t.join("/"):null}function D(e){for(var t=oe.exec(e),n={},r=14;r--;){var i=ne[r],o=t[r]||"",s=-1!==["user","password"].indexOf(i);n[i]=s?decodeURIComponent(o):o}return n[re]={},n[ne[12]].replace(ie,function(e,t,r){t&&(n[re][t]=r)}),n}function C(e,t){var n=[],r=[];for(var i in t)t.hasOwnProperty(i)&&(n.push(i),r.push(t[i]));return n.push(e),Function.apply(null,n).apply(null,r)}function B(e,t,n){return new Promise(function(r,i){e.get(t,function(o,s){if(o){if(404!==o.status)return i(o);s={}}var a=s._rev,u=n(s);if(!u)return r({updated:!1,rev:a});u._id=t,u._rev=a,r(M(e,u,n))})})}function M(e,t,n){return e.put(t).then(function(e){return{updated:!0,rev:e.rev}},function(r){if(409!==r.status)throw r;return B(e,t._id,n)})}function U(e,t){var n=G.clone(e);return t?(delete n._rev_tree,X.stringMd5(JSON.stringify(n))):V.v4().replace(/-/g,"").toLowerCase()}Object.defineProperty(n,"__esModule",{value:!0});var j,F=r(e(2)),k=e(9),P=r(e(4)),W=e(3),H=r(e(5)),J=e(10),V=r(e(16)),X=e(12),G=e(14),z=Function.prototype.toString,Q=z.call(Object),Y=6;try{localStorage.setItem("_pouch_check_localstorage",1),j=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){j=!1}H(y,W.EventEmitter),y.prototype.addListener=function(e,t,n,r){function i(){function e(){s=!1}if(o._listeners[t]){if(s)return void(s="waiting");s=!0;var a=h(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);n.changes(a).on("change",function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===s&&P(i),s=!1}).on("error",e)}}if(!this._listeners[t]){var o=this,s=!1;this._listeners[t]=i,this.on(e,i)}},y.prototype.removeListener=function(e,t){t in this._listeners&&(W.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},y.prototype.notifyLocalWindows=function(e){g()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},y.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var K;K="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};var $,Z=K,ee=q.name;$=ee?function(e){return e.name}:function(e){var t=e.toString().match(/^\s*function\s*(?:(\S+)\s*)?\(/);return t&&t[1]?t[1]:""};var te=$,ne=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],re="queryKey",ie=/(?:^|&)([^&=]*)=?([^&]*)/g,oe=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,se=V.v4;n.adapterFun=d,n.assign=Z,n.bulkGetShim=_,n.changesHandler=y,n.clone=u,n.defaultBackOff=b,n.explainError=w,n.filterChange=A,n.flatten=I,n.functionName=te,n.guardedConsole=m,n.hasLocalStorage=g,n.invalidIdError=O,n.isRemote=x,n.listenerCount=N,n.nextTick=P,n.normalizeDdocFunctionName=L,n.once=c,n.parseDdocFunctionName=R,n.parseUri=D,n.pick=h,n.rev=U,n.scopeEval=C,n.toPromise=f,n.upsert=B,n.uuid=se},{10:10,12:12,14:14,16:16,2:2,3:3,4:4,5:5,9:9}],15:[function(t,n,r){!function(t){if("object"==typeof r)n.exports=t();else if("function"==typeof e&&e.amd)e(t);else{var i;try{i=window}catch(e){i=self}i.SparkMD5=t()}}(function(e){"use strict";function t(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];n+=(r&i|~r&o)+t[0]-680876936|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[2]+606105819|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[3]-1044525330|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+t[4]-176418897|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[7]-45705983|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+t[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[10]-42063|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[11]-1990404162|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+t[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+t[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+t[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+t[15]+1236535329|0,r=(r<<22|r>>>10)+i|0,n+=(r&o|i&~o)+t[1]-165796510|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[11]+643717713|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[0]-373897302|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+t[5]-701558691|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[15]-660478335|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[4]-405537848|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+t[9]+568446438|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[3]-187363961|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[8]+1163531501|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+t[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+t[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+t[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+t[12]-1926607734|0,r=(r<<20|r>>>12)+i|0,n+=(r^i^o)+t[5]-378558|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[14]-35309556|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+t[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[7]-155497632|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[10]-1094730640|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+t[13]+681279174|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[3]-722521979|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[6]+76029189|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+t[9]-640364487|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+t[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+t[15]+530742520|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+t[2]-995338651|0,r=(r<<23|r>>>9)+i|0,n+=(i^(r|~o))+t[0]-198630844|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[5]-57434055|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+t[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[10]-1051523|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[1]-2054922799|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+t[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[13]+1309151649|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+t[4]-145523070|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+t[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+t[2]+718787259|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+t[9]-343485551|0,r=(r<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var r,i,o,s,a,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=c;r+=64)t(f,n(e.substring(r-64,r)));for(e=e.substring(r-64),i=e.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)o[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(o[r>>2]|=128<<(r%4<<3),r>55)for(t(f,o),r=0;r<16;r+=1)o[r]=0;return s=8*c,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,t(f,o),f}function o(e){var n,i,o,s,a,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=c;n+=64)t(f,r(e.subarray(n-64,n)));for(e=n-64<c?e.subarray(n-64):new Uint8Array(0),i=e.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0;n<i;n+=1)o[n>>2]|=e[n]<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(t(f,o),n=0;n<16;n+=1)o[n]=0;return s=8*c,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,t(f,o),f}function s(e){var t,n="";for(t=0;t<4;t+=1)n+=v[e>>8*t+4&15]+v[e>>8*t&15];return n}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function l(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}var v=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return"5d41402abc4b2a76b9719d911017c592"!==a(i("hello"))&&function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return e=0|e||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),f=u;return r!==e&&(f=t(r,u)),c>f?new ArrayBuffer(0):(i=f-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),h.prototype.append=function(e){return this.appendBinary(u(e)),this},h.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var r,i=this._buff.length;for(r=64;r<=i;r+=64)t(this._hash,n(this._buff.substring(r-64,r)));return this._buff=this._buff.substring(r-64),this},h.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=d(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},h.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(e,n){var r,i,o,s=n;if(e[s>>2]|=128<<(s%4<<3),s>55)for(t(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=8*this._length,r=r.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,t(this._hash,e)},h.hash=function(e,t){return h.hashBinary(u(e),t)},h.hashBinary=function(e,t){var n=i(e),r=a(n);return t?d(r):r},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(e){var n,i=l(this._buff.buffer,e,!0),o=i.length;for(this._length+=e.byteLength,n=64;n<=o;n+=64)t(this._hash,r(i.subarray(n-64,n)));return this._buff=n-64<o?new Uint8Array(i.buffer.slice(n-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=d(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var e=h.prototype.getState.call(this);return e.buff=f(e.buff),e},h.ArrayBuffer.prototype.setState=function(e){return e.buff=c(e.buff,!0),h.prototype.setState.call(this,e)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(e,t){var n=o(new Uint8Array(e)),r=a(n);return t?d(r):r},h})},{}],16:[function(e,t,n){var r=e(19),i=e(20),o=i;o.v1=r,o.v4=i,t.exports=o},{19:19,20:20}],17:[function(e,t,n){function r(e,t){var n=t||0,r=i;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}for(var i=[],o=0;o<256;++o)i[o]=(o+256).toString(16).substr(1);t.exports=r},{}],18:[function(e,t,n){var r="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(r){var i=new Uint8Array(16);t.exports=function(){return r(i),i}}else{var o=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},{}],19:[function(e,t,n){function r(e,t,n){var r=t&&n||0,f=t||[];e=e||{};var l=e.node||i,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var h=s();null==l&&(l=i=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),p=void 0!==e.nsecs?e.nsecs:c+1,_=v-u+(p-c)/1e4;if(_<0&&void 0===e.clockseq&&(d=d+1&16383),(_<0||v>u)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=v,c=p,o=d,v+=122192928e5;var g=(1e4*(268435455&v)+p)%4294967296;f[r++]=g>>>24&255,f[r++]=g>>>16&255,f[r++]=g>>>8&255,f[r++]=255&g;var E=v/4294967296*1e4&268435455;f[r++]=E>>>8&255,f[r++]=255&E,f[r++]=E>>>24&15|16,f[r++]=E>>>16&255,f[r++]=d>>>8|128,f[r++]=255&d;for(var y=0;y<6;++y)f[r+y]=l[y];return t||a(f)}var i,o,s=e(18),a=e(17),u=0,c=0;t.exports=r},{17:17,18:18}],20:[function(e,t,n){function r(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[r+a]=s[a];return t||o(s)}var i=e(18),o=e(17);t.exports=r},{17:17,18:18}],21:[function(e,t,n){"use strict";function r(e,t,n){var r=n[n.length-1];e===r.element&&(n.pop(),r=n[n.length-1]);var i=r.element,o=r.index;if(Array.isArray(i))i.push(e);else if(o===t.length-2){var s=t.pop();i[s]=e}else t.push(e)}n.stringify=function(e){var t=[];t.push({obj:e});for(var n,r,i,o,s,a,u,c,f,l,d,h="";n=t.pop();)if(r=n.obj,i=n.prefix||"",o=n.val||"",h+=i,o)h+=o;else if("object"!=typeof r)h+=void 0===r?null:JSON.stringify(r);else if(null===r)h+="null";else if(Array.isArray(r)){for(t.push({val:"]"}),s=r.length-1;s>=0;s--)a=0===s?"":",",t.push({obj:r[s],prefix:a});t.push({val:"["})}else{u=[];for(c in r)r.hasOwnProperty(c)&&u.push(c);for(t.push({val:"}"}),s=u.length-1;s>=0;s--)f=u[s],l=r[f],d=s>0?",":"",d+=JSON.stringify(f)+":",t.push({obj:l,prefix:d});t.push({val:"{"})}return h},n.parse=function(e){for(var t,n,i,o,s,a,u,c,f,l=[],d=[],h=0;;)if("}"!==(t=e[h++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":h+=3,r(null,l,d);break;case"t":h+=3,r(!0,l,d);break;case"f":h+=4,r(!1,l,d);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",h--;;){if(i=e[h++],!/[\d\.\-e\+]/.test(i)){h--;break}n+=i}r(parseFloat(n),l,d);break;case'"':for(o="",s=void 0,a=0;;){if('"'===(u=e[h++])&&("\\"!==s||a%2!=1))break;o+=u,s=u,"\\"===s?a++:a=0}r(JSON.parse('"'+o+'"'),l,d);break;case"[":c={element:[],index:l.length},l.push(c.element),d.push(c);break;case"{":f={element:{},index:l.length},l.push(f.element),d.push(f);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===l.length)return l.pop();r(l.pop(),l,d)}}},{}],22:[function(e,t,n){"use strict";function r(e){return function(t,n,r,i){if("undefined"!=typeof sqlitePlugin){var o=a({},e,{name:t,version:n,description:r,size:i});return sqlitePlugin.openDatabase(o)}return openDatabase(t,n,r,i)}}function i(e,t){var n=r(e),i=a({websql:n},e);("undefined"==typeof cordova||"undefined"==typeof sqlitePlugin&&"undefined"==typeof openDatabase)&&console.error("PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform. Options:\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2\n - https://github.com/litehelpers/Cordova-sqlite-storage\n - https://github.com/Microsoft/cordova-plugin-websql"),"default"in s&&"function"==typeof s.default.call?s.default.call(this,i,t):s.call(this,i,t)}function o(e){e.adapter("cordova-sqlite",i,!0)}var s=e(7),a=e(1);i.valid=function(){return!0},i.use_prefix=!1,"undefined"!=typeof window&&window.PouchDB&&window.PouchDB.plugin(o),t.exports=o},{1:1,7:7}]},{},[22])(22)});
1
+ !function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PouchAdapterCordovaSqlite=e()}(function(){return function r(i,o,s){function a(n,e){if(!o[n]){if(!i[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);throw(e=new Error("Cannot find module '"+n+"'")).code="MODULE_NOT_FOUND",e}t=o[n]={exports:{}},i[n][0].call(t.exports,function(e){var t=i[n][1][e];return a(t||e)},t,t.exports,r,i,o,s)}return o[n].exports}for(var u="function"==typeof require&&require,e=0;e<s.length;e++)a(s[e]);return a}({1:[function(e,t,n){var r="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};t.exports=r},{}],2:[function(e,t,n){t.exports=function(r){return function(){var e=arguments.length;if(e){for(var t=[],n=-1;++n<e;)t[n]=arguments[n];return r.call(this,t)}return r.call(this,[])}}},{}],3:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function u(e){return"function"==typeof e}function c(e){return"object"==typeof e&&null!==e}function f(e){return void 0===e}((t.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,o,s,a;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||c(this._events.error)&&!this._events.error.length))throw(a=arguments[1])instanceof Error?a:((s=new Error('Uncaught, unspecified "error" event. ('+a+")")).context=a,s);if(f(t=this._events[e]))return!1;if(u(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),t.apply(this,r)}else if(c(t))for(r=Array.prototype.slice.call(arguments,1),n=(o=t.slice()).length,i=0;i<n;i++)o[i].apply(this,r);return!0},r.prototype.on=r.prototype.addListener=function(e,t){if(u(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,u(t.listener)?t.listener:t),this._events[e]?c(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,c(this._events[e])&&!this._events[e].warned&&(t=f(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&0<t&&this._events[e].length>t&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace)&&console.trace(),this;throw TypeError("listener must be a function")},r.prototype.once=function(e,t){var n;if(u(t))return n=!1,r.listener=t,this.on(e,r),this;throw TypeError("listener must be a function");function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}},r.prototype.removeListener=function(e,t){var n,r,i,o;if(!u(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(i=(n=this._events[e]).length,r=-1,n===t||u(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(c(n)){for(o=i;0<o--;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(this._events)if(this._events.removeListener)if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener"),this._events={}}else{if(u(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e]}else 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this},r.prototype.listeners=function(e){e=this._events&&this._events[e]?u(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},r.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(u(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],4:[function(e,c,t){!function(t){var e,n,r,i,o=t.MutationObserver||t.WebKitMutationObserver,s=o?(e=0,o=new o(u),n=t.document.createTextNode(""),o.observe(n,{characterData:!0}),function(){n.data=e=++e%2}):t.setImmediate||void 0===t.MessageChannel?"document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(u,0)}:((r=new t.MessageChannel).port1.onmessage=u,function(){r.port2.postMessage(0)}),a=[];function u(){i=!0;for(var e,t,n=a.length;n;){for(t=a,a=[],e=-1;++e<n;)t[e]();n=a.length}i=!1}c.exports=function(e){1!==a.push(e)||i||s()}}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],6:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var l=e(14),g=e(10),s=e(8),a=e(12),E=e(13),u=e(9);function r(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}var d=r(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),h=r(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function p(e){var t,n;return/^\d+-./.test(e)?(t=e.indexOf("-"),n=e.substring(0,t),e=e.substring(t+1),{prefix:parseInt(n,10),id:e}):g.createError(g.INVALID_REV)}function v(e,t,n){n=n||{deterministic_revs:!0};var r,i,o,s={status:"available"};if(e._deleted&&(s.deleted=!0),t)if(e._id||(e._id=l.uuid()),i=l.rev(e,n.deterministic_revs),e._rev){if((o=p(e._rev)).error)return o;e._rev_tree=[{pos:o.prefix,ids:[o.id,{status:"missing"},[[i,s,[]]]]}],r=o.prefix+1}else e._rev_tree=[{pos:1,ids:[i,s,[]]}],r=1;else if(e._revisions&&(e._rev_tree=((e,t)=>{for(var n=e.start-e.ids.length+1,r=e.ids,i=[r[0],t,[]],o=1,s=r.length;o<s;o++)i=[r[o],{status:"missing"},[i]];return[{pos:n,ids:i}]})(e._revisions,s),r=e._revisions.start,i=e._revisions.ids[0]),!e._rev_tree){if((o=p(e._rev)).error)return o;e._rev_tree=[{pos:r=o.prefix,ids:[i=o.id,s,[]]}]}l.invalidIdError(e._id),e._rev=r+"-"+i;var a,u={metadata:{},data:{}};for(a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var c,f="_"===a[0];if(f&&!d[a])throw(c=g.createError(g.DOC_VALIDATION,a)).message=g.DOC_VALIDATION.message+": "+a,c;f&&!h[a]?u.metadata[a.slice(1)]=e[a]:u.data[a]=e[a]}return u}function c(t,e,n){var r=(e=>{try{return s.atob(e)}catch(e){return{error:g.createError(g.BAD_ARG,"Attachment is not a valid base64 string")}}})(t.data);if(r.error)return n(r.error);t.length=r.length,t.data="blob"===e?s.binaryStringToBlobOrBuffer(r,t.content_type):"base64"===e?s.btoa(r):r,a.binaryMd5(r,function(e){t.digest="md5-"+e,n()})}function f(e,t,n){if(e.stub)return n();var r,i,o;"string"==typeof e.data?c(e,t,n):(r=e,i=t,o=n,a.binaryMd5(r.data,function(e){r.digest="md5-"+e,r.length=r.data.size||r.data.length||0,"binary"===i?s.blobOrBufferToBinaryString(r.data,function(e){r.data=e,o()}):"base64"===i?s.blobOrBufferToBase64(r.data,function(e){r.data=e,o()}):o()}))}function m(e,t,n,r,i,o,s,a){var u,c,f,l;return E.revExists(t.rev_tree,n.metadata.rev)&&!a?(r[i]=n,o()):(c=t.winningRev||E.winningRev(t),u="deleted"in t?t.deleted:E.isDeleted(t,c),l="deleted"in n.metadata?n.metadata.deleted:E.isDeleted(n.metadata),f=/^1-/.test(n.metadata.rev),u&&!l&&a&&f&&((f=n.data)._rev=c,f._id=n.metadata.id,n=v(f,a)),c=E.merge(t.rev_tree,n.metadata.rev_tree[0],e),a&&(u&&l&&"new_leaf"!==c.conflicts||!u&&"new_leaf"!==c.conflicts||u&&!l&&"new_branch"===c.conflicts)?(f=g.createError(g.REV_CONFLICT),r[i]=f,o()):(e=n.metadata.rev,n.metadata.rev_tree=c.tree,n.stemmedRevs=c.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map),a=E.winningRev(n.metadata),r=u===(l=E.isDeleted(n.metadata,a))?0:u<l?-1:1,void s(n,a,l,e===a?l:E.isDeleted(n.metadata,e),!0,r,i,o)))}n.invalidIdError=l.invalidIdError,n.normalizeDdocFunctionName=l.normalizeDdocFunctionName,n.parseDdocFunctionName=l.parseDdocFunctionName,n.isDeleted=E.isDeleted,n.isLocalId=E.isLocalId,n.allDocsKeysQuery=function(e,o){var t=o.keys,s={offset:o.skip};return Promise.all(t.map(function(i){var t=l.assign({key:i,deleted:"ok"},o);return["limit","skip","keys"].forEach(function(e){delete t[e]}),new Promise(function(n,r){e._allDocs(t,function(e,t){if(e)return r(e);o.update_seq&&void 0!==t.update_seq&&(s.update_seq=t.update_seq),s.total_rows=t.total_rows,n(t.rows[0]||{key:i,error:"not_found"})})})})).then(function(e){return s.rows=e,s})},n.parseDoc=v,n.preprocessAttachments=function(e,o,t){if(!e.length)return t();var s,n=0;function a(){n++,e.length===n&&(s?t(s):t())}e.forEach(function(e){var t,n=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],r=0;if(!n.length)return a();function i(e){s=e,++r===n.length&&a()}for(t in e.data._attachments)e.data._attachments.hasOwnProperty(t)&&f(e.data._attachments[t],o,i)})},n.processDocs=function(f,e,r,l,i,d,h,p,t){f=f||1e3;var v=p.new_edits,o=new u.Map,n=0,s=e.length;function _(){++n===s&&t&&t()}e.forEach(function(e,n){var t;e._id&&E.isLocalId(e._id)?(t=e._deleted?"_removeLocal":"_putLocal",r[t](e,{ctx:i},function(e,t){d[n]=e||t,_()})):(t=e.metadata.id,o.has(t)?(s--,o.get(t).push([e,n])):o.set(t,[[e,n]]))}),o.forEach(function(s,a){var u=0;function c(){(++u<s.length?e:_)()}function e(){var e,t,n,r,i=s[u],o=i[0],i=i[1];l.has(a)?m(f,l.get(a),o,d,i,c,h,v):(e=E.merge([],o.metadata.rev_tree[0],f),o.metadata.rev_tree=e.tree,o.stemmedRevs=e.stemmedRevs||[],e=o,o=i,i=c,n=E.winningRev(e.metadata),r=E.isDeleted(e.metadata,n),"was_delete"in p&&r?(d[o]=g.createError(g.MISSING_DOC,"deleted"),i()):v&&"missing"===e.metadata.rev_tree[0].ids[1].status?(t=g.createError(g.REV_CONFLICT),d[o]=t,i()):h(e,n,r,r,!1,r?0:1,o,i))}e()})},n.updateDoc=m},{10:10,12:12,13:13,14:14,8:8,9:9}],7:[function(e,t,r){var h=e(9),b=e(10),w=e(14),T=e(6),A=e(13),I=e(11),q=e(8);function s(e){return e<65?e-48:e-55}function O(e,t){if("UTF-8"===t)return t=((e,t,n)=>{for(var r="";t<n;)r+=String.fromCharCode(s(e.charCodeAt(t++))<<4|s(e.charCodeAt(t++)));return r})(e,0,e.length),decodeURIComponent(escape(t));for(var n=e,r=0,i=e.length,o="";r<i;)o+=String.fromCharCode(s(n.charCodeAt(r+2))<<12|s(n.charCodeAt(r+3))<<8|s(n.charCodeAt(r))<<4|s(n.charCodeAt(r+1))),r+=4;return o}var x="'document-store'",N="'by-sequence'",R="'attach-store'",L="'local-store'",D="'metadata-store'",C="'attach-seq-store'";function B(e){return delete e._id,delete e._rev,JSON.stringify(e)}function M(e,t,n){return(e=JSON.parse(e))._id=t,e._rev=n,e}function U(e){for(var t="(";e--;)t+="?",e&&(t+=",");return t+")"}function j(e,t,n,r,i){return"SELECT "+e+" FROM "+("string"==typeof t?t:t.join(" JOIN "))+(n?" ON "+n:"")+(r?" WHERE "+("string"==typeof r?r:r.join(" AND ")):"")+(i?" ORDER BY "+i:"")}function F(t,n,r){var i,o;function s(){var e;++i===t.length&&o.length&&(e="SELECT DISTINCT digest AS digest FROM "+C+" WHERE seq IN "+U(o.length),r.executeSql(e,o,function(e,t){for(var n,i=[],r=0;r<t.rows.length;r++)i.push(t.rows.item(r).digest);i.length&&(n="DELETE FROM "+C+" WHERE seq IN ("+o.map(function(){return"?"}).join(",")+")",e.executeSql(n,o,function(e){var t="SELECT digest FROM "+C+" WHERE digest IN ("+i.map(function(){return"?"}).join(",")+")";e.executeSql(t,i,function(t,e){for(var n=new h.Set,r=0;r<e.rows.length;r++)n.add(e.rows.item(r).digest);i.forEach(function(e){n.has(e)||(t.executeSql("DELETE FROM "+C+" WHERE digest=?",[e]),t.executeSql("DELETE FROM "+R+" WHERE digest=?",[e]))})})}))}))}t.length&&(i=0,o=[],t.forEach(function(e){var t="SELECT seq FROM "+N+" WHERE doc_id=? AND rev=?";r.executeSql(t,[n,e],function(e,t){if(!t.rows.length)return s();t=t.rows.item(0).seq;o.push(t),e.executeSql("DELETE FROM "+N+" WHERE seq=?",[t],s)})}))}function k(n){return function(e){w.guardedConsole("error","WebSQL threw an error",e);var t=e&&e.constructor.toString().match(/function ([^(]+)/),t=t&&t[1]||e.type,e=e.target||e.message;n(b.createError(b.WSQ_ERROR,e,t))}}function a(t,e,n,v,r,i,o){var _,s=n.new_edits,a=e.docs.map(function(e){return e._id&&T.isLocalId(e._id)?e:T.parseDoc(e,s,t)}),e=a.filter(function(e){return e.error});if(e.length)return o(e[0]);var u,g=new Array(a.length),E=new h.Map;function c(){if(u)return o(u);i.notify(v._name),o(null,g)}function f(t){var i=[];if(a.forEach(function(t){t.data&&t.data._attachments&&Object.keys(t.data._attachments).forEach(function(e){e=t.data._attachments[e];e.stub&&i.push(e.digest)})}),!i.length)return t();var o,s=0;i.forEach(function(e){var n,r;n=e,r=function(e){e&&!o&&(o=e),++s===i.length&&t(o)},e="SELECT count(*) as cnt FROM "+R+" WHERE digest=?",_.executeSql(e,[n],function(e,t){0===t.rows.item(0).cnt?(t=b.createError(b.MISSING_STUB,"unknown stub attachment with digest "+n),r(t)):r()})})}function l(c,s,e,t,a,n,u,f){function r(){var u=c.data,r=t?1:0,i=u._id,o=u._rev,s=B(u),e="INSERT INTO "+N+" (doc_id, rev, json, deleted) VALUES (?, ?, ?, ?);";function a(e,t){var n=0,r=Object.keys(u._attachments||{});if(!r.length)return t();function i(){return++n===r.length&&t(),!1}for(var o,s,a=0;a<r.length;a++)o=r[a],s=void 0,s="INSERT INTO "+C+" (digest, seq) VALUES (?,?)",o=[u._attachments[o].digest,e],_.executeSql(s,o,i,i)}_.executeSql(e,[i,o,s,r],function(e,t){var n=t.insertId;a(n,function(){p(e,n)})},function(){var e=j("seq",N,null,"doc_id=? AND rev=?");return _.executeSql(e,[i,o],function(e,t){var n=t.rows.item(0).seq,t="UPDATE "+N+" SET json=?, deleted=? WHERE doc_id=? AND rev=?;";e.executeSql(t,[s,r,i,o],function(e){a(n,function(){p(e,n)})})}),!1})}function l(e){i||(e?f(i=e):d===o.length&&r())}var i=null,d=0,o=(c.data._id=c.metadata.id,c.data._rev=c.metadata.rev,Object.keys(c.data._attachments||{}));function h(e){d++,l(e)}function p(e,t){var n=c.metadata.id,r=c.stemmedRevs||[],i=((r=a&&v.auto_compaction?A.compactTree(c.metadata).concat(r):r).length&&F(r,n,e),c.metadata.seq=t,c.metadata.rev),r=(delete c.metadata.rev,a?"UPDATE "+x+" SET json=?, max_seq=?, winningseq=(SELECT seq FROM "+N+" WHERE doc_id="+x+".id AND rev=?) WHERE id=?":"INSERT INTO "+x+" (id, winningseq, max_seq, json) VALUES (?,?,?,?);"),o=I.safeJsonStringify(c.metadata);e.executeSql(r,a?[o,t,s,n]:[n,t,t,o],function(){g[u]={ok:!0,id:c.metadata.id,rev:i},E.set(n,c.metadata),f()})}t&&(c.data._deleted=!0),o.forEach(function(e){var t,n,r,i,o,e=c.data._attachments[e];e.stub?(d++,l()):(t=e.data,delete e.data,e.revpos=parseInt(s,10),e=e.digest,n=e,r=t,i=h,o="SELECT digest FROM "+R+" WHERE digest=?",_.executeSql(o,[n],function(e,t){if(t.rows.length)return i();o="INSERT INTO "+R+" (digest, body, escaped) VALUES (?,?,1)",e.executeSql(o,[n,r.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"")],function(){i()},function(){return i(),!1})}))}),o.length||r()}function d(){T.processDocs(t.revs_limit,a,v,E,_,g,l,n)}T.preprocessAttachments(a,"binary",function(e){if(e)return o(e);r.transaction(function(e){_=e,f(function(e){function r(){++n===a.length&&t()}var t,n;e?u=e:(t=d,a.length?(n=0,a.forEach(function(e){if(e._id&&T.isLocalId(e._id))return r();var n=e.metadata.id;_.executeSql("SELECT json FROM "+x+" WHERE id = ?",[n],function(e,t){t.rows.length&&(t=I.safeJsonParse(t.rows.item(0).json),E.set(n,t)),r()})})):t())})},k(o),c)})}var n=new h.Map;function u(e){var t=n.get(e.name);return t||(t=(e=>{try{return{db:e.websql(e.name,e.version,e.description,e.size)}}catch(e){return{error:e}}})(e),n.set(e.name,t)),t}var P=new w.changesHandler;function W(o,s,a,u,e){var t=Object.keys(o._attachments||{});if(!t.length)return e&&e();var n=0;function c(){++n===t.length&&e&&e()}t.forEach(function(e){var n,r,i,t;s.attachments&&s.include_docs?(r=e,i=(n=o)._attachments[r],t={binary:s.binary,ctx:u},a._getAttachment(n._id,r,i,t,function(e,t){n._attachments[r]=w.assign(w.pick(i,["digest","content_type"]),{data:t}),c()})):(o._attachments[e].stub=!0,c())})}var H="CREATE INDEX IF NOT EXISTS 'by-seq-deleted-idx' ON "+N+" (seq, deleted)",J="CREATE UNIQUE INDEX IF NOT EXISTS 'by-seq-doc-id-rev' ON "+N+" (doc_id, rev)",V="CREATE INDEX IF NOT EXISTS 'doc-winningseq-idx' ON "+x+" (winningseq)",X="CREATE INDEX IF NOT EXISTS 'attach-seq-seq-idx' ON "+C+" (seq)",G="CREATE UNIQUE INDEX IF NOT EXISTS 'attach-seq-digest-idx' ON "+C+" (digest, seq)",z=N+".seq = "+x+".winningseq",Q=N+".seq AS seq, "+N+".deleted AS deleted, "+N+".json AS data, "+N+".rev AS rev, "+x+".json AS metadata";t.exports=function(r,e){var c,g=this,f=null,t="size"in(t=r)?1e6*t.size:"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent)?5e6:1,n=[];if(g._name=r.name,(t=u(w.assign({},r,{version:1,description:r.name,size:t}))).error)return k(e)(t.error);var E=t.db;function i(){w.hasLocalStorage()&&(window.localStorage["_pouch__websqldb_"+g._name]=!0),e(null,g)}function l(t,a){t.executeSql(V),t.executeSql("ALTER TABLE "+N+" ADD COLUMN deleted TINYINT(1) DEFAULT 0",[],function(){t.executeSql(H),t.executeSql("ALTER TABLE "+x+" ADD COLUMN local TINYINT(1) DEFAULT 0",[],function(){t.executeSql("CREATE INDEX IF NOT EXISTS 'doc-store-local-idx' ON "+x+" (local, id)");var e="SELECT "+x+".winningseq AS seq, "+x+".json AS metadata FROM "+N+" JOIN "+x+" ON "+N+".seq = "+x+".winningseq";t.executeSql(e,[],function(e,t){for(var n=[],r=[],i=0;i<t.rows.length;i++){var o=t.rows.item(i),s=o.seq,o=JSON.parse(o.metadata);T.isDeleted(o)&&n.push(s),T.isLocalId(o.id)&&r.push(o.id)}e.executeSql("UPDATE "+x+"SET local = 1 WHERE id IN "+U(r.length),r,function(){e.executeSql("UPDATE "+N+" SET deleted = 1 WHERE seq IN "+U(n.length),n,a)})})})})}function d(t,o){t.executeSql("CREATE TABLE IF NOT EXISTS 'local-store' (id UNIQUE, rev, json)",[],function(){var e="SELECT "+x+".id AS id, "+N+".json AS data FROM "+N+" JOIN "+x+" ON "+N+".seq = "+x+".winningseq WHERE local = 1";t.executeSql(e,[],function(r,e){for(var i=[],t=0;t<e.rows.length;t++)i.push(e.rows.item(t));!function t(){if(!i.length)return o(r);var n=i.shift(),e=JSON.parse(n.data)._rev;r.executeSql("INSERT INTO "+L+" (id, rev, json) VALUES (?,?,?)",[n.id,e,n.data],function(e){e.executeSql("DELETE FROM "+x+" WHERE id=?",[n.id],function(e){e.executeSql("DELETE FROM "+N+" WHERE seq=?",[n.seq],function(){t()})})})}()})})}function h(s,a){function i(o){!function e(){if(!o.length)return a(s);var t=O(o.shift().hex,c),n=t.lastIndexOf("::"),r=t.substring(0,n),n=t.substring(n+2),i="UPDATE "+N+" SET doc_id=?, rev=? WHERE doc_id_rev=?";s.executeSql(i,[r,n,t],function(){e()})}()}var e="ALTER TABLE "+N+" ADD COLUMN doc_id";s.executeSql(e,[],function(e){var t="ALTER TABLE "+N+" ADD COLUMN rev";e.executeSql(t,[],function(e){e.executeSql(J,[],function(e){var t="SELECT hex(doc_id_rev) as hex FROM "+N;e.executeSql(t,[],function(e,t){for(var n=[],r=0;r<t.rows.length;r++)n.push(t.rows.item(r));i(n)})})})})}function p(e,h){function t(e){var t="SELECT COUNT(*) AS cnt FROM "+R;e.executeSql(t,[],function(t,e){if(!e.rows.item(0).cnt)return h(t);var n=0,r=10;!function d(){var e=j(Q+", "+x+".id AS id",[x,N],z,null,x+".id ");e+=" LIMIT "+r+" OFFSET "+n,n+=r,t.executeSql(e,[],function(n,e){if(!e.rows.length)return h(n);for(var t,r={},i=0;i<e.rows.length;i++)for(var o=e.rows.item(i),s=M(o.data,o.id,o.rev),a=Object.keys(s._attachments||{}),u=0;u<a.length;u++){var c=s._attachments[a[u]];c=c.digest,t=o.seq,-1===(c=r[c]=r[c]||[]).indexOf(t)&&c.push(t)}var f=[];if(Object.keys(r).forEach(function(t){r[t].forEach(function(e){f.push([t,e])})}),!f.length)return d();var l=0;f.forEach(function(e){var t="INSERT INTO "+C+" (digest, seq) VALUES (?,?)";n.executeSql(t,e,function(){++l===f.length&&d()})})})}()})}var n="CREATE TABLE IF NOT EXISTS "+C+" (digest, seq INTEGER)";e.executeSql(n,[],function(e){e.executeSql(G,[],function(e){e.executeSql(X,[],t)})})}function v(e,t){var n="ALTER TABLE "+R+" ADD COLUMN escaped TINYINT(1) DEFAULT 0";e.executeSql(n,[],t)}function _(e,n){var t="ALTER TABLE "+x+" ADD COLUMN max_seq INTEGER";e.executeSql(t,[],function(e){var t="UPDATE "+x+" SET max_seq=(SELECT MAX(seq) FROM "+N+" WHERE doc_id=id)";e.executeSql(t,[],function(e){var t="CREATE UNIQUE INDEX IF NOT EXISTS 'doc-max-seq-idx' ON "+x+" (max_seq)";e.executeSql(t,[],n)})})}function m(){for(;0<n.length;)n.pop()(null,f)}function o(t,e){var n,r,i,o,s,a,u;0===e?(n="CREATE TABLE IF NOT EXISTS "+R+" (digest UNIQUE, escaped TINYINT(1), body BLOB)",r="CREATE TABLE IF NOT EXISTS "+C+" (digest, seq INTEGER)",i="CREATE TABLE IF NOT EXISTS "+x+" (id unique, json, winningseq, max_seq INTEGER UNIQUE)",o="CREATE TABLE IF NOT EXISTS "+N+" (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, json, deleted TINYINT(1), doc_id, rev)",t.executeSql(n),t.executeSql("CREATE TABLE IF NOT EXISTS 'local-store' (id UNIQUE, rev, json)"),t.executeSql(r,[],function(){t.executeSql(X),t.executeSql(G)}),t.executeSql(i,[],function(){t.executeSql(V),t.executeSql(o,[],function(){t.executeSql(H),t.executeSql(J),t.executeSql("CREATE TABLE IF NOT EXISTS 'metadata-store' (dbid, db_version INTEGER)",[],function(){var e=[7,f=w.uuid()];t.executeSql("INSERT INTO 'metadata-store' (db_version, dbid) VALUES (?,?)",e,function(){m()})})})})):(s=[l,d,h,p,v,_,function(){e<7&&t.executeSql("UPDATE "+D+" SET db_version = 7");t.executeSql("SELECT dbid FROM 'metadata-store'",[],function(e,t){f=t.rows.item(0).dbid,m()})}],a=e,(u=function(e){s[a-1](e,u),a++})(t))}function y(e,n){var t="SELECT MAX(seq) AS seq FROM "+N;e.executeSql(t,[],function(e,t){t=t.rows.item(0).seq||0;n(t)})}function S(e,n){var t=j("COUNT("+x+".id) AS 'num'",[x,N],z,N+".deleted=0");e.executeSql(t,[],function(e,t){n(t.rows.item(0).num)})}"function"!=typeof E.readTransaction&&(E.readTransaction=E.transaction),E.transaction(function(e){var n;n=function(){e.executeSql("SELECT sql FROM sqlite_master WHERE tbl_name = 'metadata-store'",[],function(e,t){t.rows.length?/db_version/.test(t.rows.item(0).sql)?e.executeSql("SELECT db_version FROM "+D,[],function(e,t){o(e,t.rows.item(0).db_version)}):e.executeSql("ALTER TABLE "+D+" ADD COLUMN db_version INTEGER",[],function(){o(e,1)}):o(e,0)})},e.executeSql('SELECT HEX("a") AS hex',[],function(e,t){t=t.rows.item(0).hex;c=2===t.length?"UTF-8":"UTF-16",n()})},k(e),i),g._remote=!1,g.type=function(){return"websql"},g._id=w.toPromise(function(e){e(null,f)}),g._info=function(e){var t,n;E.readTransaction(function(e){y(e,function(e){t=e}),S(e,function(e){n=e})},k(e),function(){e(null,{doc_count:n,update_seq:t,websql_encoding:c})})},g._bulkDocs=function(e,t,n){a(r,e,t,g,E,P,n)},g._get=function(t,n,r){var i,o,e,s,a,u,c,f,l=n.ctx;if(!l)return E.readTransaction(function(e){g._get(t,w.assign({ctx:e},n),r)});function d(e){r(e,{doc:i,metadata:o,ctx:l})}if(n.rev){if(n.latest)return e=l,s=t,a=n.rev,u=function(e){n.latest=!1,n.rev=e,g._get(t,n,r)},c=d,f=j(Q,[x,N],z,x+".id=?"),void e.executeSql(f,[s],function(e,t){if(!t.rows.length)return n=b.createError(b.MISSING_DOC,"missing"),c(n);var n=t.rows.item(0),t=I.safeJsonParse(n.metadata);u(A.latest(a,t))});e=j(Q,[x,N],x+".id="+N+".doc_id",[N+".doc_id=?",N+".rev=?"]),f=[t,n.rev]}else e=j(Q,[x,N],z,x+".id=?"),f=[t];l.executeSql(e,f,function(e,t){return t.rows.length?(t=t.rows.item(0),o=I.safeJsonParse(t.metadata),t.deleted&&!n.rev?d(b.createError(b.MISSING_DOC,"deleted")):(i=M(t.data,o.id,t.rev),void d())):d(b.createError(b.MISSING_DOC,"missing"))})},g._allDocs=function(l,t){var n,r,i,o,d=[],e="startkey"in l&&l.startkey,s="endkey"in l&&l.endkey,a="key"in l&&l.key,h="keys"in l&&l.keys,u="descending"in l&&l.descending,c="limit"in l?l.limit:-1,f="skip"in l?l.skip:0,p=!1!==l.inclusive_end,v=[],_=[];h?(i=[],o="",h.forEach(function(e){-1===i.indexOf(e)&&(i.push(e),o+="?,")}),o=o.substring(0,o.length-1),_.push(x+".id IN ("+o+")"),v=v.concat(i)):!1!==a?(_.push(x+".id = ?"),v.push(a)):!1===e&&!1===s||(!1!==e&&(_.push(x+".id "+(u?"<=":">=")+" ?"),v.push(e)),!1!==s&&(e=u?">":"<",p&&(e+="="),_.push(x+".id "+e+" ?"),v.push(s)),!1!==a&&(_.push(x+".id = ?"),v.push(a))),h||_.push(N+".deleted = 0"),E.readTransaction(function(e){var t;S(e,function(e){n=e}),l.update_seq&&y(e,function(e){r=e}),0!==c&&(t=j(Q,[x,N],z,_,x+".id "+(u?"DESC":"ASC")),e.executeSql(t+=" LIMIT "+c+" OFFSET "+f,v,function(e,t){for(var n=0,r=t.rows.length;n<r;n++){var i=t.rows.item(n),o=I.safeJsonParse(i.metadata),s=o.id,a=M(i.data,s,i.rev),u=a._rev,c={id:s,key:s,value:{rev:u}};if(l.include_docs&&(c.doc=a,c.doc._rev=u,l.conflicts&&(a=A.collectConflicts(o)).length&&(c.doc._conflicts=a),W(c.doc,l,g,e)),i.deleted){if(!h)continue;c.value.deleted=!0,c.doc=null}if(h)for(var f=h.indexOf(s,f);d[f]=c,-1<(f=h.indexOf(s,f+1))&&f<h.length;);else d.push(c)}h&&h.forEach(function(e,t){d[t]||(d[t]={key:e,error:"not_found"})})}))},k(t),function(){var e={total_rows:n,offset:l.skip,rows:d};l.update_seq&&(e.update_seq=r),t(null,e)})},g._changes=function(u){var e;if((u=w.clone(u)).continuous)return e=g._name+":"+w.uuid(),P.addListener(g._name,e,g,u),P.notify(g._name),{cancel:function(){P.removeListener(g._name,e)}};var t,n,r,i,o,s,c,f,a=u.descending,l=(u.since=u.since&&!a?u.since:0,"limit"in u?u.limit:-1),d=(0===l&&(l=1),[]),h=0;t=x+".json AS metadata, "+x+".max_seq AS maxSeq, "+N+".json AS winningDoc, "+N+".rev AS winningRev ",n=x+" JOIN "+N,r=x+".id="+N+".doc_id AND "+x+".winningseq="+N+".seq",i=["maxSeq > ?"],o=[u.since],u.doc_ids&&(i.push(x+".id IN "+U(u.doc_ids.length)),o=o.concat(u.doc_ids)),s=j(t,n,r,i,"maxSeq "+(a?"DESC":"ASC")),c=w.filterChange(u),u.view||u.filter||(s+=" LIMIT "+l),f=u.since||0,E.readTransaction(function(e){e.executeSql(s,o,function(e,t){function n(e){return function(){u.onChange(e)}}for(var r=0,i=t.rows.length;r<i;r++){var o=t.rows.item(r),s=I.safeJsonParse(o.metadata),a=(f=o.maxSeq,M(o.winningDoc,s.id,o.winningRev)),s=u.processChange(a,s,u),o=(s.seq=o.maxSeq,c(s));if("object"==typeof o)return u.complete(o);if(o&&(h++,u.return_docs&&d.push(s),u.attachments&&u.include_docs?W(a,u,g,e,n(s)):n(s)()),h===l)break}})},k(u.complete),function(){u.continuous||u.complete(null,{results:d,last_seq:f})})},g._close=function(e){e()},g._getAttachment=function(e,t,n,r,i){var o,s=r.ctx,a=n.digest,u=n.content_type,n="SELECT escaped, CASE WHEN escaped = 1 THEN body ELSE HEX(body) END AS body FROM "+R+" WHERE digest=?";s.executeSql(n,[a],function(e,t){t=t.rows.item(0),t=t.escaped?t.body.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""):O(t.body,c);o=r.binary?q.binaryStringToBlobOrBuffer(t,u):q.btoa(t),i(null,o)})},g._getRevisionTree=function(n,r){E.readTransaction(function(e){var t="SELECT json AS metadata FROM "+x+" WHERE id = ?";e.executeSql(t,[n],function(e,t){t.rows.length?(t=I.safeJsonParse(t.rows.item(0).metadata),r(null,t.rev_tree)):r(b.createError(b.MISSING_DOC))})})},g._doCompaction=function(r,o,e){if(!o.length)return e();E.transaction(function(e){var t="SELECT json AS metadata FROM "+x+" WHERE id = ?";e.executeSql(t,[r],function(e,t){var t=I.safeJsonParse(t.rows.item(0).metadata),n=(A.traverseRevTree(t.rev_tree,function(e,t,n,r,i){-1!==o.indexOf(t+"-"+n)&&(i.status="missing")}),"UPDATE "+x+" SET json = ? WHERE id = ?");e.executeSql(n,[I.safeJsonStringify(t),r])}),F(o,r,e)},k(e),function(){e()})},g._getLocal=function(n,r){E.readTransaction(function(e){e.executeSql("SELECT json, rev FROM 'local-store' WHERE id=?",[n],function(e,t){t.rows.length?(t=M((t=t.rows.item(0)).json,n,t.rev),r(null,t)):r(b.createError(b.MISSING_DOC))})})},g._putLocal=function(e,r,i){"function"==typeof r&&(i=r,r={}),delete e._revisions;var o,s=e._rev,a=e._id,u=e._rev=s?"0-"+(parseInt(s.split("-")[1],10)+1):"0-1",c=B(e);function t(e){var t,n=s?(t="UPDATE "+L+" SET rev=?, json=? WHERE id=? AND rev=?",[u,c,a,s]):(t="INSERT INTO "+L+" (id, rev, json) VALUES (?,?,?)",[a,u,c]);e.executeSql(t,n,function(e,t){t.rowsAffected?(o={ok:!0,id:a,rev:u},r.ctx&&i(null,o)):i(b.createError(b.REV_CONFLICT))},function(){return i(b.createError(b.REV_CONFLICT)),!1})}r.ctx?t(r.ctx):E.transaction(t,k(i),function(){o&&i(null,o)})},g._removeLocal=function(n,r,i){var o;function e(e){var t=[n._id,n._rev];e.executeSql("DELETE FROM 'local-store' WHERE id=? AND rev=?",t,function(e,t){if(!t.rowsAffected)return i(b.createError(b.MISSING_DOC));o={ok:!0,id:n._id,rev:"0-0"},r.ctx&&i(null,o)})}"function"==typeof r&&(i=r,r={}),r.ctx?e(r.ctx):E.transaction(e,k(i),function(){o&&i(null,o)})},g._destroy=function(e,t){P.removeAllListeners(g._name),E.transaction(function(t){[x,N,R,D,L,C].forEach(function(e){t.executeSql("DROP TABLE IF EXISTS "+e,[])})},k(t),function(){w.hasLocalStorage()&&(delete window.localStorage["_pouch__websqldb_"+g._name],delete window.localStorage[g._name]),t(null,{ok:!0})})}}},{10:10,11:11,13:13,14:14,6:6,8:8,9:9}],8:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});function r(e){return atob(e)}function i(e){return btoa(e)}function o(t,n){t=t||[],n=n||{};try{return new Blob(t,n)}catch(e){if("TypeError"!==e.name)throw e;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<t.length;i+=1)r.append(t[i]);return r.getBlob(n.type)}}function s(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function a(e,t){return o([s(e)],{type:t})}function u(e,t){var n=new FileReader,r="function"==typeof n.readAsBinaryString;n.onloadend=function(e){e=e.target.result||"";if(r)return t(e);t((e=>{for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return t})(e))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function c(e,t){u(e,function(e){t(e)})}n.atob=r,n.btoa=i,n.base64StringToBlobOrBuffer=function(e,t){return a(r(e),t)},n.binaryStringToArrayBuffer=s,n.binaryStringToBlobOrBuffer=a,n.blob=o,n.blobOrBufferToBase64=function(e,t){c(e,function(e){t(i(e))})},n.blobOrBufferToBinaryString=c,n.readAsArrayBuffer=function(e,t){var n=new FileReader;n.onloadend=function(e){e=e.target.result||new ArrayBuffer(0);t(e)},n.readAsArrayBuffer(e)},n.readAsBinaryString=u,n.typedBuffer=function(){}},{}],9:[function(e,t,n){function r(){this._store={}}function i(e){if(this._store=new r,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}Object.defineProperty(n,"__esModule",{value:!0}),r.prototype.get=function(e){return this._store["$"+e]},r.prototype.set=function(e,t){return this._store["$"+e]=t,!0},r.prototype.has=function(e){return"$"+e in this._store},r.prototype.delete=function(e){var e="$"+e,t=e in this._store;return delete this._store[e],t},r.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;n<r;n++){var i=t[n];e(this._store[i],i.substring(1))}},Object.defineProperty(r.prototype,"size",{get:function(){return Object.keys(this._store).length}}),i.prototype.add=function(e){return this._store.set(e,!0)},i.prototype.has=function(e){return this._store.has(e)},i.prototype.forEach=function(n){this._store.forEach(function(e,t){n(t)})},Object.defineProperty(i.prototype,"size",{get:function(){return this._store.size}}),(()=>{var e;return"undefined"!=typeof Symbol&&"undefined"!=typeof Map&&"undefined"!=typeof Set&&(e=Object.getOwnPropertyDescriptor(Map,Symbol.species))&&"get"in e&&Map[Symbol.species]===Map})()?(n.Set=Set,n.Map=Map):(n.Set=i,n.Map=r)},{}],10:[function(e,t,n){function r(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}Object.defineProperty(n,"__esModule",{value:!0}),((e=e(5))&&"object"==typeof e&&"default"in e?e.default:e)(r,Error),r.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};var e=new r(401,"unauthorized","Name or password is incorrect."),i=new r(400,"bad_request","Missing JSON list of 'docs'"),o=new r(404,"not_found","missing"),s=new r(409,"conflict","Document update conflict"),a=new r(400,"bad_request","_id field must contain a string"),u=new r(412,"missing_id","_id is required for puts"),c=new r(400,"bad_request","Only reserved document ids may start with underscore."),f=new r(412,"precondition_failed","Database not open"),l=new r(500,"unknown_error","Database encountered an unknown error"),d=new r(500,"badarg","Some query argument is invalid"),h=new r(400,"invalid_request","Request was invalid"),p=new r(400,"query_parse_error","Some query parameter is invalid"),v=new r(500,"doc_validation","Bad special document member"),_=new r(400,"bad_request","Something wrong with the request"),g=new r(400,"bad_request","Document must be a JSON object"),E=new r(404,"not_found","Database not found"),m=new r(500,"indexed_db_went_bad","unknown"),y=new r(500,"web_sql_went_bad","unknown"),S=new r(500,"levelDB_went_went_bad","unknown"),b=new r(403,"forbidden","Forbidden by design doc validate_doc_update function"),w=new r(400,"bad_request","Invalid rev format"),T=new r(412,"file_exists","The database could not be created, the file already exists."),A=new r(412,"missing_stub","A pre-existing attachment stub wasn't found"),I=new r(413,"invalid_url","Provided URL is invalid");n.UNAUTHORIZED=e,n.MISSING_BULK_DOCS=i,n.MISSING_DOC=o,n.REV_CONFLICT=s,n.INVALID_ID=a,n.MISSING_ID=u,n.RESERVED_ID=c,n.NOT_OPEN=f,n.UNKNOWN_ERROR=l,n.BAD_ARG=d,n.INVALID_REQUEST=h,n.QUERY_PARSE_ERROR=p,n.DOC_VALIDATION=v,n.BAD_REQUEST=_,n.NOT_AN_OBJECT=g,n.DB_MISSING=E,n.WSQ_ERROR=y,n.LDB_ERROR=S,n.FORBIDDEN=b,n.INVALID_REV=w,n.FILE_EXISTS=T,n.MISSING_STUB=A,n.IDB_ERROR=m,n.INVALID_URL=I,n.createError=function(n,e){function t(e){for(var t in n)"function"!=typeof n[t]&&(this[t]=n[t]);void 0!==e&&(this.reason=e)}return t.prototype=r.prototype,new t(e)},n.generateErrorFromResponse=function(e){var t;return"object"!=typeof e&&(t=e,(e=l).data=t),"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}},{5:5}],11:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=(e=e(21))&&"object"==typeof e&&"default"in e?e.default:e;n.safeJsonParse=function(t){try{return JSON.parse(t)}catch(e){return r.parse(t)}},n.safeJsonStringify=function(t){try{return JSON.stringify(t)}catch(e){return r.stringify(t)}}},{21:21}],12:[function(n,e,r){!function(e){Object.defineProperty(r,"__esModule",{value:!0});var t,d=n(8),h=(t=n(15))&&"object"==typeof t&&"default"in t?t.default:t,p=e.setImmediate||e.setTimeout;function v(t,e,n,r,i){var o;(0<n||r<e.size)&&(n=n,r=r,e=(o=e).webkitSlice?o.webkitSlice(n,r):o.slice(n,r)),d.readAsArrayBuffer(e,function(e){t.append(e),i()})}function _(e,t,n,r,i){(0<n||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),i()}r.binaryMd5=function(n,t){var e="string"==typeof n,r=e?n.length:n.size,i=Math.min(32768,r),o=Math.ceil(r/i),s=0,a=new(e?h:h.ArrayBuffer),u=e?_:v;function c(){p(l)}function f(){var e=a.end(!0),e=d.btoa(e);t(e),a.destroy()}function l(){var e=s*i,t=e+i;u(a,n,e,t,++s<o?c:f)}l()},r.stringMd5=function(e){return h.hash(e)}}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{15:15,8:8}],13:[function(e,t,n){function a(e){for(var t,n,r,i=e.rev_tree.slice();f=i.pop();){var o=f.ids,s=o[2],a=f.pos;if(s.length)for(var u=0,c=s.length;u<c;u++)i.push({pos:a+1,ids:s[u]});else{var f=!!o[1].deleted,o=o[0];t&&!(r!==f?r:n!==a?n<a:t<o)||(t=o,n=a,r=f)}}return n+"-"+t}function h(e,t){for(var n,r=e.slice();n=r.pop();)for(var i=n.pos,o=n.ids,s=o[2],a=t(0===s.length,i,o[0],n.ctx,o[1]),u=0,c=s.length;u<c;u++)r.push({pos:i+1,ids:s[u],ctx:a})}function r(e,t){return e.pos-t.pos}function u(e){var o=[];h(e,function(e,t,n,r,i){e&&o.push({rev:t+"-"+n,pos:t,opts:i})}),o.sort(r).reverse();for(var t=0,n=o.length;t<n;t++)delete o[t].pos;return o}function p(e){for(var t,n=[],r=e.slice();t=r.pop();){var i=t.pos,o=t.ids,s=o[0],a=o[1],u=o[2],o=0===u.length,c=t.history?t.history.slice():[];c.push({id:s,opts:a}),o&&n.push({pos:i+1-c.length,ids:c});for(var f=0,l=u.length;f<l;f++)r.push({pos:i+1,ids:u[f],history:c})}return n.reverse()}function m(e,t){return e.pos-t.pos}function f(e,t,n){n=((e,t,n)=>{for(var r,i=0,o=e.length;i<o;)n(e[r=i+o>>>1],t)<0?i=1+r:o=r;return i})(e,t,n);e.splice(n,0,t)}function v(e,t){for(var n,r,i=t,o=e.length;i<o;i++){var s=e[i],s=[s.id,s.opts,[]];r?(r[2].push(s),r=s):n=r=s}return n}function l(e,t){return e[0]<t[0]?-1:1}function y(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;0<n.length;){var i=n.pop(),o=i.tree1,s=i.tree2;(o[1].status||s[1].status)&&(o[1].status="available"===o[1].status||"available"===s[1].status?"available":"missing");for(var a=0;a<s[2].length;a++)if(o[2][0]){for(var u=!1,c=0;c<o[2].length;c++)o[2][c][0]===s[2][a][0]&&(n.push({tree1:o[2][c],tree2:s[2][a]}),u=!0);u||(r="new_branch",f(o[2],s[2][a],l))}else r="new_leaf",o[2][0]=s[2][a]}return{conflicts:r,tree:e}}function _(e,t,n){var r,i=[],o=!1,s=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var a=0,u=e.length;a<u;a++){var c=e[a];if(c.pos===t.pos&&c.ids[0]===t.ids[0])r=y(c.ids,t.ids),i.push({pos:c.pos,ids:r.tree}),o=o||r.conflicts,s=!0;else if(!0!==n){var f=c.pos<t.pos?c:t,l=c.pos<t.pos?t:c,d=l.pos-f.pos,h=[],p=[];for(p.push({ids:f.ids,diff:d,parent:null,parentIdx:null});0<p.length;){var v=p.pop();if(0===v.diff)v.ids[0]===l.ids[0]&&h.push(v);else for(var _=v.ids[2],g=0,E=_.length;g<E;g++)p.push({ids:_[g],diff:v.diff-1,parent:v.ids,parentIdx:g})}d=h[0];d?(r=y(d.ids,l.ids),d.parent[2][d.parentIdx]=r.tree,i.push({pos:f.pos,ids:f.ids}),o=o||r.conflicts,s=!0):i.push(c)}else i.push(c)}return s||i.push(t),i.sort(m),{tree:i,conflicts:o||"internal_node"}}function o(e){return e.ids}Object.defineProperty(n,"__esModule",{value:!0}),n.collectConflicts=function(e){for(var t=a(e),n=u(e.rev_tree),r=[],i=0,o=n.length;i<o;i++){var s=n[i];s.rev===t||s.opts.deleted||r.push(s.rev)}return r},n.collectLeaves=u,n.compactTree=function(e){var o=[];return h(e.rev_tree,function(e,t,n,r,i){"available"!==i.status||e||(o.push(t+"-"+n),i.status="missing")}),o},n.isDeleted=function(e,t){for(var n,r=(t=t||a(e)).substring(t.indexOf("-")+1),i=e.rev_tree.map(o);n=i.pop();){if(n[0]===r)return!!n[1].deleted;i=i.concat(n[2])}},n.isLocalId=function(e){return/^_local/.test(e)},n.merge=function(e,t,n){return e=_(e,t),{tree:(t=((e,t)=>{for(var n,r=p(e),i=0,o=r.length;i<o;i++){var s=r[i],a=s.ids;if(a.length>t)for(var u=u||{},c=a.length-t,f={pos:s.pos+c,ids:v(a,c)},l=0;l<c;l++){var d=s.pos+l+"-"+a[l].id;u[d]=!0}else f={pos:s.pos,ids:v(a,0)};n=n?_(n,f,!0).tree:[f]}return u&&h(n,function(e,t,n){delete u[t+"-"+n]}),{tree:n,revs:u?Object.keys(u):[]}})(e.tree,n)).tree,stemmedRevs:t.revs,conflicts:e.conflicts}},n.revExists=function(e,t){for(var n,r=e.slice(),e=t.split("-"),i=parseInt(e[0],10),o=e[1];n=r.pop();){if(n.pos===i&&n.ids[0]===o)return!0;for(var s=n.ids[2],a=0,u=s.length;a<u;a++)r.push({pos:n.pos+1,ids:s[a]})}return!1},n.rootToLeaf=p,n.traverseRevTree=h,n.winningRev=a,n.latest=function(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var i=n.pos,o=n.ids,s=o[0],a=o[1],u=o[2],o=0===u.length,c=n.history?n.history.slice():[];if(c.push({id:s,pos:i,opts:a}),o)for(var f=0,l=c.length;f<l;f++){var d=c[f];if(d.pos+"-"+d.id===e)return i+"-"+s}for(var h=0,p=u.length;h<p;h++)r.push({pos:i+1,ids:u[h],history:c})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}},{}],14:[function(e,t,n){function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(2)),o=e(9),a=r(e(4)),s=e(3),u=r(e(5)),c=e(10),f=r(e(16)),l=e(12),d=e(14);function h(e){var t,n,r;return e instanceof ArrayBuffer?"function"==typeof(r=e).slice?r.slice(0):(t=new ArrayBuffer(r.byteLength),n=new Uint8Array(t),r=new Uint8Array(r),n.set(r),t):(n=e.size,r=e.type,"function"==typeof e.slice?e.slice(0,n,r):e.webkitSlice(0,n,r))}var p=Function.prototype.toString,v=p.call(Object);function _(e){var t,n,r,i,o;if(!e||"object"!=typeof e)return e;if(Array.isArray(e))for(t=[],n=0,r=e.length;n<r;n++)t[n]=_(e[n]);else{if(e instanceof Date)return e.toISOString();if(i=e,"undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer||"undefined"!=typeof Blob&&i instanceof Blob)return h(e);if(i=e,!(null===(i=Object.getPrototypeOf(i))||"function"==typeof(i=i.constructor)&&i instanceof i&&p.call(i)==v))return e;for(n in t={},e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==(o=_(e[n]))&&(t[n]=o)}return t}function g(t){var n=!1;return i(function(e){if(n)throw new Error("once called more than once");n=!0,t.apply(this,e)})}function E(s){return i(function(i){i=_(i);var o=this,t="function"==typeof i[i.length-1]&&i.pop(),e=new Promise(function(n,r){var e;try{var t=g(function(e,t){e?r(e):n(t)});i.push(t),(e=s.apply(o,i))&&"function"==typeof e.then&&n(e)}catch(e){r(e)}});return t&&e.then(function(e){t(null,e)},t),e})}function m(e,t){for(var n={},r=0,i=t.length;r<i;r++){var o=t[r];o in e&&(n[o]=e[o])}return n}var y;function S(e){return e}function b(e){return[{ok:e}]}try{localStorage.setItem("_pouch_check_localstorage",1),y=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){y=!1}function w(){return y}function T(){var t;s.EventEmitter.call(this),this._listeners={},t=this,y&&addEventListener("storage",function(e){t.emit(e.key)})}function A(e){var t;"undefined"!=typeof console&&"function"==typeof console[e]&&(t=Array.prototype.slice.call(arguments,1),console[e].apply(console,t))}u(T,s.EventEmitter),T.prototype.addListener=function(e,t,n,r){var i,o;function s(){var e;i._listeners[t]&&(o?o="waiting":(o=!0,e=m(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]),n.changes(e).on("change",function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===o&&a(s),o=!1}).on("error",function(){o=!1})))}this._listeners[t]||(o=!1,(i=this)._listeners[t]=s,this.on(e,s))},T.prototype.removeListener=function(e,t){t in this._listeners&&(s.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},T.prototype.notifyLocalWindows=function(e){y&&(localStorage[e]="a"===localStorage[e]?"b":"a")},T.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};e="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};u=function(){}.name?function(e){return e.name}:function(e){e=e.toString().match(/^\s*function\s*(?:(\S+)\s*)?\(/);return e&&e[1]?e[1]:""};function I(e){var t;return e?2===(t=e.split("/")).length?t:1===t.length?[e,e]:null:null}var q=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],O="queryKey",x=/(?:^|&)([^&=]*)=?([^&]*)/g,N=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;function R(a,u,c){return new Promise(function(o,s){a.get(u,function(e,t){if(e){if(404!==e.status)return s(e);t={}}var n,r,i,e=t._rev,t=c(t);if(!t)return o({updated:!1,rev:e});t._id=u,t._rev=e,o((r=t,i=c,(n=a).put(r).then(function(e){return{updated:!0,rev:e.rev}},function(e){if(409!==e.status)throw e;return R(n,r._id,i)})))})})}var L=f.v4;n.adapterFun=function(u,c){return E(i(function(r){if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var i=this,o=i,s=u,e=r;if(o.constructor.listeners("debug").length){for(var t=["api",o.name,s],n=0;n<e.length-1;n++)t.push(e[n]);o.constructor.emit("debug",t);var a=e[e.length-1];e[e.length-1]=function(e,t){var n=(n=["api",o.name,s]).concat(e?["error",e]:["success",t]);o.constructor.emit("debug",n),a(e,t)}}return this.taskqueue.isReady?c.apply(this,r):new Promise(function(t,n){i.taskqueue.addTask(function(e){e?n(e):t(i[u].apply(i,r))})})}))},n.assign=e,n.bulkGetShim=function(s,a,e){var t=a.docs,u=new o.Map,r=(t.forEach(function(e){u.has(e.id)?u.get(e.id).push(e):u.set(e.id,[e])}),u.size),i=0,c=new Array(r);function f(){var n;++i===r&&(n=[],c.forEach(function(t){t.docs.forEach(function(e){n.push({id:t.id,docs:[e]})})}),e(null,{results:n}))}var n=[],l=(u.forEach(function(e,t){n.push(t)}),0);function d(){var e,o;l>=n.length||(e=Math.min(l+6,n.length),e=n.slice(l,e),o=l,e.forEach(function(n,e){var r=o+e,e=u.get(n),t=m(e[0],["atts_since","attachments"]),i=(t.open_revs=e.map(function(e){return e.rev}),t.open_revs=t.open_revs.filter(S),S);0===t.open_revs.length&&(delete t.open_revs,i=b),["revs","attachments","binary","ajax","latest"].forEach(function(e){e in a&&(t[e]=a[e])}),s.get(n,t,function(e,t){e=e?[{error:e}]:i(t);t=e,c[r]={id:n,docs:t},f(),d()})}),l+=e.length)}d()},n.changesHandler=T,n.clone=_,n.defaultBackOff=function(e){var t,n;return t=(e=e)?0:2e3,e=parseInt(e,10)||0,(t=parseInt(t,10))!=t||t<=e?t=(e||1)<<1:t+=1,6e5<t&&(e=3e5,t=6e5),n=Math.random(),~~((t-e)*n+e)},n.explainError=function(e,t){A("info","The above "+e+" is totally normal. "+t)},n.filterChange=function(r){var i={},o=r.filter&&"function"==typeof r.filter;return i.query=r.query_params,function(e){e.doc||(e.doc={});var t=o&&((t,e,n)=>{try{return!t(e,n)}catch(e){t="Filter function threw: "+e.toString();return c.createError(c.BAD_REQUEST,t)}})(r.filter,e.doc,i);if("object"==typeof t)return t;if(t)return!1;if(r.include_docs){if(!r.attachments)for(var n in e.doc._attachments)e.doc._attachments.hasOwnProperty(n)&&(e.doc._attachments[n].stub=!0)}else delete e.doc;return!0}},n.flatten=function(e){for(var t=[],n=0,r=e.length;n<r;n++)t=t.concat(e[n]);return t},n.functionName=u,n.guardedConsole=A,n.hasLocalStorage=w,n.invalidIdError=function(e){var t;if(e?"string"!=typeof e?t=c.createError(c.INVALID_ID):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=c.createError(c.RESERVED_ID)):t=c.createError(c.MISSING_ID),t)throw t},n.isRemote=function(e){return"boolean"==typeof e._remote?e._remote:"function"==typeof e.type&&(A("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())},n.listenerCount=function(e,t){return"listenerCount"in e?e.listenerCount(t):s.EventEmitter.listenerCount(e,t)},n.nextTick=a,n.normalizeDdocFunctionName=function(e){return(e=I(e))?e.join("/"):null},n.once=g,n.parseDdocFunctionName=I,n.parseUri=function(e){for(var t=N.exec(e),r={},n=14;n--;){var i=q[n],o=t[n]||"",s=-1!==["user","password"].indexOf(i);r[i]=s?decodeURIComponent(o):o}return r[O]={},r[q[12]].replace(x,function(e,t,n){t&&(r[O][t]=n)}),r},n.pick=m,n.rev=function(e,t){return e=d.clone(e),t?(delete e._rev_tree,l.stringMd5(JSON.stringify(e))):f.v4().replace(/-/g,"").toLowerCase()},n.scopeEval=function(e,t){var n,r=[],i=[];for(n in t)t.hasOwnProperty(n)&&(r.push(n),i.push(t[n]));return r.push(e),Function.apply(null,r).apply(null,i)},n.toPromise=E,n.upsert=R,n.uuid=L},{10:10,12:12,14:14,16:16,2:2,3:3,4:4,5:5,9:9}],15:[function(e,t,n){function r(i){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function u(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0;r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function c(e){for(var t=[],n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}function f(e){for(var t=[],n=0;n<64;n+=4)t[n>>2]=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+(e[n+3]<<24);return t}function n(e){for(var t,n,r,i,o=e.length,s=[1732584193,-271733879,-1732584194,271733878],a=64;a<=o;a+=64)u(s,c(e.substring(a-64,a)));for(t=(e=e.substring(a-64)).length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<t;a+=1)n[a>>2]|=e.charCodeAt(a)<<(a%4<<3);if(n[a>>2]|=128<<(a%4<<3),55<a)for(u(s,n),a=0;a<16;a+=1)n[a]=0;return i=(i=8*o).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(i[2],16),i=parseInt(i[1],16)||0,n[14]=r,n[15]=i,u(s,n),s}function s(e){for(var t=0;t<e.length;t+=1)e[t]=(e=>{for(var t="",n=0;n<4;n+=1)t+=r[e>>8*n+4&15]+r[e>>8*n&15];return t})(e[t]);return e.join("")}function o(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}function a(e){return e=/[\u0080-\uFFFF]/.test(e)?unescape(encodeURIComponent(e)):e}function l(e){for(var t=[],n=e.length,r=0;r<n-1;r+=2)t.push(parseInt(e.substr(r,2),16));return String.fromCharCode.apply(String,t)}function d(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==s(n("hello"))&&0,"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(e,t){var n=this.byteLength,e=o(e,n),r=n;return(r=t!==i?o(t,n):r)<e?new ArrayBuffer(0):(t=r-e,n=new ArrayBuffer(t),r=new Uint8Array(n),e=new Uint8Array(this,e,t),r.set(e),n)}),d.prototype.append=function(e){return this.appendBinary(a(e)),this},d.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;for(var t=this._buff.length,n=64;n<=t;n+=64)u(this._hash,c(this._buff.substring(n-64,n)));return this._buff=this._buff.substring(n-64),this},d.prototype.end=function(e){for(var t,n=this._buff,r=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=0;o<r;o+=1)i[o>>2]|=n.charCodeAt(o)<<(o%4<<3);return this._finish(i,r),t=s(this._hash),e&&(t=l(t)),this.reset(),t},d.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},d.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(e,t){var n,r=t;if(e[r>>2]|=128<<(r%4<<3),55<r)for(u(this._hash,e),r=0;r<16;r+=1)e[r]=0;t=(t=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),n=parseInt(t[2],16),t=parseInt(t[1],16)||0,e[14]=n,e[15]=t,u(this._hash,e)},d.hash=function(e,t){return d.hashBinary(a(e),t)},d.hashBinary=function(e,t){e=s(n(e));return t?l(e):e},(d.ArrayBuffer=function(){this.reset()}).prototype.append=function(e){n=this._buff.buffer,r=e,i=!0,(o=new Uint8Array(n.byteLength+r.byteLength)).set(new Uint8Array(n)),o.set(new Uint8Array(r),n.byteLength);var t,n,r,i,o,s=i?o:o.buffer,a=s.length;for(this._length+=e.byteLength,t=64;t<=a;t+=64)u(this._hash,f(s.subarray(t-64,t)));return this._buff=t-64<a?new Uint8Array(s.buffer.slice(t-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(e){for(var t,n=this._buff,r=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=0;o<r;o+=1)i[o>>2]|=n[o]<<(o%4<<3);return this._finish(i,r),t=s(this._hash),e&&(t=l(t)),this.reset(),t},d.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.ArrayBuffer.prototype.getState=function(){var e,t=d.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},d.ArrayBuffer.prototype.setState=function(e){return e.buff=((e,t)=>{for(var n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r),o=0;o<n;o+=1)i[o]=e.charCodeAt(o);return t?i:r})(e.buff,!0),d.prototype.setState.call(this,e)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(e,t){e=s((e=>{for(var t,n,r,i,o=e.length,s=[1732584193,-271733879,-1732584194,271733878],a=64;a<=o;a+=64)u(s,f(e.subarray(a-64,a)));for(t=(e=a-64<o?e.subarray(a-64):new Uint8Array(0)).length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<t;a+=1)n[a>>2]|=e[a]<<(a%4<<3);if(n[a>>2]|=128<<(a%4<<3),55<a)for(u(s,n),a=0;a<16;a+=1)n[a]=0;return i=(i=8*o).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(i[2],16),i=parseInt(i[1],16)||0,n[14]=r,n[15]=i,u(s,n),s})(new Uint8Array(e)));return t?l(e):e},d}var i;if("object"==typeof n)t.exports=r();else{try{i=window}catch(e){i=self}i.SparkMD5=r()}},{}],16:[function(e,t,n){var r=e(19),e=e(20),i=e;i.v1=r,i.v4=e,t.exports=i},{19:19,20:20}],17:[function(e,t,n){for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);t.exports=function(e,t){return t=t||0,r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[+t]]}},{}],18:[function(e,t,n){var r,i,o="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);o?(r=new Uint8Array(16),t.exports=function(){return o(r),r}):(i=new Array(16),t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i})},{}],19:[function(e,t,n){var f,l,d=e(18),h=e(17),p=0,v=0;t.exports=function(e,t,n){var r=t&&n||0,i=t||[],o=(e=e||{}).node||f,n=void 0!==e.clockseq?e.clockseq:l,s=(null!=o&&null!=n||(s=d(),null==o&&(o=f=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==n&&(n=l=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:(new Date).getTime()),a=void 0!==e.nsecs?e.nsecs:v+1,u=s-p+(a-v)/1e4;if(u<0&&void 0===e.clockseq&&(n=n+1&16383),1e4<=(a=(u<0||p<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,l=n,u=(1e4*(268435455&(s+=122192928e5))+(v=a))%4294967296,i[r++]=u>>>24&255,i[r++]=u>>>16&255,i[r++]=u>>>8&255,i[r++]=255&u,i[r++]=(e=s/4294967296*1e4&268435455)>>>8&255,i[r++]=255&e,i[r++]=e>>>24&15|16,i[r++]=e>>>16&255,i[r++]=n>>>8|128,i[r++]=255&n;for(var c=0;c<6;++c)i[r+c]=o[c];return t||h(i)}},{17:17,18:18}],20:[function(e,t,n){var s=e(18),a=e(17);t.exports=function(e,t,n){var r=t&&n||0,i=("string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),(e=e||{}).random||(e.rng||s)());if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||a(i)}},{17:17,18:18}],21:[function(e,t,n){function d(e,t,n){var r=n[n.length-1],n=(e===r.element&&(n.pop(),r=n[n.length-1]),r.element),r=r.index;Array.isArray(n)?n.push(e):r===t.length-2?n[t.pop()]=e:t.push(e)}n.stringify=function(e){for(var t,n,r,i,o,s,a,u,c=[],f=(c.push({obj:e}),"");n=c.pop();)if(t=n.obj,f+=n.prefix||"",n=n.val||"")f+=n;else if("object"!=typeof t)f+=void 0===t?null:JSON.stringify(t);else if(null===t)f+="null";else if(Array.isArray(t)){for(c.push({val:"]"}),r=t.length-1;0<=r;r--)c.push({obj:t[r],prefix:0===r?"":","});c.push({val:"["})}else{for(o in i=[],t)t.hasOwnProperty(o)&&i.push(o);for(c.push({val:"}"}),r=i.length-1;0<=r;r--)a=t[s=i[r]],u=0<r?",":"",u+=JSON.stringify(s)+":",c.push({obj:a,prefix:u});c.push({val:"{"})}return f},n.parse=function(e){for(var t,n,r,i,o,s,a,u,c=[],f=[],l=0;;)if("}"===(t=e[l++])||"]"===t||void 0===t){if(1===c.length)return c.pop();d(c.pop(),c,f)}else switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":l+=3,d(null,c,f);break;case"t":l+=3,d(!0,c,f);break;case"f":l+=4,d(!1,c,f);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",l--;;){if(r=e[l++],!/[\d\.\-e\+]/.test(r)){l--;break}n+=r}d(parseFloat(n),c,f);break;case'"':for(i="",o=void 0,s=0;;){if('"'===(a=e[l++])&&("\\"!==o||s%2!=1))break;i+=a,"\\"===(o=a)?s++:s=0}d(JSON.parse('"'+i+'"'),c,f);break;case"[":c.push((u={element:[],index:c.length}).element),f.push(u);break;case"{":c.push((u={element:{},index:c.length}).element),f.push(u);break;default:throw new Error("unexpectedly reached end of input: "+t)}}},{}],22:[function(e,t,n){var r=e(7),s=e(1);function i(e,t){var o,e=s({websql:function(e,t,n,r){var i;return"undefined"!=typeof sqlitePlugin?(i=s({},o,{name:e,version:t,description:n,size:r}),sqlitePlugin.openDatabase(i)):openDatabase(e,t,n,r)}},o=e);("undefined"==typeof cordova||"undefined"==typeof sqlitePlugin&&"undefined"==typeof openDatabase)&&console.error("PouchDB error: you must install a SQLite plugin in order for PouchDB to work on this platform. Options:\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2\n - https://github.com/litehelpers/Cordova-sqlite-storage\n - https://github.com/Microsoft/cordova-plugin-websql"),("default"in r&&"function"==typeof r.default.call?r.default:r).call(this,e,t)}function o(e){e.adapter("cordova-sqlite",i,!0)}i.valid=function(){return!0},i.use_prefix=!1,"undefined"!=typeof window&&window.PouchDB&&window.PouchDB.plugin(o),t.exports=o},{1:1,7:7}]},{},[22])(22)});
@@ -1 +1 @@
1
- function QR8bitByte(t){this.mode=QRMode.MODE_8BIT_BYTE,this.data=t}function ALPHA_NUM(t){this.mode=QRMode.MODE_ALPHA_NUM,this.data=t}function NUMBER(t){this.mode=QRMode.MODE_NUMBER,this.data=t}function QRCode(t,e,r){this.typeNumber=t,this.errorCorrectLevel=e,this.inputMode=r,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=new Array}function QRPolynomial(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}function QRRSBlock(t,e){this.totalCount=t,this.dataCount=e}function QRBitBuffer(){this.buffer=new Array,this.length=0}QR8bitByte.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}},ALPHA_NUM.prototype={getCode:function(t){return"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".indexOf(t)},getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)this.data[e+1]?t.put(45*this.getCode(this.data[e])+this.getCode(this.data[e+1]),11):t.put(this.getCode(this.data[e]),6),e++}},NUMBER.prototype={getBitLen:function(t){return{3:10,2:7,1:4}[t]},getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++){var r=this.data[e];this.data[e+1]&&(r+=this.data[e+1]),this.data[e+2]&&(r+=this.data[e+2]);var o=this.getBitLen(r.length);t.put(parseInt(r,10),o),e++,e++}}},QRCode.prototype={addData:function(t){var e;e="NUMBER"===this.inputMode?new NUMBER(t):"ALPHA_NUM"===this.inputMode?new ALPHA_NUM(t):new QR8bitByte(t),this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=QRRSBlock.getRSBlocks(t,this.errorCorrectLevel),r=new QRBitBuffer,o=0,i=0;i<e.length;i++)o+=e[i].dataCount;for(var i=0;i<this.dataList.length;i++){var n=this.dataList[i];r.put(n.mode,4),r.put(n.getLength(),QRUtil.getLengthInBits(n.mode,t)),n.write(r)}if(r.getLengthInBits()<=8*o)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[r][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=QRCode.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=QRUtil.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i<this.modules.length;i++)for(var n=1*i,a=0;a<this.modules[i].length;a++){var s=1*a,u=this.modules[i][a];u&&(o.beginFill(0,100),o.moveTo(s,n),o.lineTo(s+1,n),o.lineTo(s+1,n+1),o.lineTo(s,n+1),o.endFill())}return o},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=QRUtil.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var o=t[e],i=t[r];if(null==this.modules[o][i])for(var n=-2;n<=2;n++)for(var a=-2;a<=2;a++)this.modules[o+n][i+a]=-2==n||2==n||-2==a||2==a||0==n&&0==a}},setupTypeNumber:function(t){for(var e=QRUtil.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(var r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,o=QRUtil.getBCHTypeInfo(r),i=0;i<15;i++){var n=!t&&1==(o>>i&1);i<6?this.modules[i][8]=n:i<8?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(var i=0;i<15;i++){var n=!t&&1==(o>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=n:i<9?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[o][a-s]){var u=!1;n<t.length&&(u=1==(t[n]>>>i&1));var h=QRUtil.getMask(e,o,a-s);h&&(u=!u),this.modules[o][a-s]=u,i--,-1==i&&(n++,i=7)}if((o+=r)<0||this.moduleCount<=o){o-=r,r=-r;break}}}},QRCode.PAD0=236,QRCode.PAD1=17,QRCode.createData=function(t,e,r){for(var o=QRRSBlock.getRSBlocks(t,e),i=new QRBitBuffer,n=0;n<r.length;n++){var a=r[n];i.put(a.mode,4),i.put(a.getLength(),QRUtil.getLengthInBits(a.mode,t)),a.write(i)}for(var s=0,n=0;n<o.length;n++)s+=o[n].dataCount;if(i.getLengthInBits()>8*s)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*s+")");for(i.getLengthInBits()+4<=8*s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;;){if(i.getLengthInBits()>=8*s)break;if(i.put(QRCode.PAD0,8),i.getLengthInBits()>=8*s)break;i.put(QRCode.PAD1,8)}return QRCode.createBytes(i,o)},QRCode.createBytes=function(t,e){for(var r=0,o=0,i=0,n=new Array(e.length),a=new Array(e.length),s=0;s<e.length;s++){var u=e[s].dataCount,h=e[s].totalCount-u;o=Math.max(o,u),i=Math.max(i,h),n[s]=new Array(u);for(var l=0;l<n[s].length;l++)n[s][l]=255&t.buffer[l+r];r+=u;var g=QRUtil.getErrorCorrectPolynomial(h),f=new QRPolynomial(n[s],g.getLength()-1),R=f.mod(g);a[s]=new Array(g.getLength()-1);for(var l=0;l<a[s].length;l++){var d=l+R.getLength()-a[s].length;a[s][l]=d>=0?R.get(d):0}}for(var c=0,l=0;l<e.length;l++)c+=e[l].totalCount;for(var Q=new Array(c),m=0,l=0;l<o;l++)for(var s=0;s<e.length;s++)l<n[s].length&&(Q[m++]=n[s][l]);for(var l=0;l<i;l++)for(var s=0;s<e.length;s++)l<a[s].length&&(Q[m++]=a[s][l]);return Q};for(var QRMode={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},QRErrorCorrectLevel={L:1,M:0,Q:3,H:2},QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G15)>=0;)e^=QRUtil.G15<<QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G15);return(t<<10|e)^QRUtil.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G18)>=0;)e^=QRUtil.G18<<QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return QRUtil.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case QRMaskPattern.PATTERN000:return(e+r)%2==0;case QRMaskPattern.PATTERN001:return e%2==0;case QRMaskPattern.PATTERN010:return r%3==0;case QRMaskPattern.PATTERN011:return(e+r)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case QRMaskPattern.PATTERN101:return e*r%2+e*r%3==0;case QRMaskPattern.PATTERN110:return(e*r%2+e*r%3)%2==0;case QRMaskPattern.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new QRPolynomial([1],0),r=0;r<t;r++)e=e.multiply(new QRPolynomial([1,QRMath.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:case QRMode.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case QRMode.MODE_NUMBER:return 14;case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;o<e;o++)for(var i=0;i<e;i++){for(var n=0,a=t.isDark(o,i),s=-1;s<=1;s++)if(!(o+s<0||e<=o+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(o+s,i+u)&&n++;n>5&&(r+=3+n-5)}for(var o=0;o<e-1;o++)for(var i=0;i<e-1;i++){var h=0;t.isDark(o,i)&&h++,t.isDark(o+1,i)&&h++,t.isDark(o,i+1)&&h++,t.isDark(o+1,i+1)&&h++,0!=h&&4!=h||(r+=3)}for(var o=0;o<e;o++)for(var i=0;i<e-6;i++)t.isDark(o,i)&&!t.isDark(o,i+1)&&t.isDark(o,i+2)&&t.isDark(o,i+3)&&t.isDark(o,i+4)&&!t.isDark(o,i+5)&&t.isDark(o,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var o=0;o<e-6;o++)t.isDark(o,i)&&!t.isDark(o+1,i)&&t.isDark(o+2,i)&&t.isDark(o+3,i)&&t.isDark(o+4,i)&&!t.isDark(o+5,i)&&t.isDark(o+6,i)&&(r+=40);for(var l=0,i=0;i<e;i++)for(var o=0;o<e;o++)t.isDark(o,i)&&l++;return r+=Math.abs(100*l/e/e-50)/5*10}},QRMath={glog:function(t){if(t<1)throw new Error("glog("+t+")");return QRMath.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return QRMath.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},i=0;i<8;i++)QRMath.EXP_TABLE[i]=1<<i;for(var i=8;i<256;i++)QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];for(var i=0;i<255;i++)QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i;QRPolynomial.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var o=0;o<t.getLength();o++)e[r+o]^=QRMath.gexp(QRMath.glog(this.get(r))+QRMath.glog(t.get(o)));return new QRPolynomial(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=QRMath.glog(this.get(0))-QRMath.glog(t.get(0)),r=new Array(this.getLength()),o=0;o<this.getLength();o++)r[o]=this.get(o);for(var o=0;o<t.getLength();o++)r[o]^=QRMath.gexp(QRMath.glog(t.get(o))+e);return new QRPolynomial(r,0).mod(t)}},QRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],QRRSBlock.getRSBlocks=function(t,e){var r=QRRSBlock.getRsBlockTable(t,e);if(void 0==r)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var o=r.length/3,i=new Array,n=0;n<o;n++)for(var a=r[3*n+0],s=r[3*n+1],u=r[3*n+2],h=0;h<a;h++)i.push(new QRRSBlock(s,u));return i},QRRSBlock.getRsBlockTable=function(t,e){switch(e){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},QRBitBuffer.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};
1
+ function QR8bitByte(t){this.mode=QRMode.MODE_8BIT_BYTE,this.data=t}function ALPHA_NUM(t){this.mode=QRMode.MODE_ALPHA_NUM,this.data=t}function NUMBER(t){this.mode=QRMode.MODE_NUMBER,this.data=t}function QRCode(t,e,r){this.typeNumber=t,this.errorCorrectLevel=e,this.inputMode=r,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=new Array}QR8bitByte.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}},ALPHA_NUM.prototype={getCode:function(t){return"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".indexOf(t)},getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)this.data[e+1]?t.put(45*this.getCode(this.data[e])+this.getCode(this.data[e+1]),11):t.put(this.getCode(this.data[e]),6),e++}},NUMBER.prototype={getBitLen:function(t){return{3:10,2:7,1:4}[t]},getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++){var r=this.data[e],o=(this.data[e+1]&&(r+=this.data[e+1]),this.data[e+2]&&(r+=this.data[e+2]),this.getBitLen(r.length));t.put(parseInt(r,10),o),e++,e++}}},QRCode.prototype={addData:function(t){t=new("NUMBER"===this.inputMode?NUMBER:"ALPHA_NUM"===this.inputMode?ALPHA_NUM:QR8bitByte)(t);this.dataList.push(t),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){for(var t=1,t=1;t<40;t++){for(var e=QRRSBlock.getRSBlocks(t,this.errorCorrectLevel),r=new QRBitBuffer,o=0,i=0;i<e.length;i++)o+=e[i].dataCount;for(i=0;i<this.dataList.length;i++){var n=this.dataList[i];r.put(n.mode,4),r.put(n.getLength(),QRUtil.getLengthInBits(n.mode,t)),n.write(r)}if(r.getLengthInBits()<=8*o)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++)this.modules[r][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),7<=this.typeNumber&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=QRCode.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=QRUtil.getLostPoint(this);(0==r||o<t)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i<this.modules.length;i++)for(var n=+i,a=0;a<this.modules[i].length;a++){var s=+a;this.modules[i][a]&&(o.beginFill(0,100),o.moveTo(s,n),o.lineTo(1+s,n),o.lineTo(1+s,1+n),o.lineTo(s,1+n),o.endFill())}return o},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=QRUtil.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var o=t[e],i=t[r];if(null==this.modules[o][i])for(var n=-2;n<=2;n++)for(var a=-2;a<=2;a++)this.modules[o+n][i+a]=-2==n||2==n||-2==a||2==a||0==n&&0==a}},setupTypeNumber:function(t){for(var e=QRUtil.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(r=0;r<18;r++){o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},setupTypeInfo:function(t,e){for(var e=this.errorCorrectLevel<<3|e,r=QRUtil.getBCHTypeInfo(e),o=0;o<15;o++){var i=!t&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!t&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;0<a;a-=2)for(6==a&&a--;;){for(var s,u,h=0;h<2;h++)null==this.modules[o][a-h]&&(s=!1,n<t.length&&(s=1==(t[n]>>>i&1)),u=QRUtil.getMask(e,o,a-h),this.modules[o][a-h]=s=u?!s:s,-1==--i)&&(n++,i=7);if((o+=r)<0||this.moduleCount<=o){o-=r,r=-r;break}}}},QRCode.PAD0=236,QRCode.PAD1=17,QRCode.createData=function(t,e,r){for(var o=QRRSBlock.getRSBlocks(t,e),i=new QRBitBuffer,n=0;n<r.length;n++){var a=r[n];i.put(a.mode,4),i.put(a.getLength(),QRUtil.getLengthInBits(a.mode,t)),a.write(i)}for(var s=0,n=0;n<o.length;n++)s+=o[n].dataCount;if(i.getLengthInBits()>8*s)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+8*s+")");for(i.getLengthInBits()+4<=8*s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;;){if(i.getLengthInBits()>=8*s)break;if(i.put(QRCode.PAD0,8),i.getLengthInBits()>=8*s)break;i.put(QRCode.PAD1,8)}return QRCode.createBytes(i,o)},QRCode.createBytes=function(t,e){for(var r=0,o=0,i=0,n=new Array(e.length),a=new Array(e.length),s=0;s<e.length;s++){var u=e[s].dataCount,h=e[s].totalCount-u,o=Math.max(o,u),i=Math.max(i,h);n[s]=new Array(u);for(var l=0;l<n[s].length;l++)n[s][l]=255&t.buffer[l+r];r+=u;var u=QRUtil.getErrorCorrectPolynomial(h),g=new QRPolynomial(n[s],u.getLength()-1).mod(u);a[s]=new Array(u.getLength()-1);for(l=0;l<a[s].length;l++){var f=l+g.getLength()-a[s].length;a[s][l]=0<=f?g.get(f):0}}for(var R=0,l=0;l<e.length;l++)R+=e[l].totalCount;for(var d=new Array(R),c=0,l=0;l<o;l++)for(s=0;s<e.length;s++)l<n[s].length&&(d[c++]=n[s][l]);for(l=0;l<i;l++)for(s=0;s<e.length;s++)l<a[s].length&&(d[c++]=a[s][l]);return d};for(var QRMode={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},QRErrorCorrectLevel={L:1,M:0,Q:3,H:2},QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;0<=QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G15);)e^=QRUtil.G15<<QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G15);return(t<<10|e)^QRUtil.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;0<=QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G18);)e^=QRUtil.G18<<QRUtil.getBCHDigit(e)-QRUtil.getBCHDigit(QRUtil.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return QRUtil.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case QRMaskPattern.PATTERN000:return(e+r)%2==0;case QRMaskPattern.PATTERN001:return e%2==0;case QRMaskPattern.PATTERN010:return r%3==0;case QRMaskPattern.PATTERN011:return(e+r)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case QRMaskPattern.PATTERN101:return e*r%2+e*r%3==0;case QRMaskPattern.PATTERN110:return(e*r%2+e*r%3)%2==0;case QRMaskPattern.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new QRPolynomial([1],0),r=0;r<t;r++)e=e.multiply(new QRPolynomial([1,QRMath.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:case QRMode.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case QRMode.MODE_NUMBER:return 14;case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;o<e;o++)for(var i=0;i<e;i++){for(var n=0,a=t.isDark(o,i),s=-1;s<=1;s++)if(!(o+s<0||e<=o+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(o+s,i+u)&&n++;5<n&&(r+=3+n-5)}for(o=0;o<e-1;o++)for(i=0;i<e-1;i++){var h=0;t.isDark(o,i)&&h++,t.isDark(o+1,i)&&h++,t.isDark(o,i+1)&&h++,t.isDark(o+1,i+1)&&h++,0!=h&&4!=h||(r+=3)}for(o=0;o<e;o++)for(i=0;i<e-6;i++)t.isDark(o,i)&&!t.isDark(o,i+1)&&t.isDark(o,i+2)&&t.isDark(o,i+3)&&t.isDark(o,i+4)&&!t.isDark(o,i+5)&&t.isDark(o,i+6)&&(r+=40);for(i=0;i<e;i++)for(o=0;o<e-6;o++)t.isDark(o,i)&&!t.isDark(o+1,i)&&t.isDark(o+2,i)&&t.isDark(o+3,i)&&t.isDark(o+4,i)&&!t.isDark(o+5,i)&&t.isDark(o+6,i)&&(r+=40);for(var l=0,i=0;i<e;i++)for(o=0;o<e;o++)t.isDark(o,i)&&l++;return r+=10*(Math.abs(100*l/e/e-50)/5)}},QRMath={glog:function(t){if(t<1)throw new Error("glog("+t+")");return QRMath.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;256<=t;)t-=255;return QRMath.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},i=0;i<8;i++)QRMath.EXP_TABLE[i]=1<<i;for(i=8;i<256;i++)QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];for(i=0;i<255;i++)QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i;function QRPolynomial(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}function QRRSBlock(t,e){this.totalCount=t,this.dataCount=e}function QRBitBuffer(){this.buffer=new Array,this.length=0}QRPolynomial.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var o=0;o<t.getLength();o++)e[r+o]^=QRMath.gexp(QRMath.glog(this.get(r))+QRMath.glog(t.get(o)));return new QRPolynomial(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=QRMath.glog(this.get(0))-QRMath.glog(t.get(0)),r=new Array(this.getLength()),o=0;o<this.getLength();o++)r[o]=this.get(o);for(o=0;o<t.getLength();o++)r[o]^=QRMath.gexp(QRMath.glog(t.get(o))+e);return new QRPolynomial(r,0).mod(t)}},QRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],QRRSBlock.getRSBlocks=function(t,e){var r=QRRSBlock.getRsBlockTable(t,e);if(null==r)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var o=r.length/3,i=new Array,n=0;n<o;n++)for(var a=r[3*n+0],s=r[3*n+1],u=r[3*n+2],h=0;h<a;h++)i.push(new QRRSBlock(s,u));return i},QRRSBlock.getRsBlockTable=function(t,e){switch(e){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},QRBitBuffer.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};
@@ -1 +1 @@
1
- <a href="" class="color-default" style="display:block" xattr-fullsize="display:block;" data-replace="true" text-theme="color-default">Link</a>
1
+ <a href="" class="color-default" style="display:block;" xattr-fullsize="display:block;" data-replace="true" text-theme="color-default">Link</a>
@@ -1 +1 @@
1
- <button class="button button-block button-default button-medium filled" type="submit" xattr-fullsize="button-block" xattr-theme="button-default" ng-click="" data-component="crn-button" xattr-size="button-medium" xattr-type="filled"><i class="ion ion-home" xattr-icon-theme=""></i> <span>Button</span></button>
1
+ <button class="button button-custom button-default button-medium filled col-xs-12" type="submit" xattr-fullsize="button-block" xattr-theme="button-default" ng-click="" data-component="crn-button" xattr-size="button-medium" xattr-type="filled"><i class="ion ion-home" xattr-icon-theme=""></i> <span>Button</span></button>
@@ -1 +1 @@
1
- <div class="component-holder ng-scope" data-component="crn-select" id=""><div class="item item-input item-select"><label class="input-label" aria-label="Select Item" id="">Select Item</label><select aria-label="Aria Label Text" id="" class="ng-pristine ng-untouched ng-valid ng-empty" aria-invalid="false"><option value=""></option><option data-component="crn-item-select" class="active" value="1">Value 1</option><option data-component="crn-item-select" class="" value="2">Value 2</option><option data-component="crn-item-select" class="" value="3">Value 3</option></select></div></div>
1
+ <div class="component-holder ng-scope" data-component="crn-select" id=""><div class="item item-input item-select"><label class="input-label" aria-label="Select Item" id="">Select Item</label> <select aria-label="Aria Label Text" id="" class="ng-pristine ng-untouched ng-valid ng-empty" aria-invalid="false"><option value=""></option><option data-component="crn-item-select" class="active" value="1">Value 1</option><option data-component="crn-item-select" class="" value="2">Value 2</option><option data-component="crn-item-select" class="" value="3">Value 3</option></select></div></div>
@@ -1 +1 @@
1
- <div class="item item-input item-select"><label class="input-label">Select Item</label><select aria-label="Aria Label Text" ng-model="vars.combobox${RANDOM}" id="select-${RANDOM}"><option data-component="crn-item-select" class="active" value="1" ng-selected="true">Value 1</option><option data-component="crn-item-select" class="" value="2" ng-selected="">Value 2</option><option data-component="crn-item-select" class="" value="3" ng-selected="">Value 3</option></select></div>
1
+ <div class="item item-input item-select"><label class="input-label">Select Item</label> <select aria-label="Aria Label Text" ng-model="vars.combobox${RANDOM}" id="select-${RANDOM}"><option data-component="crn-item-select" class="active" value="1" ng-selected="true">Value 1</option><option data-component="crn-item-select" class="" value="2" ng-selected="">Value 2</option><option data-component="crn-item-select" class="" value="3" ng-selected="">Value 3</option></select></div>
@@ -3,4 +3,4 @@
3
3
  margin: auto;
4
4
  display: table-cell;
5
5
  vertical-align: middle;
6
- text-align: center">
6
+ text-align: center;">
@@ -1 +1 @@
1
- <div class="crn-signature-pad" style="background-color: rgb(241, 238, 238); height: 100%; min-height: 200px"><div class="component-holder ng-scope col-md-2" style="bottom: 0; position: absolute" data-component="crn-button"><button class="button button-block button-medium filled button-energized col-xs-3" type="submit" xattr-fullsize="button-block" xattr-theme="button-energized" ng-click="" data-component="crn-button" xattr-size="button-medium" xattr-type="filled" id="crn-button-79101"><i class="fa fa-eraser" xattr-icon-theme=""></i> <span>{{'clear' | translate}}</span></button></div></div>
1
+ <div class="crn-signature-pad" style="background-color: rgb(241, 238, 238); height: 100%; min-height: 200px;"><div class="component-holder ng-scope col-md-2" style="bottom: 0; position: absolute;" data-component="crn-button"><button class="button button-block button-medium filled button-energized col-xs-3" type="submit" xattr-fullsize="button-block" xattr-theme="button-energized" ng-click="" data-component="crn-button" xattr-size="button-medium" xattr-type="filled" id="crn-button-79101"><i class="fa fa-eraser" xattr-icon-theme=""></i> <span>{{'clear' | translate}}</span></button></div></div>
@@ -1 +1 @@
1
- <span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input"></span> <span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span> </span></span>
1
+ <span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input"></span> <span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>
@@ -1 +1 @@
1
- <div class="item item-input item-select"><span class="input-label">Label</span><select aria-label="Seleção Dinâmica" ng-model="vars.combobox${RANDOM}" crn-datasource="" id="dynamic-select-${RANDOM}" name="dynamic-select-${RANDOM}"><option value="">None</option></select></div>
1
+ <div class="item item-input item-select"><span class="input-label">Label</span> <select aria-label="Seleção Dinâmica" ng-model="vars.combobox${RANDOM}" crn-datasource="" id="dynamic-select-${RANDOM}" name="dynamic-select-${RANDOM}"><option value="">None</option></select></div>
@@ -1 +1 @@
1
- <div cronapp-stars="" class="cronapp-star component-holder ng-untouched ng-valid ng-not-empty ng-dirty ng-valid-parse"><i style="font-size: 200%" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%" class="component-holder ion ion-android-star-outline"></i></div>
1
+ <div cronapp-stars="" class="cronapp-star component-holder ng-untouched ng-valid ng-not-empty ng-dirty ng-valid-parse"><i style="font-size: 200%;" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%;" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%;" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%;" class="component-holder ion ion-android-star-outline"></i> <i style="font-size: 200%;" class="component-holder ion ion-android-star-outline"></i></div>
@@ -1 +1 @@
1
- <div class="form-group upload-image-component" ngf-drop ngf-change="datasource.setImage($file, datasource.active.image)" ngf-pattern="'image/*'"><label>Image Upload</label><img style="max-height: 128px; max-width: 128px" ng-if="datasource.active.image" alt="Image Upload" data-ng-src="{{'data:image/png;base64,' + datasource.active.image}}" ngf-change="datasource.setImage($file, datasource.active, 'image')" accept="image/*"> <img data-ng-src="{{datasource.noImageUpload}}" style="max-height: 128px; max-width: 128px" ng-if="!datasource.active.image" alt="Image Upload" ngf-select class="btn btn-default btn-block" ngf-change="datasource.setImage($file, datasource.active, 'image')" accept="image/*"><div class="remove btn btn-default btn-xs btn-danger" ng-if="datasource.active.image" ng-click="datasource.active.image=null"><span class="glyphicon glyphicon-remove"></span></div></div>
1
+ <div class="form-group upload-image-component" ngf-drop ngf-change="datasource.setImage($file, datasource.active.image)" ngf-pattern="'image/*'"><label>Image Upload</label> <img style="max-height: 128px; max-width: 128px;" ng-if="datasource.active.image" alt="Image Upload" data-ng-src="{{'data:image/png;base64,' + datasource.active.image}}" ngf-change="datasource.setImage($file, datasource.active, 'image')" accept="image/*"> <img data-ng-src="{{datasource.noImageUpload}}" style="max-height: 128px; max-width: 128px;" ng-if="!datasource.active.image" alt="Image Upload" ngf-select class="btn btn-default btn-block" ngf-change="datasource.setImage($file, datasource.active, 'image')" accept="image/*"><div class="remove btn btn-default btn-xs btn-danger" ng-if="datasource.active.image" ng-click="datasource.active.image=null"><span class="glyphicon glyphicon-remove"></span></div></div>
@@ -1 +1 @@
1
- <ion-footer-bar class="bar bar-footer bar-default" xattr-theme-background="bar-default"><div class="buttons" id="left-buttons"><button class="button button-default button-medium filled" xattr-fullsize="" xattr-theme="button-default" data-component="crn-button" xattr-size="button-medium" xattr-type="filled"><span>Left Button</span></button></div><h1 class="title" xattr-position="text-align: center;" style="text-align: center" id="crn-heading-title">Title!</h1><div class="buttons" id="right-buttons"><button class="button button-default button-medium filled" xattr-fullsize="" xattr-theme="button-default" data-component="crn-button" xattr-size="button-medium" xattr-type="filled"><span>Right Button</span></button></div></ion-footer-bar>
1
+ <ion-footer-bar class="bar bar-footer bar-default" xattr-theme-background="bar-default"><div class="buttons" id="left-buttons"><button class="button button-default button-medium filled" xattr-fullsize="" xattr-theme="button-default" data-component="crn-button" xattr-size="button-medium" xattr-type="filled"><span>Left Button</span></button></div><h1 class="title" xattr-position="text-align: center;" style="text-align: center;" id="crn-heading-title">Title!</h1><div class="buttons" id="right-buttons"><button class="button button-default button-medium filled" xattr-fullsize="" xattr-theme="button-default" data-component="crn-button" xattr-size="button-medium" xattr-type="filled"><span>Right Button</span></button></div></ion-footer-bar>
@@ -1 +1 @@
1
- <ion-header-bar class="crn-ion-header-bar bar bar-default" data-component="crn-ion-header-bar" xattr-theme="bar-default"><div class="buttons buttons-left header-item" data-component="crn-header-button" id="crn-header-button-1"><button class="button button-clear component-holder" menu-toggle="left"><i class="ion ion-android-menu"></i></button></div><h1 class="title" align-title="text-align: center;" style="text-align: center">Title!</h1><div class="buttons buttons-right header-item" data-component="crn-header-button" id="crn-header-button-2"><button class="button button-clear component-holder" menu-toggle="right"><i class="ion ion-android-menu"></i></button></div></ion-header-bar>
1
+ <ion-header-bar class="crn-ion-header-bar bar bar-default" data-component="crn-ion-header-bar" xattr-theme="bar-default"><div class="buttons buttons-left header-item" data-component="crn-header-button" id="crn-header-button-1"><button class="button button-clear component-holder" menu-toggle="left"><i class="ion ion-android-menu"></i></button></div><h1 class="title" align-title="text-align: center;" style="text-align: center;">Title!</h1><div class="buttons buttons-right header-item" data-component="crn-header-button" id="crn-header-button-2"><button class="button button-clear component-holder" menu-toggle="right"><i class="ion ion-android-menu"></i></button></div></ion-header-bar>
@@ -1 +1 @@
1
- <a class="tab-item has-badge"><span class="badge">{{attrs.badge}}</span> <i class="icon {{attrs['icon-off']}}"></i> <span class="tab-title">{{attrs.title}}</span> </a>
1
+ <a class="tab-item has-badge"><span class="badge">{{attrs.badge}}</span> <i class="icon {{attrs['icon-off']}}"></i> <span class="tab-title">{{attrs.title}}</span></a>
@@ -1 +1 @@
1
- <a class="item item-icon-left" xattr-icon-position="item-icon-left" xattr-text-position="text-left"><i class="icon ion ion-home dark" xattr-theme="dark" xattr-icon-size="font-size:200%;" style="font-size:200%"></i><h2 class="dark" xattr-theme="dark">Item Content</h2></a>
1
+ <a class="item item-icon-left" xattr-icon-position="item-icon-left" xattr-text-position="text-left"><i class="icon ion ion-home dark" xattr-theme="dark" xattr-icon-size="font-size:200%;" style="font-size:200%;"></i><h2 class="dark" xattr-theme="dark">Item Content</h2></a>
@@ -1 +1 @@
1
- <ion-slide xattr-theme="positive-bg" id="crn-slider-item-${RANDOM}" data-component="crn-slider-item" class="positive-bg crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">NEW SLIDE</h2></ion-slide>
1
+ <ion-slide xattr-theme="positive-bg" id="crn-slider-item-${RANDOM}" data-component="crn-slider-item" class="positive-bg crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover;" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">NEW SLIDE</h2></ion-slide>
@@ -1 +1 @@
1
- <div id="chat" data-role="chat" class="k-widget k-chat"><div class="k-message-list k-avatars" data-role="chat" aria-live="polite"><div class="k-message-list-content"><div me="" class="k-message-group k-alt k-no-avatar"><div class="k-message k-only"><time class="k-message-time">22:01:47</time><div class="k-bubble">Ola, seja bem vindo ao cronchat</div></div></div></div></div><div class="k-message-box" data-role="chat"><label class="k-hidden" for="inputId_80fd3281-a8fe-4b57-bd57-23dd2ccbc752">Digite aqui sua mensagem</label><input type="text" class="k-input" id="inputId_80fd3281-a8fe-4b57-bd57-23dd2ccbc752" placeholder="Type here..."> <button class="k-button k-flat k-button-icon k-button-send" title="Send message" aria-label="Send message"><svg version="1.1" ixmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"></path></svg></button></div><div class="k-toolbar-box" role="toolbar" style="display:none"></div></div>
1
+ <div id="chat" data-role="chat" class="k-widget k-chat"><div class="k-message-list k-avatars" data-role="chat" aria-live="polite"><div class="k-message-list-content"><div me="" class="k-message-group k-alt k-no-avatar"><div class="k-message k-only"><time class="k-message-time">22:01:47</time><div class="k-bubble">Ola, seja bem vindo ao cronchat</div></div></div></div></div><div class="k-message-box" data-role="chat"><label class="k-hidden" for="inputId_80fd3281-a8fe-4b57-bd57-23dd2ccbc752">Digite aqui sua mensagem</label><input type="text" class="k-input" id="inputId_80fd3281-a8fe-4b57-bd57-23dd2ccbc752" placeholder="Type here..."> <button class="k-button k-flat k-button-icon k-button-send" title="Send message" aria-label="Send message"><svg version="1.1" ixmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"></path></svg></button></div><div class="k-toolbar-box" role="toolbar" style="display:none;"></div></div>
@@ -1 +1 @@
1
- <kendo-chat id="kendo-chat${RANDOM}" chat-placeholder="Digite uma mensagem" ng-on-post-message="" ng-on-send-message="" ng-on-typing-start="" ng-on-typing-end=""><div data-role="chat" class="k-widget k-chat"><div class="k-message-list k-avatars" data-role="chat" aria-live="polite"><div class="k-message-list-content"><div cronapp="" class="k-message-group"><p class="k-author">Cronapp</p><img src="https://ide.cronapp.io/resources/favicon/favicon.svg" alt="Cronapp" class="k-avatar"><div class="k-message k-first"><time class="k-message-time">14:25:32</time><div class="k-bubble">Olá Usuário, este é o Cron Chat</div></div><div class="k-message k-last"><time class="k-message-time">14:25:32</time><div class="k-bubble">Seja bem vindo!</div></div></div><div me="" class="k-message-group k-alt"><img src="https://www.creph.com.br/assets/all/img/default.png" alt="User" class="k-avatar"><div class="k-message k-first"><time class="k-message-time">14:25:37</time><div class="k-bubble">Olá!</div></div><div class="k-message k-last"><time class="k-message-time">14:25:46</time><div class="k-bubble">Muito legal! :)</div></div></div></div></div><div class="k-message-box" data-role="chat"><label class="k-hidden" for="inputId_56884ad4-d5ca-4bb0-bc84-d352644d6410">Digite a mensagem</label><input type="text" class="k-input" id="inputId_56884ad4-d5ca-4bb0-bc84-d352644d6410" placeholder="Digite a mensagem"><button class="k-button k-flat k-button-icon k-button-send" title="Send message" aria-label="Send message"><svg version="1.1" ixmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"></path></svg></button></div><div class="k-toolbar-box" role="toolbar" style="display: none"></div></div></kendo-chat>
1
+ <kendo-chat id="kendo-chat${RANDOM}" chat-placeholder="Digite uma mensagem" ng-on-post-message="" ng-on-send-message="" ng-on-typing-start="" ng-on-typing-end=""><div data-role="chat" class="k-widget k-chat"><div class="k-message-list k-avatars" data-role="chat" aria-live="polite"><div class="k-message-list-content"><div cronapp="" class="k-message-group"><p class="k-author">Cronapp</p><img src="https://ide.cronapp.io/resources/favicon/favicon.svg" alt="Cronapp" class="k-avatar"><div class="k-message k-first"><time class="k-message-time">14:25:32</time><div class="k-bubble">Olá Usuário, este é o Cron Chat</div></div><div class="k-message k-last"><time class="k-message-time">14:25:32</time><div class="k-bubble">Seja bem vindo!</div></div></div><div me="" class="k-message-group k-alt"><img src="https://www.creph.com.br/assets/all/img/default.png" alt="User" class="k-avatar"><div class="k-message k-first"><time class="k-message-time">14:25:37</time><div class="k-bubble">Olá!</div></div><div class="k-message k-last"><time class="k-message-time">14:25:46</time><div class="k-bubble">Muito legal! :)</div></div></div></div></div><div class="k-message-box" data-role="chat"><label class="k-hidden" for="inputId_56884ad4-d5ca-4bb0-bc84-d352644d6410">Digite a mensagem</label><input type="text" class="k-input" id="inputId_56884ad4-d5ca-4bb0-bc84-d352644d6410" placeholder="Digite a mensagem"><button class="k-button k-flat k-button-icon k-button-send" title="Send message" aria-label="Send message"><svg version="1.1" ixmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"></path></svg></button></div><div class="k-toolbar-box" role="toolbar" style="display: none;"></div></div></kendo-chat>
@@ -1 +1 @@
1
- <ion-list crn-datasource="" class="listCanSwipe" id="crn-list-swipe${RANDOM}"><div ng-repeat="rowData in datasource.data" class="to-repeat"><ion-item class="item" id="crn-list-item-swipe${RANDOM}" data-component="crn-item-swipe"><h2 style="display: inline">Item</h2><div id="crn-item-options${RANDOM}" class="component-holder" data-component="crn-item-options"><div class="crn-item-options" data-item="true"><ion-option-button id="crn-option-button${RANDOM}" data-component="crn-button" class="button-default button editButton"><i class="ion ion-edit"></i><span>Action 1</span></ion-option-button><ion-option-button id="crn-option-button${RANDOM}-2" data-component="crn-button" class="button-assertive button deleteButton"><i class="ion ion-trash-a"></i><span>Action 2</span></ion-option-button></div></div></ion-item></div></ion-list>
1
+ <ion-list crn-datasource="" class="listCanSwipe" id="crn-list-swipe${RANDOM}"><div ng-repeat="rowData in datasource.data" class="to-repeat"><ion-item class="item" id="crn-list-item-swipe${RANDOM}" data-component="crn-item-swipe"><h2 style="display: inline;">Item</h2><div id="crn-item-options${RANDOM}" class="component-holder" data-component="crn-item-options"><div class="crn-item-options" data-item="true"><ion-option-button id="crn-option-button${RANDOM}" data-component="crn-button" class="button-default button editButton"><i class="ion ion-edit"></i><span>Action 1</span></ion-option-button><ion-option-button id="crn-option-button${RANDOM}-2" data-component="crn-button" class="button-assertive button deleteButton"><i class="ion ion-trash-a"></i><span>Action 2</span></ion-option-button></div></div></ion-item></div></ion-list>
@@ -1 +1 @@
1
- <iframe class="cronMap" src="" width="" height="" style="border:0" allowfullscreen="" loading="lazy"></iframe>
1
+ <iframe class="cronMap" src="" width="" height="" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
@@ -1 +1 @@
1
- <div class="item item-input item-select"><span class="input-label">Label</span><select aria-label="Seleção Múltipla" multiple="multiple" ng-model="vars.multiselect${RANDOM}" crn-datasource="" class="form-control" id="multiselect-${RANDOM}" name="multiselect-${RANDOM}"></select></div>
1
+ <div class="item item-input item-select"><span class="input-label">Label</span> <select aria-label="Seleção Múltipla" multiple="multiple" ng-model="vars.multiselect${RANDOM}" crn-datasource="" class="form-control" id="multiselect-${RANDOM}" name="multiselect-${RANDOM}"></select></div>
@@ -1 +1 @@
1
- <div class="crn-slider display-ion-slider" id="crn-slider-${COMPONENTID}"><ion-slide-box class="" auto-play="false" slide-interval="2000" does-continue="false"><ion-slide xattr-theme="positive-bg" id="crn-slider-item-${RANDOM}-1" data-component="crn-slider-item" class="positive-bg active crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">SLIDE 1</h2></ion-slide><ion-slide xattr-theme="royal-bg" id="crn-slider-item-${RANDOM}-2" data-component="crn-slider-item" class="royal-bg crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">SLIDE 2</h2></ion-slide><ion-slide xattr-theme="balanced-bg" id="crn-slider-item-${RANDOM}-3" data-component="crn-slider-item" class="balanced-bg crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">SLIDE 3</h2></ion-slide></ion-slide-box></div>
1
+ <div class="crn-slider display-ion-slider" id="crn-slider-${COMPONENTID}"><ion-slide-box class="" auto-play="false" slide-interval="2000" does-continue="false"><ion-slide xattr-theme="positive-bg" id="crn-slider-item-${RANDOM}-1" data-component="crn-slider-item" class="positive-bg active crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover;" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">SLIDE 1</h2></ion-slide><ion-slide xattr-theme="royal-bg" id="crn-slider-item-${RANDOM}-2" data-component="crn-slider-item" class="royal-bg crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover;" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">SLIDE 2</h2></ion-slide><ion-slide xattr-theme="balanced-bg" id="crn-slider-item-${RANDOM}-3" data-component="crn-slider-item" class="balanced-bg crn-slider-item" data-container="true" data-replace="true"><img alt="Placehold" src="node_modules/cronapp-framework-mobile-js/img/placehold-300x200.png" class="component-holder" style="object-fit: cover;" xattr-position="" width="100%" height="100%" object-fit="object-fit: cover;" data-component="crn-image" id="crn-image-${RANDOM}"><h2 class="text-center top-50" data-component="crn-label" data-container="true" data-replace="true" horizontal-text-position="text-center" vertical-text-position="top-50">SLIDE 3</h2></ion-slide></ion-slide-box></div>