mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
8 lines
72 KiB
JavaScript
8 lines
72 KiB
JavaScript
|
|
// pouchdb-find plugin 7.3.0
|
||
|
|
// Based on Mango: https://github.com/cloudant/mango
|
||
|
|
//
|
||
|
|
// (c) 2012-2022 Dale Harvey and the PouchDB team
|
||
|
|
// PouchDB may be freely distributed under the Apache license, version 2.0.
|
||
|
|
// For all details and documentation:
|
||
|
|
// http://pouchdb.com
|
||
|
|
!function e(t,n,r){function i(u,s){if(!n[u]){if(!t[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(o)return o(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[u]={exports:{}};t[u][0].call(c.exports,(function(e){return i(t[u][1][e]||e)}),c,c.exports,e,t,n,r)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(e,t,n){"use strict";t.exports=function(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,[])}}},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function u(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._maxListeners=void 0;var s,a=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),s=0===f.x}catch(e){s=!1}function c(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function l(e,t,n){if(t)e.call(n);else for(var r=e.length,i=w(e,r),o=0;o<r;++o)i[o].call(n)}function d(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=w(e,i),u=0;u<i;++u)o[u].call(n,r)}function h(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,u=w(e,o),s=0;s<o;++s)u[s].call(n,r,i)}function p(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var u=e.length,s=w(e,u),a=0;a<u;++a)s[a].call(n,r,i,o)}function y(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=w(e,i),u=0;u<i;++u)o[u].apply(n,r)}function v(e,t,n,i){var o,u,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((u=e._events)?(u.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),u=e._events),s=u[t]):(u=e._events=r(null),e._eventsCount=0),s){if("function"==typeof s?s=u[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(o=c(e))&&o>0&&s.length>o){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",a.name,a.message)}}else s=u[t]=n,++e._eventsCount;return e}function g(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=o.call(g,r);return i.listener=n,r.wrapFn=i,i}function b(e,t,n){var r=e._events;if(!r)return[];var i=r[t];return i?"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):w(i,i.length):[]}function _(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function w(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}s?Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');a=e}}):u.defaultMaxListeners=a,u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this
|