1"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var ToggleButton=function(){function ToggleButton(targetId){var _this=this;var callback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;_classCallCheck(this,ToggleButton);this._target=document.getElementById(targetId);this._callback=callback;this._message="\u901A\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u901A\u4FE1\u72B6\u614B\u3092\u304A\u78BA\u304B\u3081\u306E\u4E0A\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002";if(this._target!==null){if(!iOSVersionCheck("13")&&!androidVersionCheck("6")){this._target.addEventListener("pointerdown",function(){_this._update()})}else{this._target.addEventListener("click",function(e){e.preventDefault();_this._update()})}}}return _createClass(ToggleButton,[{key:"_update",value:function _update(){var inputTarget=this._target.querySelector(".toggle_input");var value=inputTarget.dataset.value;var url=value==="1"?this._target.dataset.inactiveUrl:this._target.dataset.activeUrl;var isValid=this._validate(value,inputTarget,url);if(!isValid){this._message="\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u4E0D\u6B63\u3067\u3059";this._error();return}$.ajax({type:"GET",url:url}).done(function(json){if(json.success=="true"){var newValue=value==="1"?"":"1";inputTarget.dataset.value=newValue;var balloonMessage=value==="1"?"OFF\u306B\u3057\u307E\u3057\u305F":"ON\u306B\u3057\u307E\u3057\u305F";if(typeof this._callback==="function"){this._callback()}new BookLiveWhiteBalloon($(this._target),balloonMessage,1500)}else{if(json.hasOwnProperty("error_message")){this._message=json.error_message}this._error()}}.bind(this)).fail(function(){this._error()}.bind(this))}},{key:"_validate",value:function _validate(value,inputTarget,url){if(value===undefined){return false}if(inputTarget===null){return false}if(url===""||url===undefined){return false}return true}},{key:"_error",value:function _error(){new BookLiveWhiteBalloon($(this._target),this._message,1500)}}])}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.