cordova.define("cordova/plugin/broadcast",function(i,t,a){var u=i("cordova/plugin/webos/service"),s=i("cordova/utils"),j=i("cordova/argscheck"),n=function(l){this.isATSC=false;this.tokenChannelChange=0;this.tokenSignalState=0;this.broadcastDivId=null;this.broadcastElement=null;this.currentInput=null;this.currentSource=null;this.isLastInput=true;this.isLastChannel=true;var h=this;u.Request("luna://com.webos.service.tv.systemproperty",{method:"getSystemInfo",parameters:{keys:["atsc"]},onSuccess:function(v){h.isATSC=v.atsc},onFailure:function(v){}})};n.prototype.onchannelchange=function(h){},n.prototype.onsignalstatuschange=function(h){},n.prototype.initialize=function(h,x,l){j.checkArgs("fFo","broadcastCordova.initialize",arguments);var v=s.clone(l);this.broadcastDivId=document.getElementById(v.divId);v.broadcastPlugin=this;if(1!=v.isLastInput&&v.src){this.isLastInput=false;if(-1!=v.src.indexOf("tv://")){if(1==v.isLastChannel){this.isLastChannel=true;v.type="service/webos-broadcast"}else{this.isLastChannel=false;v.type="service/webos-broadcast-standalone"}this.currentInput="tv";this.currentSource=v.src.substr(5)}else{v.type="service/webos-external";var w=v.src.split(":");this.currentInput=w[1].substr(2).toLowerCase();this.currentSource=w[2]}c(v);h&&h()}else{this.isLastInput=true;d(h,x,v)}},n.prototype.channelUp=function(h,v){j.checkArgs("fF","broadcastCordova.channelUp",arguments);var l={broadcastId:this.broadcastElement.mediaId};u.Request("luna://com.webos.service.tv.broadcast",{method:"changeChannelUp",parameters:l,onSuccess:function(w){h&&h()},onFailure:function(w){delete w.returnValue;v&&v(w)}})},n.prototype.channelDown=function(h,v){j.checkArgs("fF","broadcastCordova.channelDown",arguments);var l={broadcastId:this.broadcastElement.mediaId};u.Request("luna://com.webos.service.tv.broadcast",{method:"changeChannelDown",parameters:l,onSuccess:function(w){h&&h()},onFailure:function(w){delete w.returnValue;v&&v(w)}})},n.prototype.setChannel=function(h,w,l){j.checkArgs("fFo","broadcastCordova.setChannel",arguments);var v={broadcastId:this.broadcastElement.mediaId,channelId:l.id};u.Request("luna://com.webos.service.tv.broadcast",{method:"changeChannel",parameters:v,onSuccess:function(x){h&&h()},onFailure:function(x){delete x.returnValue;w&&w(x)}})},n.prototype.getCurrentChannel=function(h,v){j.checkArgs("fF","broadcastCordova.getCurrentChannel",arguments);var l={broadcastId:this.broadcastElement.mediaId,subscribe:false};u.Request("luna://com.webos.service.tv.broadcast",{method:"getCurrentChannel",parameters:l,onSuccess:function(x){var w={};w=e(x.channel,"api");h&&h(w)},onFailure:function(w){delete w.returnValue;v&&v(w)}})},n.prototype.getSignalStatus=function(h,v){j.checkArgs("fF","broadcastCordova.getSignalStatus",arguments);var l;if("tv"==this.currentInput){l={broadcastId:this.broadcastElement.mediaId,subscribe:false};u.Request("luna://com.webos.service.tv.broadcast",{method:"getChannelState",parameters:l,onSuccess:function(x){var w=x.channelState;w.screensaverType=w.channelScreensaverType;delete w.channelScreensaverType;h&&h(w)},onFailure:function(w){delete w.returnValue;v&&v(w)}})}else{l={externalInputId:this.broadcastElement.mediaId,subscribe:false};u.Request("luna://com.webos.service.tv.externaldevice/input/",{method:"getSignalState",parameters:l,onSuccess:function(w){h&&h(w.signalState)},onFailure:function(w){delete w.returnValue;v&&v(w)}})}},n.prototype.getCurrentProgram=function(h,v,l){j.checkArgs("fFo","broadcastCordova.getCurrentProgram",arguments),u.Request("luna://com.palm.systemservice/time",{method:"getEffectiveBroadcastTime",parameters:{},onSuccess:function(x){var w={};w.id=l.id;w.startTime=x.localtime;w.endTime=x.localtime;w.request="nowInfo";b(h,v,w)},onFailure:function(w){delete w.returnValue,v&&v(w)}})},n.prototype.getNextProgram=function(h,v,l){j.checkArgs("fFo","broadcastCordova.getNextProgram",arguments),u.Request("luna://com.palm.systemservice/time",{method:"getEffectiveBroadcastTime",parameters:{},onSuccess:function(x){var w={};w.id=l.id,w.startTime=x.localtime,w.endTime=x.localtime,w.request="nextInfo",b(h,v,w)},onFailure:function(w){delete w.returnValue,v&&v(w)}})},n.prototype.getProgramCount=function(h,w,l){j.checkArgs("fFo","broadcastCordova.getProgramCount",arguments);var v=s.clone(l);v.request="count";b(h,w,v)},n.prototype.getProgramList=function(h,w,l){j.checkArgs("fFo","broadcastCordova.getProgramList",arguments);var v=s.clone(l);v.request="list";b(h,w,v)},n.prototype.getChannelCount=function(h,w,l){j.checkArgs("fFo","broadcastCordova.getChannelCount",arguments);var v={from:"com.webos.service.tv.channel.dblist:1",select:[""],where:[{prop:"channelType",op:"=",val:l.type}],filter:[{prop:"Invisible",op:"=",val:!1}]};u.Request("luna://com.palm.db/",{method:"search",parameters:{query:v},onSuccess:function(y){var x={};x.count=y.results.length;h&&h(x)},onFailure:function(x){delete x.returnValue,w&&w(x)}})},n.prototype.getChannelList=function(h,x,v){j.checkArgs("fFo","broadcastCordova.getChannelList",arguments);var l=v.startIndex-1;if(0>l){l=0}var y=l+v.count,w={from:"com.webos.service.tv.channel.dblist:1",select:["channelId","channelName","channelMode","channelNumber","channelType","skipped","locked","descrambled","scrambled"],where:[{prop:"channelType",op:"=",val:v.type}],filter:[{prop:"Invisible",op:"=",val:!1}],limit:y};u.Request("luna://com.palm.db/",{method:"search",parameters:{query:w},onSuccess:function(C){var z={};z.channel=[];var A=C.results.length-l;if(A>0){for(var B=0;A>B;B++){z.channel[B]=e(C.results[B+l],"db8")}}h&&h(z)},onFailure:function(z){delete z.returnValue;x&&x(z)}})},n.prototype.getChannelListByName=function(h,w,v){j.checkArgs("fFo","broadcastCordova.getChannelListByName",arguments);var l={from:"com.webos.service.tv.channel.dblist:1",select:["channelId","channelName","channelMode","channelNumber","channelType","skipped","locked","descrambled","scrambled"],where:[{prop:"channelName",op:"%",val:v.name}],filter:[{prop:"Invisible",op:"=",val:false}]};v.type&&l.filter.push({prop:"channelType",op:"=",val:v.type}),u.Request("luna://com.palm.db/",{method:"search",parameters:{query:l},onSuccess:function(z){var x={};if(x.channel=[],z.results.length>0){for(var y=0;y<z.results.length;y++){x.channel[y]=e(z.results[y],"db8")}}h&&h(x)},onFailure:function(x){delete x.returnValue;w&&w(x)}})},n.prototype.setInput=function(l){j.checkArgs("o","broadcastCordova.setInput",arguments);var w=false;if(-1!=l.src.indexOf("tv://")){if(1==this.isLastChannel){l.type="service/webos-broadcast"}else{l.type="service/webos-broadcast-standalone"}this.currentInput="tv";this.currentSource=l.src.substr(5)}else{l.type="service/webos-external";var v=l.src.split(":");this.currentInput=v[1].substr(2).toLowerCase();this.currentSource=v[2]}for(var h=0;h<this.broadcastElement.childNodes.length;h++){if("SOURCE"==this.broadcastElement.childNodes[h].nodeName){this.broadcastElement.childNodes[h].src=l.src;this.broadcastElement.childNodes[h].type=l.type;this.broadcastElement.load();w=true}}return w},n.prototype.addEventListener=function(h,v,l){if("channelchange"==h){this.tokenChannelChange=u.Request("luna://com.webos.service.tv.broadcast",{method:"getCurrentChannel",parameters:{broadcastId:this.broadcastElement.mediaId,subscribe:false},onSuccess:function(x){var w=x.channel;v&&v(w)},onFailure:function(w){}})}else{if("signalstatus"==h){if("tv"==this.currentInput){this.tokenSignalState=u.Request("luna://com.webos.service.tv.broadcast",{method:"getChannelState",parameters:{broadcastId:this.broadcastElement.mediaId,subscribe:false},onSuccess:function(x){var w=x.channelState;w.screensaverType=w.channelScreensaverType;delete w.channelScreensaverType;v&&v(w)},onFailure:function(w){}})}else{this.tokenSignalState=u.Request("luna://com.webos.service.tv.externaldevice/input/",{method:"getSignalState",parameters:{externalInputId:this.broadcastElement.mediaId,subscribe:true},onSuccess:function(x){var w=x.signalState;v&&v(w)},onFailure:function(w){}})}}}};var k=function(h,l){r(h);if("tv"==h.currentInput){p(h);f(h)}else{o(h);l()}},c=function(h){var v=document.createElement("VIDEO");v.setAttribute("id",h.videoId);v.setAttribute("width","100%");v.setAttribute("height","100%");v.setAttribute("autoplay","");v.addEventListener("loadedmetadata",function(){k(h.broadcastPlugin,h.callback)},false);var l=document.createElement("SOURCE");l.setAttribute("src",h.src);l.setAttribute("type",h.type);v.appendChild(l);h.broadcastPlugin.broadcastDivId.appendChild(v);h.broadcastPlugin.broadcastElement=v},d=function(h,l,v){u.Request("luna://com.webos.service.eim",{method:"getCurrentInput",parameters:{},onSuccess:function(x){if("ATV"==x.mainInputSourceId||"DTV"==x.mainInputSourceId){v.broadcastPlugin.currentInput="tv";q(h,l,v)}else{var w=x.mainInputSourceId.split("_");v.broadcastPlugin.currentInput=w[0].toLowerCase();v.broadcastPlugin.currentSource=w[1];v.src="ext://"+v.broadcastPlugin.currentInput+":"+v.broadcastPlugin.currentSource;v.type="service/webos-external";c(v);h&&h()}},onFailure:function(w){delete w.returnValue;l&&l(w)}})},q=function(l,h,v){},p=function(h){h.tokenChannelChange=u.Request("luna://com.webos.service.tv.broadcast",{method:"getCurrentChannel",parameters:{broadcastId:h.broadcastElement.mediaId,subscribe:true},onSuccess:function(l){h.currentSource=l.channel.channelId;var v={};v=e(l.channel,"api"),h.onchannelchange(v)},onFailure:function(l){}})},f=function(h){h.tokenSignalState=u.Request("luna://com.webos.service.tv.broadcast",{method:"getChannelState",parameters:{broadcastId:h.broadcastElement.mediaId,subscribe:true},onSuccess:function(v){var l=v.channelState;l.screensaverType=l.channelScreensaverType;delete l.channelScreensaverType;h.onsignalstatuschange(l)},onFailure:function(l){}})},o=function(h){h.tokenSignalState=u.Request("luna://com.webos.service.tv.externaldevice/input/",{method:"getSignalState",parameters:{externalInputId:h.broadcastElement.mediaId,subscribe:true},onSuccess:function(l){var v=l.signalState;h.onsignalstatuschange(v)},onFailure:function(l){}})},r=function(h){if(h.tokenChannelChange){h.tokenChannelChange.cancel()}if(h.tokenSignalState){h.tokenSignalState.cancel()}},m=function(h,y,v){var w=g(v.startTime),l=g(v.endTime),x={};if("count"==v.request){x={from:"com.webos.service.tv.programSCH:4",select:[""],where:[{prop:"signalChannelId",op:"=",val:v.signalChannelId}],filter:[{prop:"localStartTime",op:"<=",val:l},{prop:"localEndTime",op:">=",val:w}]}}else{if("nextInfo"==v.request){x={from:"com.webos.service.tv.programSCH:4",select:["programId","eventId","localStartTime","localEndTime","duration","programName","description"],where:[{prop:"channelId",op:"=",val:v.signalChannelId}],filter:[{prop:"localStartTime",op:">",val:w}],orderBy:"localStartTime",limit:1}}else{if("list"==v.request||"nowInfo"==v.request){x={from:"com.webos.service.tv.programSCH:4",select:["programId","eventId","localStartTime","localEndTime","duration","programName","description"],where:[{prop:"channelId",op:"=",val:v.signalChannelId}],filter:[{prop:"localStartTime",op:"<=",val:l},{prop:"localEndTime",op:">=",val:w}]}}}}},b=function(h,l,v){var w={from:"com.webos.service.tv.channel.dblist:1",select:["signalChannelId"],where:[{prop:"channelId",op:"=",val:v.id}]};u.Request("luna://com.palm.db/",{method:"find",parameters:{query:w},onSuccess:function(x){v.signalChannelId=x.results[0].signalChannelId;m(h,l,v)},onFailure:function(x){delete x.returnValue;l&&l(x)}})},e=function(v,l){var h={};h.id=v.channelId;h.number=v.channelNumber;h.name=v.channelName;if("api"==l){h.mode=v.channelModeName;h.type=v.channelTypeName;h.isSkipped=v.isSkipped;h.isLocked=v.isLocked;h.isDescrambled=v.isDescrambled;h.isScrambled=v.isScrambled}else{h.mode=v.channelMode;h.type=v.channelType;h.isSkipped=v.skipped;h.isLocked=v.locked;h.isDescrambled=v.descrambled;h.isScrambled=v.scrambled}return h},g=function(h){var l=h.year+",";l+=(h.month<10?"0":"")+h.month+",";l+=(h.day<10?"0":"")+h.day+",";l+=(h.hour<10?"0":"")+h.hour+",";l+=(h.minute<10?"0":"")+h.minute+",";l+=(h.second<10?"0":"")+h.second;return l};a.exports=n});var Broadcast=cordova.require("cordova/plugin/broadcast");cordova.define("cordova/plugin/inputSource",function(c,e,b){function d(p){}var i;if(window.PalmSystem){d("Window.PalmSystem Available");i=c("cordova/plugin/webos/service")}else{i={Request:function(p,q){d(p+" invoked. But I am a dummy because PalmSystem is not available");if(typeof q.onFailure==="function"){q.onFailure({returnValue:false,errorText:"PalmSystem Not Available. Cordova is not installed?"})}}}}var k=function(){};var n=false;var h="";var g=null;function m(q,r,p){if(q.errorCode===undefined||q.errorCode===null){q.errorCode=r}if(q.errorText===undefined||q.errorText===null){q.errorText=p}}k.prototype.initialize=function(q,r,t){d("initialize: "+JSON.stringify(t));if(t.divId===undefined||typeof t.divId!=="string"||t.divId===null||t.divId.length<=0||t.videoId===undefined||typeof t.videoId!=="string"||t.videoId===null||t.videoId.length<=0||t.callback===undefined||typeof t.callback!=="function"||t.src===undefined||typeof t.src!=="string"||t.src===null||t.src.length<=0){if(typeof r==="function"){var p={};m(p,"II","InputSource.initialize returns failure. invalid parameters.");r(p)}return}if(document.getElementById(t.divId)===null||document.getElementById(t.divId)===undefined){if(typeof r==="function"){r({errorCode:"II",errorText:"options.divId:["+t.divId+"] element not exists or cannot approach"})}return}else{if(document.getElementById(t.videoId)){if(typeof r==="function"){r({errorCode:"II",errorText:"options.videoId:["+t.videoId+"] element already exists."})}return}}l(t.src,function u(v){var w={};w.divId=t.divId;w.videoId=t.videoId;w.callback=t.callback;w.src=v;g=new Broadcast();g.initialize(q,r,w);n=true;h=t.videoId},function s(w){d("initialize: failure "+JSON.stringify(w));if(typeof r==="function"){var v={};m(v,"II","InputSource.initialize returns failure. invalid parameters.");r(v)}});d("initialize: Done")};k.prototype.changeInputSource=function(q,r,t){if(t.src===undefined||typeof t.src!=="string"||t.src===null||t.src.length<=0){if(typeof r==="function"){var p={};m(p,"ICIS","InputSource.changeInputSource returns failure. invalid argument.");r(p)}return}if((n===false)||(document.getElementById(h)===null||document.getElementById(h)===undefined)){if(typeof r==="function"){var p={};m(p,"ICIS","InputSource.changeInputSource returns failure. Call initialize() first.");r(p)}return}d("changeInputSource: "+JSON.stringify(t));l(t.src,function u(w){var x={};x.divId=t.divId;x.videoId=t.videoId;x.callback=t.callback;x.src=w;if(g.setInput(x)){d("changeInputSource: On Success");if(typeof q==="function"){q()}}else{if(typeof r==="function"){var v={};d("changeInputSource: On Failure");m(v,"ICIS","InputSource.changeInputSource returns failure.");r(v)}}},function s(w){d("changeInputSource: failure "+JSON.stringify(w));if(typeof r==="function"){var v={};m(v,"ICIS","InputSource.changeInputSource returns failure. invalid argument. ");r(v)}});d("changeInputSource: Done")};k.prototype.getInputSourceStatus=function(p,q){d("getInputSourceStatus: ");i.Request("luna://com.webos.service.eim/",{method:"getAllInputStatus",onSuccess:function(r){d("getInputSourceStatus: On Success");if(r.returnValue===true){o(function(A){var x=A.webOSVer;d("convertInputSource: "+JSON.stringify(r.totalCount));d("convertInputSource: "+JSON.stringify(r.devices));d("version: "+x);var u={};var s=new Array(r.totalCount);var z=new Array(r.totalCount);for(var v=0;v<s.length;v++){s[v]={};s[v].inputPort=f(r.devices[v].label);var w=null;switch(x){case 1:w=r.devices[v].id.split("_");s[v].inputPort="ext://"+w[0].toLowerCase()+":"+w[1];if(s[v].inputPort==="ext://hdmi:3"){s[v].inputPort="ext://dp:1"}else{if(s[v].inputPort==="ext://hdmi:4"){s[v].inputPort="ext://dvi:1"}}break;case 2:w=r.devices[v].id.split("_");s[v].inputPort="ext://"+w[0].toLowerCase()+":"+w[1];if(A.chipset==="H15"){if(s[v].inputPort==="ext://dvi:4"){s[v].inputPort="ext://hdmi:3"}if(s[v].inputPort==="ext://ops:1"){s[v].inputPort="ext://hdmi:3"}if(s[v].inputPort==="ext://hdmi:4"){s[v].inputPort="ext://dp:1"}}else{if(s[v].inputPort==="ext://hdmi:3"){s[v].inputPort="ext://dp:1"}else{if(s[v].inputPort==="ext://hdmi:2"){s[v].inputPort="ext://dvi:1"}else{if(s[v].inputPort==="ext://hdmi:4"){s[v].inputPort="ext://ops:1"}}}}break;case 3:default:var y=r.devices[v].deviceName.toLowerCase();var t=1;if(isNaN(y.substring(y.length-1,y.length))===false){y=y.substring(0,y.length-1);t=r.devices[v].id.split("_")[1]}if(y.toLowerCase()==="displayport"){y="dp"}else{if(y.toLowerCase()==="ops/dvi"){y="ops"}}s[v].inputPort="ext://"+y.toLowerCase()+":"+t;break}z[v]={};z[v].inputPort=s[v].inputPort;z[v].id=r.devices[v].id}u.inputSourceList=s;i.Request("luna://com.webos.service.eim/",{method:"getCurrentInput",parameters:{},onSuccess:function(B){d("InputSource.getInputSourceStatus: On Success 3");if(B.returnValue===true){if(typeof p==="function"){u.currentInputSource={};for(var C=0;C<z.length;C++){if(z[C].id===B.mainInputSourceId){u.currentInputSource=z[C].inputPort;break}}u.currentSignalState="unknown";if(g!==null){d("InputSource.getInputSourceStatus : broadcast is not null");g.getSignalStatus(function D(F){u.currentSignalState=F.videoSignalState;d("InputSource.getInputSourceStatus: On Success 2");if(typeof p==="function"){d("getInputSourceStatus: On Success"+JSON.stringify(u));p(u);return}},function E(){d("InputSource.getInputSourceStatus : signal state is fail.");if(typeof p==="function"){d("getInputSourceStatus: On Success"+JSON.stringify(u));p(u);return}})}else{d("InputSource.getInputSourceStatus : it does not initialize.");if(typeof p==="function"){d("getInputSourceStatus: On Success"+JSON.stringify(u));p(u);return}}}}},onFailure:function(B){d("InputSource.getInputSourceStatus: On Failure 2");delete B.returnValue;if(typeof q==="function"){m(B,"IGISS","InputSource.getInputSourceStatus returns failure.");q(B);return}}})})}},onFailure:function(r){d("getInputSourceStatus: On Failure");delete r.returnValue;if(typeof q==="function"){m(r,"IGISS","InputSource.changeInputSource returns failure on gathering input list.");q(r)}}});d("InputSource.getInputSourceStatus Done")};function f(r){var p=1;var q=r.length;if(!isNaN(parseInt(r.charAt(q-1),10))){p=r.charAt(q-1);q--}r=r.substring(0,q)+":"+p;r="ext://"+r.toLowerCase();return r}var j=null;var a={};function o(p){if(j===null){i.Request("luna://com.webos.service.tv.systemproperty",{method:"getSystemInfo",parameters:{keys:["sdkVersion","boardType"]},onSuccess:function(q){d("getPlatformInfo: onSuccess");d("version : "+q.sdkVersion);var r=q.sdkVersion.split(".");if(r.length>=1&&r[0]==="1"){a={webOSVer:1,chipset:q.boardType.split("_")[0]}}else{if(r.length>=1&&r[0]==="2"){a={webOSVer:2,chipset:q.boardType.split("_")[0]}}else{if(r.length>=1&&r[0]==="3"){a={webOSVer:3,chipset:q.boardType.split("_")[0]}}else{a={webOSVer:0,chipset:""}}}}j=a.webOSVer;p(a)},onFailure:function(q){d("getPlatformInfo: onFailure");a={webOSVer:0,chipset:""};p(a)}})}else{p(a)}}function l(r,p,q){var s=r.toUpperCase().substring(6).split(":")[0];if(s==="DP"){s="DISPLAYPORT"}i.Request("luna://com.webos.service.eim/",{method:"getAllInputStatus",onSuccess:function(t){d("convertInputSource: On Success "+r);if(t.returnValue===true){if(typeof p==="function"){var u=new Array(t.totalCount);o(function(D){var B=D.webOSVer;d("convertInputSource: "+JSON.stringify(t.devices));d("version: "+B);if(B>=3){for(var y=0;y<t.devices.length;y++){var z=r.substring(6).split(":");var C=t.devices[y].deviceName;var w="1";if(isNaN(C.substring(C.length-1,C.length))===false){w=C.substring(C.length-1,C.length);C=C.substring(0,C.length-1)}if(C.toLowerCase()==="displayport"){C="dp"}if(C.toLowerCase().indexOf(z[0].toLowerCase())>=0&&w===z[1]){var A=t.devices[y].id.split("_");convertedInput="ext://"+A[0].toLowerCase()+":"+A[1];p(convertedInput);return}}d("convertInputSource: On Failure "+r);var v={};m(v,"IGISS","convertInputSource. It does not support inputsource type.");q(v)}else{switch(B){case 1:if(r==="ext://dp:1"){r="ext://hdmi:3"}else{if(r==="ext://dvi:1"){r="ext://hdmi:4"}}break;case 2:if(a.chipset==="H15"){if(r==="ext://dvi:1"){r="ext://hdmi:3"}else{if(r==="ext://ops:1"){r="ext://hdmi:3"}else{if(r==="ext://dp:1"){r="ext://hdmi:3"}else{if(r==="ext://hdmi:4"){r="ext://dp:1"}}}}}else{if(r==="ext://dp:1"){r="ext://hdmi:3"}else{if(r==="ext://dvi:1"){r="ext://hdmi:2"}else{if(r==="ext://ops:1"){r="ext://hdmi:4"}}}}break;case 3:if(r==="ext://dp:1"){r="ext://hdmi:3"}else{if(r==="ext://dvi:1"){r="ext://hdmi:2"}else{if(r==="ext://ops:1"){r="ext://hdmi:4"}}}break;default:break}for(var y=0;y<u.length;y++){u[y]={};if(a.chipset==="H15"){u[y].inputPort=f(t.devices[y].deviceName)}else{u[y].inputPort=f(t.devices[y].label)}var A=t.devices[y].id.split("_");u[y].id="ext://"+A[0].toLowerCase()+":"+A[1];if(r===u[y].id){d("convertInputSource: On Success ok "+r);p(r);return}}for(var x=0;x<u.length;x++){if(r===u[x].inputPort){r=u[x].id;d("convertInputSource: On Success converted "+r);p(r);return}}d("convertInputSource: On Failure "+r);var v={};m(v,"IGISS","convertInputSource. It does not support inputsource type.");q(v)}})}}},onFailure:function(t){d("convertInputSource: On Failure");delete t.returnValue;if(typeof q==="function"){m(t,"IGISS","convertInputSource returns failure on gathering input list.");q(t)}}})}b.exports=k});InputSource=cordova.require("cordova/plugin/inputSource");