{"version":3,"file":"ajf-core-audio.mjs","sources":["../../../projects/core/audio/src/audio.ts","../../../projects/core/audio/src/public_api.ts","../../../projects/core/audio/index.ts","../../../projects/core/audio/ajf-core-audio.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfFile} from '@ajf/core/file-input';\nimport {ChangeDetectorRef, Directive, EventEmitter, Output} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\n@Directive()\nexport abstract class AjfAudio implements ControlValueAccessor {\n  @Output() valueChange = new EventEmitter<AjfFile | null>();\n\n  private _value: AjfFile | null = null;\n  get value(): AjfFile | null {\n    return this._value;\n  }\n  set value(val: AjfFile | null) {\n    if (this._value !== val) {\n      this._value = val;\n      this._cdr.markForCheck();\n      this._onChangeCallback(val);\n      this.valueChange.emit(val);\n    }\n  }\n\n  private _onChangeCallback = (_: any) => {};\n  private _onTouchedCallback = () => {};\n\n  constructor(protected _cdr: ChangeDetectorRef) {}\n\n  writeValue(value: AjfFile | null): void {\n    this._value = value;\n    this._cdr.markForCheck();\n  }\n\n  registerOnChange(fn: any): void {\n    this._onChangeCallback = fn;\n  }\n\n  registerOnTouched(fn: any): void {\n    this._onTouchedCallback = fn;\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './audio';\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './src/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MA2BsB,QAAQ,CAAA;AAI5B,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;;IAEpB,IAAI,KAAK,CAAC,GAAmB,EAAA;AAC3B,QAAA,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE;AACvB,YAAA,IAAI,CAAC,MAAM,GAAG,GAAG;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AACxB,YAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;AAC3B,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAO9B,IAAA,WAA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