mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
35 lines
64 KiB
JavaScript
35 lines
64 KiB
JavaScript
|
if (self.CavalryLogger) { CavalryLogger.start_js(["uHwK+"]); }
|
||
|
|
||
|
__d("KaiOSAppMigrationEvent",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({COMPLETED_ROUNDTRIP:"completed_roundtrip",HIT_JIO_HOME_GEN_DELEGATE:"hit_jio_home_gen_delegate",HIT_JIO_STARTUP_GEN_DELEGATE:"hit_jio_startup_gen_delegate",DELEGATE_TO_MIGRATION_RESPONSE:"delegate_to_migration_response",DELEGATE_TO_JIO_HOME:"delegate_to_jio_home",RESPOND_WITH_MIGRATION:"respond_with_migration",DELEGATE_TO_MINDEX:"delegate_to_mindex",REDIRECT_TO_MINDEX:"redirect_to_mindex",COMPLETED_BROWSER_IFRAME_INIT:"completed_browser_iframe_init",MIGRATION_STATUS_CHECKED:"migration_status_checked"})}),null);
|
||
|
__d("KaiOSSendMessageUtil",["Event"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1=!1,this.$2=null,this.$3()}var c=a.prototype;c.$3=function(){var a=this;this.$2=b("Event").listen(window,"beforeunload",function(){a.$1=!0,a.$2&&(a.$2.remove(),a.$2=null)})};c.postMessage=function(a,b,c,d){if(a&&b&&!this.$1){var e=new Map();e.set(g.Action,b);c&&e.set(g.ActionPayload,c);d!=null&&e.set(g.CallbackID,d);a.postMessage(e,"*")}};return a}();var g={Type:Object.freeze({HANDLE_BACK:"handle_back",MESSAGE_RECEIVED:"received",OPEN_URL:"open_url",REGISTER_PUSH:"register_push",SCREEN_ORIENTATION_LOCK:"screen_orientation_lock",UNREGISTER_PUSH:"unregister_push",CHECK_FOR_PUSH_UPDATE:"check_for_push_update",PUSH_UPDATE_COMPLETED:"push_update_completed",SET_VOLUME:"set_volume",FBT_STRINGS:"fbt_strings",CONFIG_RESPONSE:"config_response",FETCH_MSISDN:"fetch_msisdn",GET_CONTACTS:"get_contacts",TOGGLE_SPATIAL_NAV:"toggle_spatial_nav",LITE_MIGRATION_STATUS:"lite_migration_status"}),Action:"action",ActionPayload:"payload",CallbackID:"callback_id",_singletonImpl:new a(),postMessage:function(a,b,c,d){g._singletonImpl.postMessage(a,b,c,d)}};e.exports=g}),null);
|
||
|
__d("KaiOSConnectionHelper",["KaiOSSendMessageUtil"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="app://m.facebook.com";a=function(){__p&&__p();function a(){this.hostWindow=null,this.resolveOnConnect=null}var c=a.prototype;c.receiveMessage=function(a){if(!a||a.origin!==g||!a.source)return!1;if(a.data==="ping"){this.hostWindow||(this.hostWindow=a.source,b("KaiOSSendMessageUtil").postMessage(this.hostWindow,b("KaiOSSendMessageUtil").Type.MESSAGE_RECEIVED));a=this.resolveOnConnect;a&&(a(),this.resolveOnConnect=null)}return!0};return a}();c=new a();e.exports=c}),null);
|
||
|
__d("KaiOSControllerConfig",[],(function(a,b,c,d,e,f){"use strict";a={};e.exports=a}),null);
|
||
|
__d("KaiOSLoggedOutPushUriParamConstants",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({EXIT_ON_BACK_PARAM:"exit_on_back"})}),null);
|
||
|
__d("URLSearchParams",[],(function(a,b,c,d,e,f){__p&&__p();var g=/\+/g,h=/[!\'()*]/g,i=/%20/g;function j(a){return encodeURIComponent(a).replace(i,"+").replace(h,function(a){return"%"+a.charCodeAt(0).toString(16)})}function k(a){return decodeURIComponent(a).replace(g," ")}var l=typeof Symbol==="function"?Symbol.iterator:"@@iterator";a=function(){"use strict";__p&&__p();function a(a){a===void 0&&(a="");a=a;a[0]==="?"&&(a=a.substr(1));this.$1=a.length?a.split("&").map(function(a){a=a.split("=");var b=a[0];a=a[1];return[k(b),k(a)]}):[]}var b=a.prototype;b.append=function(a,b){this.$1.push([a,String(b)])};b["delete"]=function(a){for(var b=0;b<this.$1.length;b++)this.$1[b][0]===a&&(this.$1.splice(b,1),b--)};b.entries=function(){return this.$1[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]()};b.get=function(a){for(var b=0,c=this.$1.length;b<c;b++)if(this.$1[b][0]===a)return this.$1[b][1];return null};b.getAll=function(a){var b=[];for(var c=0,d=this.$1.length;c<d;c++)this.$1[c][0]===a&&b.push(this.$1[c][1]);return b};b.has=function(a){for(var b=0,c=this.$1.length;b<c;b++)if(this.$1[b][0]===a)return!0;return!1};b.keys=function(){var a=this.$1.map(function(a){var b=a[0];a[1];return b});return a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]()};b.set=function(a,b){var c=!1;for(var d=0;d<this.$1.length;d++)this.$1[d][0]===a&&(c?(this.$1.splice(d,1),d--):(this.$1[d][1]=String(b),c=!0));c||this.$1.push([a,String(b)])};b.toString=function(){return this.$1.map(function(a){var b=a[0];a=a[1];return j(b)+"="+j(a)}).join("&")};b.values=function(){var a=this.$1.map(function(a){a[0];a=a[1];return a});return a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]()};b[l]=function(){return this.entries()};return a}();e.exports=a}),null);
|
||
|
__d("KaiOSControllerUtils",["KaiOSConnectionHelper","KaiOSLoggedOutPushUriParamConstants","KaiOSSendMessageUtil","URLSearchParams"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(){__p&&__p();function a(){this.callbacks=new Map(),this.nextCallbackID=1}var b=a.prototype;b.setCallback=function(a){var b=(this.nextCallbackID++).toString();this.callbacks.set(b,a);return b};b.handleCallback=function(a,b){if(a){var c=this.callbacks.get(a);c&&(this.callbacks["delete"](a),c(b));return!0}return!1};return a}();function a(a){return!1}function c(){var a=location.pathname;a=a==="/"||a==="/kaiosapp/jio/home/"||a.startsWith("/home.php")||a.startsWith("/index.php")||a.startsWith("/confirmemail.php");var c=new(b("URLSearchParams"))(window.location.search);c=c.has("soft");return a&&!c}function d(){var a=new(b("URLSearchParams"))(window.location.search);return a.has(b("KaiOSLoggedOutPushUriParamConstants").EXIT_ON_BACK_PARAM)}function f(a){var c=new Map();c.set("url",a);b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.OPEN_URL,c)}a={createCallbackHandler:function(){return new g()},sendBasicPost:function(a,b,c){var d=new XMLHttpRequest();d.open("POST",a);d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a=[];for(var e in b)a.push(encodeURIComponent(e)+"="+encodeURIComponent(b[e]));d.onload=function(){c&&c(d)};d.send(a.join("&"))},keyDownEventHandledByRegPage:a,isOnHomeOrConfPage:c,openUrl:f,shouldExitOnBackForLoggedOutPush:d};e.exports=a}),null);
|
||
|
__d("KaiOSFullscreenVideoHandler",["KaiOSSendMessageUtil","getActiveElement"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=Object.freeze({RIGHT:6,LEFT:4,UP:2,DOWN:8,MIDDLE:5}),h=Object.freeze({KEY:"type",DOWN:-1,UP:1});a=function(){__p&&__p();function a(a){this.hostWindow=a}var c=a.prototype;c.handleKeyDownEvent=function(a){__p&&__p();var b=this.getVideoIfFullScreen();if(!b)return!1;if(a.key==="SoftLeft"){document.exitFullscreen();return!0}else if(a.key==="SoftRight"){b.muted=!b.muted;return!0}return!1};c.handleClickEvent=function(a){a=this.getVideoIfFullScreen();if(!a)return!1;this.togglePause(a);return!0};c.handleMouseMoveEvent=function(a){return!1};c.getVideoIfFullScreen=function(){return document.fullscreenElement&&document.fullscreenElement.nodeName&&document.fullscreenElement.nodeName=="VIDEO"?b("getActiveElement")():null};c.seek=function(a,b){b?a.currentTime=Math.min(a.duration,a.currentTime+10):a.currentTime=Math.max(0,a.currentTime-10)};c.togglePause=function(a){a.paused?a.play():a.pause()};c.volume=function(a){if(!a||a!=h.UP&&a!=h.DOWN)return;var c=new Map();c.set(h.KEY,a.toString());b("KaiOSSendMessageUtil").postMessage(this.hostWindow,b("KaiOSSendMessageUtil").Type.SET_VOLUME,c)};c.control=function(a,b){__p&&__p();if(b)switch(b){case g.UP:this.volume(h.UP);break;case g.DOWN:this.volume(h.DOWN);break;case g.LEFT:this.seek(a,!1);break;case g.RIGHT:this.seek(a,!0);break;case g.MIDDLE:this.togglePause(a);break}};return a}();e.exports=a}),null);
|
||
|
__d("KaiOSSoftkeyTrayLogger",["BanzaiLogger","KaiOSLoggerEvent","KaiOSLoggerEventCategory"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={logSoftkeyTrayButtonClicked:function(a){__p&&__p();var c={event_category:b("KaiOSLoggerEventCategory").SOFTKEY_TRAY};switch(a){case"kaios_tray_back":c.event=b("KaiOSLoggerEvent").SOFTKEY_BACK_BUTTON_CLICKED;break;case"kaios_tray_menu":c.event=b("KaiOSLoggerEvent").SOFTKEY_MENU_BUTTON_CLICKED;break;case"kaios_tray_post":c.event=b("KaiOSLoggerEvent").SOFTKEY_POST_BUTTON_CLICKED;break;case"kaios_tray_menu_close":c.event=b("KaiOSLoggerEvent").SOFTKEY_MENU_CLOSE_BUTTON_CLICKED;break;default:c.event=b("KaiOSLoggerEvent").SOFTKEY_OTHER_BUTTON_CLICKED;c.miscellaneous={detail:a};break}b("BanzaiLogger").log("KaiOSEventsLoggerConfig",c)}};e.exports=a}),null);
|
||
|
__d("BuildMenuMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavTreeBuilder","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;function h(a,c){if(a.contextState===g.CONTEXT_STACK&&a.contextStack.length!==0){a=a.contextStack[a.contextStack.length-1].currentNode;a.getHTMLElement().blur();b("MutationUtils").unhighlightNode(a)}b("MutationUtils").maybeFocusNode(c);b("MutationUtils").highlightNode(c)}a={mutateState:function(a,c){__p&&__p();var d=b("SpatialNavTreeBuilder").buildSpatialNavTree(c.rootElement);if(d==null)return a;var e=null;c.config.focusMenuElementOnFirst!=null&&(e=b("SpatialNavTreeNodeUtils").findMenuNodeFromElement(c.config.focusMenuElementOnFirst,d));e==null&&(e=b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(d));if(e==null)return a;d=a.contextState;c.config.shouldFocusMenuOnSetup===!0&&(h(a,e),d=g.MENU_CONTEXT);return{contextStack:a.contextStack,menuContext:{currentNode:e,traverser:c.traverser,config:c.config,mutationObserver:null},contextState:d}}};e.exports=a}),null);
|
||
|
__d("ClearContextMutation",["MutationUtils","SpatialNavControllerTypes"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a,c){__p&&__p();if(c.contextStateToClear===g.MENU_CONTEXT&&a.menuContext!=null){var d=a.menuContext.currentNode;d.getHTMLElement().blur();b("MutationUtils").unhighlightNode(d);d=c.newContextState!=null?c.newContextState:a.contextStack.length===0?g.NO_CONTEXT:g.CONTEXT_STACK;return{contextStack:a.contextStack,menuContext:null,contextState:d}}if(c.contextStateToClear===g.CONTEXT_STACK&&a.contextStack.length!==0){d=a.contextStack;var e=d[d.length-1].currentNode;e.getHTMLElement().blur();b("MutationUtils").unhighlightNode(e);for(var e=d,d=Array.isArray(e),f=0,e=d?e:e[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var h;if(d){if(f>=e.length)break;h=e[f++]}else{f=e.next();if(f.done)break;h=f.value}h=h;h.mutationObserver!=null&&h.mutationObserver.release()}h=c.newContextState!=null?c.newContextState:a.menuContext==null?g.NO_CONTEXT:g.MENU_CONTEXT;return{contextStack:[],menuContext:a.menuContext,contextState:h}}return a}};e.exports=a}),null);
|
||
|
__d("HighlightNodeMutation",["MutationUtils","SpatialNavControllerUtils","SpatialNavScrollUtils","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={mutateState:function(a,c){__p&&__p();var d=b("SpatialNavControllerUtils").getContextFromState(a);if(d==null)return a;var e=d.currentNode;c=c.targetElement;if(e.getHTMLElement()===c)return a;c=b("SpatialNavTreeNodeUtils").findNodeForElement(c,b("SpatialNavTreeNodeUtils").getRootNode(e));if(c==null)return a;b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,d.config);e&&(e.getHTMLElement().blur(),b("MutationUtils").unhighlightNode(e));b("MutationUtils").maybeFocusNode(c);b("MutationUtils").highlightNode(c);return b("MutationUtils").getNewControllerState(a,c)}};e.exports=a}),null);
|
||
|
__d("InteractWithNodeMutation",["KaiOSHTMLElementUtils","MutationUtils","SpatialNavTreeNodeUtils","getActiveElement"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a){return a instanceof HTMLSelectElement||a instanceof HTMLInputElement&&a.type==="date"}a={mutateState:function(a,c){var d=c.node.getHTMLElement();g(d)&&b("MutationUtils").focusAndTagElement(d);b("KaiOSHTMLElementUtils").isTextfieldInput(d)&&b("getActiveElement")(document)!==d&&b("MutationUtils").focusAndTagElement(d);if(b("SpatialNavTreeNodeUtils").shouldClickChildInstead(c.node)){c=b("KaiOSHTMLElementUtils").getFirstLink(d);c!=null&&c.click()}else d.click();return a}};e.exports=a}),null);
|
||
|
__d("MoveToNodeMutation",["MutationUtils","SpatialNavControllerUtils","SpatialNavScrollUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={mutateState:function(a,c){__p&&__p();var d=c.currentNode;c=c.nextNode;var e=b("SpatialNavControllerUtils").getContextFromState(a);if(e==null)return a;b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,e.config);d.getHTMLElement().blur();b("MutationUtils").maybeFocusNode(c);b("MutationUtils").unhighlightNode(d);b("MutationUtils").highlightNode(c);return b("MutationUtils").getNewControllerState(a,c)}};e.exports=a}),null);
|
||
|
__d("PopContextMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavControllerUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a){b("MutationUtils").unhighlightStackContext(a);var c=a.contextStack.length<=1&&a.contextState===g.CONTEXT_STACK?g.NO_CONTEXT:a.contextState,d=a.contextStack.length;if(c===g.CONTEXT_STACK&&d>=2){d=a.contextStack[d-2].currentNode;b("MutationUtils").highlightNode(d)}d=b("SpatialNavControllerUtils").getStackContextFromState(a);d!=null&&d.mutationObserver!=null&&d.mutationObserver.release();return{contextStack:a.contextStack.slice(0,-1),menuContext:a.menuContext,contextState:c}}};e.exports=a}),null);
|
||
|
__d("SpatialNavDOMMutationObserver",["SpatialNavMutationSpecTypes"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={attributes:!0,attributeFilter:["style"],attributeOldValue:!0,childList:!0,subtree:!0},h=new RegExp(/display:\s*none/);a=function(){__p&&__p();function a(a,c,d,e){__p&&__p();var f=this;this.$5=function(a){__p&&__p();var c=f.$2,d=f.$3,e=f.$4;if(c==null||d==null)return;var g=[];for(var a=a,h=Array.isArray(a),i=0,a=h?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var j;if(h){if(i>=a.length)break;j=a[i++]}else{i=a.next();if(i.done)break;j=i.value}j=j;var k=j.target;if(!(k instanceof HTMLElement))continue;if(j.type==="attributes"){if(f.$6(j))g.push({domMutationType:"ADD",addedElement:k});else if(f.$7(j)){var l=k.parentNode;l instanceof HTMLElement&&g.push({domMutationType:"REMOVE",removedElement:k,removedElementParent:l})}}else if(j.type==="childList"){for(var l=j.removedNodes,m=Array.isArray(l),n=0,l=m?l:l[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var o;if(m){if(n>=l.length)break;o=l[n++]}else{n=l.next();if(n.done)break;o=n.value}o=o;o instanceof HTMLElement&&g.push({domMutationType:"REMOVE",removedElement:o,removedElementParent:k})}for(var o=j.addedNodes,n=Array.isArray(o),m=0,o=n?o:o[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){if(n){if(m>=o.length)break;l=o[m++]}else{m=o.next();if(m.done)break;l=m.value}k=l;k instanceof HTMLElement&&g.push({domMutationType:"ADD",addedElement:k})}}}g.length!==0&&d([{mutationType:b("SpatialNavMutationSpecTypes").REBUILD_PARTIAL_TREE,pathType:c,domMutations:g,highlightNext:e}])};this.$2=c;this.$3=d;this.$4=e;this.$1=new MutationObserver(this.$5);this.$1.observe(a,g)}var c=a.prototype;c.release=function(){this.$1!=null&&this.$1.disconnect(),this.$1=null,this.$2=null,this.$3=null};c.$6=function(a){var b=a.oldValue;a=a.target;return b!=null&&h.test(b)&&a instanceof HTMLElement&&a.style.display===""};c.$7=function(a){var b=a.oldValue;a=a.target;return(b==null||!h.test(b))&&a instanceof HTMLElement&&a.style.display==="none"};return a}();e.exports=a}),null);
|
||
|
__d("PushContextMutation",["fbt","HierarchicalTreeOptimizer","KaiOSSpatialNavPath","KaiOSSpatialNavTraverserKind","MutationUtils","SpatialNavControllerTypes","SpatialNavControllerUtils","SpatialNavDOMMutationObserver","SpatialNavScrollUtils","SpatialNavTreeBuilder","SpatialNavTreeNodeUtils","qex"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("SpatialNavControllerTypes").SpatialNavContextState;function i(a,c,d){b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,d);d=b("SpatialNavControllerUtils").getStackContextFromState(a);d!=null&&d.currentNode.getHTMLElement().blur();b("MutationUtils").maybeFocusNode(c);b("MutationUtils").highlightNode(c)}a={mutateState:function(a,c){__p&&__p();var d=b("SpatialNavTreeBuilder").buildSpatialNavTree(c.rootElement);if(d==null)return a;var e=null;c.config.focusMenuElementOnFirst!=null&&(e=b("SpatialNavTreeNodeUtils").findMenuNodeFromElement(c.config.focusMenuElementOnFirst,d));e==null&&(e=c.config.pathType===b("KaiOSSpatialNavPath").BOTTOM_SHEET||c.config.pathType===b("KaiOSSpatialNavPath").LIKE_REACTION_FLYOUT||c.config.pathType===b("KaiOSSpatialNavPath").MOVERLAY?b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(d):b("SpatialNavTreeNodeUtils").getFirstHighlightableNodeInViewport(d));if(e==null)return a;var f=h.CONTEXT_STACK;a.contextState===h.MENU_CONTEXT&&a.menuContext!=null&&b("SpatialNavTreeNodeUtils").getRootNode(a.menuContext.currentNode).getHTMLElement()!==c.rootElement?f=h.MENU_CONTEXT:(b("MutationUtils").unhighlightStackContext(a),i(a,e,c.config));c.traverser.traverserName===b("KaiOSSpatialNavTraverserKind").HIERARCHICAL&&c.config.validateTree===!0&&b("HierarchicalTreeOptimizer").validateTreeStructure(d);d=null;c.config.observeDOMChanges===!0&&(d=new(b("SpatialNavDOMMutationObserver"))(c.rootElement,c.config.pathType,c.stateUpdateFunction,c.config.highlightNext));if(c.config.pathType===b("KaiOSSpatialNavPath").FRIENDS_TAB&&f===h.CONTEXT_STACK&&b("qex")._("816772")){var j=g._("Select");j={detail:{centerButtonText:j}};b("SpatialNavControllerUtils").updateSoftkeyTray(j)}else{j={detail:{centerButtonText:""}};b("SpatialNavControllerUtils").updateSoftkeyTray(j)}return{contextStack:[].concat(a.contextStack,[{currentNode:e,traverser:c.traverser,config:c.config,mutationObserver:d}]),menuContext:a.menuContext,contextState:f}}};e.exports=a}),null);
|
||
|
__d("SpatialNavTreeUpdater",["KaiOSHTMLElementUtils","SpatialNavigationAttribute","SpatialNavScrollUtils","SpatialNavTreeBuilder","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a,c){c=c.parentNode;a=a.getHTMLElement().parentNode;var d=null,e=null;while(c!=null&&c!==a&&c!==document&&c instanceof HTMLElement&&(d==null||e==null))c.hasAttribute(b("SpatialNavigationAttribute").SCROLL_PARENT)&&(d==null&&(d=b("SpatialNavScrollUtils").isVScrollParent(c)?c:null),e==null&&(e=b("SpatialNavScrollUtils").isHScrollParent(c)?c:null)),c=c.parentNode;return{hScrollParent:e,vScrollParent:d}}function h(a,c){__p&&__p();a=g(a,c);c=b("SpatialNavTreeBuilder").buildSpatialNavTree(c,a.hScrollParent,a.vScrollParent);a=[];for(var c=c.getChildren(),d=Array.isArray(c),e=0,c=d?c:c[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{e=c.next();if(e.done)break;f=e.value}f=f;f.setParent(null);a.push(f)}return a}function i(a,c){c=c;while(c!=null&&c!==document&&c instanceof HTMLElement){if(c===a.getHTMLElement()&&b("KaiOSHTMLElementUtils").isVisible(c)||b("KaiOSHTMLElementUtils").isSpatialNavElement(c))return b("SpatialNavTreeNodeUtils").findNodeForElement(c,a);c=c.parentNode}return null}a={maybeAddNodes:function(a,b){__p&&__p();var c=h(a,b);if(c.length===0)return[];a=i(a,b.parentNode);if(a==null)return[];var d=a.getChildren(),e;for(e=0;e<d.length;e++){var f=d[e].getHTMLElement();if(f.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_PRECEDING)break}d.splice.apply(d,[e,0].concat(c));for(var f=c,b=Array.isArray(f),d=0,f=b?f:f[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){if(b){if(d>=f.length)break;e=f[d++]}else{d=f.next();if(d.done)break;e=d.value}e=e;e.setParent(a)}return c},maybeRemoveNodes:function(a,c,d,e){__p&&__p();a=i(a,d);d={removedNodes:[],removedCurrentNode:!1,closestPrevNode:null,closestNextNode:null};if(a==null)return d;a=a.getChildren();var f=0,g;for(g=0;g<a.length;g++){var h=a[g].getHTMLElement();if(c.contains(h))f+=1;else if(f!==0)break}if(f===0)return d;h=c.contains(e.getHTMLElement());d=g-f;c=h?b("SpatialNavTreeNodeUtils").getPrevNode(a[d]):null;e=b("SpatialNavTreeNodeUtils").getNextNodeFiltered(a[g-1],function(a){return b("SpatialNavTreeNodeUtils").isPrimaryNode(a)&&b("KaiOSHTMLElementUtils").isVisible(a.getHTMLElement())});if(e!=null&&b("SpatialNavTreeNodeUtils").isFocusTransparent(e)){e=(g=e.getPrimaryChildOverride())!=null?g:e.getFirstChild()}return{removedNodes:a.splice(d,f),removedCurrentNode:h,closestPrevNode:c,closestNextNode:e}}};e.exports=a}),null);
|
||
|
__d("RebuildPartialTreeMutation",["HierarchicalTreeOptimizer","KaiOSSpatialNavTraverserKind","MutationUtils","SpatialNavTreeNodeUtils","SpatialNavTreeUpdater"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a,b){a=a.contextStack;for(var c=a.length-1;c>=0;c--){var d=a[c];if(d.config.pathType===b)return d}return null}function h(a,c){if(c==null)return b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(a);else{a=b("SpatialNavTreeNodeUtils").getNextNodeFiltered(c,function(a){return!b("SpatialNavTreeNodeUtils").isFocusTransparent(a)});return(a=a)!=null?a:c}}a={mutateState:function(a,c){__p&&__p();var d=g(a,c.pathType);if(d==null)return a;var e=b("SpatialNavTreeNodeUtils").getRootNode(d.currentNode),f=!1,i=null,j=null;for(var k=c.domMutations,l=Array.isArray(k),m=0,k=l?k:k[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var n;if(l){if(m>=k.length)break;n=k[m++]}else{m=k.next();if(m.done)break;n=m.value}n=n;switch(n.domMutationType){case"ADD":b("SpatialNavTreeUpdater").maybeAddNodes(e,n.addedElement);break;case"REMOVE":n=b("SpatialNavTreeUpdater").maybeRemoveNodes(e,n.removedElement,n.removedElementParent,d.currentNode);n.removedCurrentNode&&(i=n.closestPrevNode,j=n.closestNextNode,f=!0);break;default:}}if(!f)return a;n=null;c.highlightNext===!0&&j!==null?n=j:n=h(e,i);m=a.contextStack;l=m.indexOf(d);if(l===-1||n==null)return a;k=d.currentNode;b("MutationUtils").moveToNewNode(k,n,d.config);f=k.getParent();if(f!=null&&f.getPrimaryChildOverride()===k){c=n.getParent()===f?n:null;f.setPrimaryChildOverride(c)}d.traverser.traverserName===b("KaiOSSpatialNavTraverserKind").HIERARCHICAL&&d.config.validateTree===!0&&b("HierarchicalTreeOptimizer").validateTreeStructure(e);j=[].concat(m.slice(0,l),[babelHelpers["extends"]({},d,{currentNode:n})],m.slice(l+1));return babelHelpers["extends"]({},a,{contextStack:j})}};e.exports=a}),null);
|
||
|
__d("RemoveContextMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a,c){__p&&__p();if(a.contextStack==null||a.contextStack.length===0)return a;for(var d=a.contextStack.length-1;d>=0;d--){var e=a.contextStack[d],f=e.currentNode,h=b("SpatialNavTreeNodeUtils").getRootNode(f).getHTMLElement(),i=a.contextStack[d].config.pathType;if(h===c.rootElement||i===c.pathType){f.getHTMLElement().blur();b("MutationUtils").unhighlightNode(f);h=a.contextStack.length===1&&a.contextState===g.CONTEXT_STACK?g.NO_CONTEXT:a.contextState;e.mutationObserver!=null&&e.mutationObserver.release();return{contextStack:a.contextStack.slice(0,d).concat(a.contextStack.slice(d+1)),menuContext:a.menuContext,contextState:h}}}return a}};e.exports=a}),null);
|
||
|
__d("SwitchContextMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavControllerUtils","SpatialNavScrollUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a,c){__p&&__p();if(a.contextState===c.switchToContextState)return a;var d={contextStack:a.contextStack,menuContext:a.menuContext,contextState:c.switchToContextState},e=b("SpatialNavControllerUtils").getContextFromState(d);if(c.switchToContextState!==g.NO_CONTEXT&&e==null)return a;a=c.currentNode;a!=null&&(a.getHTMLElement().blur(),b("MutationUtils").unhighlightNode(a));if(e!=null){a=c.nextNode!=null?c.nextNode:e.currentNode;b("SpatialNavScrollUtils").scrollToNodeIfNecessary(a,e.config);b("MutationUtils").maybeFocusNode(a);b("MutationUtils").highlightNode(a);d=b("MutationUtils").getNewControllerState(d,a)}return d}};e.exports=a}),null);
|
||
|
__d("SpatialNavMutator",["BuildMenuMutation","ClearContextMutation","HighlightNodeMutation","InteractWithNodeMutation","MoveToNodeMutation","PopContextMutation","PushContextMutation","RebuildPartialTreeMutation","RebuildTreeMutation","RemoveContextMutation","SpatialNavMutationSpecTypes","SwitchContextMutation"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("RebuildTreeMutation").RebuildTreeMutation,h={mutateState:function(a,b){var c=a;b.forEach(function(a){c=h._applyMutation(c,a)});return c},_applyMutation:function(a,c){__p&&__p();switch(c.mutationType){case b("SpatialNavMutationSpecTypes").PUSH_CONTEXT:return b("PushContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").POP_CONTEXT:return b("PopContextMutation").mutateState(a);case b("SpatialNavMutationSpecTypes").MOVE_TO_NODE:return b("MoveToNodeMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").INTERACT_WITH_NODE:return b("InteractWithNodeMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").REBUILD_TREE:return g.mutateState(a,c);case b("SpatialNavMutationSpecTypes").BUILD_MENU:return b("BuildMenuMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").HIGHLIGHT_NODE:return b("HighlightNodeMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").SWITCH_CONTEXT:return b("SwitchContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").CLEAR_CONTEXT:return b("ClearContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").REMOVE_CONTEXT:return b("RemoveContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").REBUILD_PARTIAL_TREE:return b("RebuildPartialTreeMutation").mutateState(a,c);default:return a}}};e.exports=h}),null);
|
||
|
__d("SpatialNavPathUtils",["KaiOSSpatialNavPath","URI"],(function(a,b,c,d,e,f){"use strict";var g=Object.freeze({"/":b("KaiOSSpatialNavPath").NEWSFEED,"/kaiosapp/jio/home":b("KaiOSSpatialNavPath").NEWSFEED,"/kaiosapp/jio/home/startup":b("KaiOSSpatialNavPath").NEWSFEED,"/home.php":b("KaiOSSpatialNavPath").NEWSFEED,"/index.php":b("KaiOSSpatialNavPath").NEWSFEED,"/friends/center/kaios":b("KaiOSSpatialNavPath").FRIENDS_TAB,"/notifications.php":b("KaiOSSpatialNavPath").NOTIFICATION,"/kaiosapp/playground":b("KaiOSSpatialNavPath").PLAYGROUND,"/kaiosapp/playground/visibility":b("KaiOSSpatialNavPath").PLAYGROUND_VISIBILITY,"/login/save-device":b("KaiOSSpatialNavPath").SAVE_DEVICE_PAGE});a={getSpatialNavPathType:function(a){a=new(b("URI"))(a).getPath();a.length>1&&a[a.length-1]==="/"&&(a=a.slice(0,a.length-1));return g[a]!=null?g[a]:b("KaiOSSpatialNavPath").NONE}};e.exports=a}),null);
|
||
|
__d("SpatialNavController",["fbt","Promise","regeneratorRuntime","DataStore","KaiOSConnectionHelper","KaiOSSendMessageUtil","KaiOSSpatialNavEvents","KaiOSSpatialNavPath","KaiOSSpatialNavTraverserKind","MFlyout","MOverlay","MutationUtils","RebuildTreeMutation","SpatialNavControllerUtils","SpatialNavigationAttribute","SpatialNavMutationSpecTypes","SpatialNavMutator","SpatialNavPathUtils","SpatialNavScrollUtils","SpatialNavTreeNodeUtils","Stratcom","SubscriptionsHandler","URI","promiseDone","SpatialNavControllerTypes"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("RebuildTreeMutation").RebuildHighlightConfig,i=new Map([["nav_mode","spatial"]]),j=new Map([["nav_mode","cursor"]]),k=b("SpatialNavControllerTypes").SpatialNavContextState;a=function(){__p&&__p();function a(){__p&&__p();var a=this;this.$1=!1;this.$3=null;this.$4=null;this.$5=!1;this.$9=function(c,d){d===void 0&&(d=!1),b("promiseDone")(b("Promise").resolve().then(function(a){var c=this;this.$2=b("SpatialNavMutator").mutateState(this.$2,a);a.forEach(function(a){a.mutationType===b("SpatialNavMutationSpecTypes").PUSH_CONTEXT&&b("Stratcom").invoke(b("KaiOSSpatialNavEvents").INIT_COMPLETE),c.$12(a,c.$2)&&d&&c.enableSpatialNav()})}.bind(a,c)))};this.$2={contextStack:[],menuContext:null,contextState:k.NO_CONTEXT}}var c=a.prototype;c.enableSpatialNav=function(){this.$6(i),this.$1=!0,this.$7(),this.$8()};c.disableSpatialNav=function(a){__p&&__p();var c;return b("regeneratorRuntime").async(function(d){while(1)switch(d.prev=d.next){case 0:this.$6(j);this.$1=!1;this.$3!=null&&this.$3.release();d.next=5;return b("regeneratorRuntime").awrap(this.getCurrentState());case 5:c=d.sent,a&&this.clearContext(c.contextState,k.NO_CONTEXT);case 7:case"end":return d.stop()}},null,this)};c.disableSpatialNavForAll=function(){this.disableSpatialNav(!1),this.clearContext(k.MENU_CONTEXT),this.clearContext(k.CONTEXT_STACK)};c.isSpatialNavEnabled=function(){return this.$1};c.setupNavOnContainer=function(a,c,d){d===void 0&&(d=!1);var e=b("SpatialNavControllerUtils").getTraverserFromType(c.traverserType);c.isMenu===!0?this.$9([{mutationType:b("SpatialNavMutationSpecTypes").BUILD_MENU,rootElement:a,traverser:e,config:c}],d):this.$9([{mutationType:b("SpatialNavMutationSpecTypes").PUSH_CONTEXT,rootElement:a,traverser:e,config:c,stateUpdateFunction:this.$9}],d)};c.$6=function(a){b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.TOGGLE_SPATIAL_NAV,a)};c.rebuildSpatialNavTree=function(a){this.$9([{mutationType:b("SpatialNavMutationSpecTypes").REBUILD_TREE,highlightConfig:a}])};c.handleFocusChange=function(a){if(b("DataStore").get(a,b("MutationUtils").SPATIAL_NAV_ELEMENT_FOCUS_KEY,!1)){b("DataStore").remove(a,b("MutationUtils").SPATIAL_NAV_ELEMENT_FOCUS_KEY);return}this.$9([{mutationType:b("SpatialNavMutationSpecTypes").HIGHLIGHT_NODE,targetElement:a}])};c.getCurrentState=function(){var a=this;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:return c.abrupt("return",b("Promise").resolve().then(function(){return a.$2}));case 1:case"end":return c.stop()}},null,this)};c.$10=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:a=c.sent;return c.abrupt("return",b("SpatialNavControllerUtils").getContextFromState(a));case 4:case"end":return c.stop()}},null,this)};c.getCurrentStackContext=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:a=c.sent;return c.abrupt("return",b("SpatialNavControllerUtils").getContextFromState(a,k.CONTEXT_STACK));case 4:case"end":return c.stop()}},null,this)};c.getCurrentContextState=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:a=c.sent;return c.abrupt("return",a.contextState);case 4:case"end":ret
|
||
|
__d("KaiOSMenuHandler",["csx","cx","fbt","regeneratorRuntime","CSS","DOM","Event","KaiOSSoftkeyTrayLogger","KaiOSSpatialNavEvents","KaiOSSpatialNavPath","KaiOSSpatialNavTraverserKind","MViewport","SpatialNavController","SpatialNavControllerTypes","SpatialNavTreeNodeUtils","Stratcom","URI"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("SpatialNavControllerTypes").SpatialNavContextState;a=function(){__p&&__p();function a(){__p&&__p();var a=this;this.menuShown=!1;this.showPageSoftkeyTray=!1;this.toggleMenuVisibility=function(a,c){var d=b("MViewport").getScrollTop();if(d<=0)return;if(c)a.style.top="0px",a.classList.add("float");else{c=-Math.min(d,a.clientHeight);a.style.top=c+"px";a.classList.remove("float")}};this.$1=function(b){a.showFloatingMenu()};this.$2=function(c){var d=a.leftButtonElement;c=c.getData().path;if(a.menuShown&&d!=null){var e=null;c!=null&&(e=new(b("URI"))(c).getQueryData().soft);c=new CustomEvent("kaios_close_menu",{detail:{focusFirstNode:e!=="search"}});d.dispatchEvent(c);b("MViewport").scrollToTop()}};this.$3=function(c){__p&&__p();c=c.detail;var d=c.leftButtonText;if(d!=null){a.showPageSoftkeyTray||b("DOM").show(a.softkeyTrayContainer);var e=c.leftButtonEvent,f=c.leftButtonLoggingId;f=b("DOM").create("div",{className:"_6ykc",id:f},d);b("DOM").replace(a.leftButtonElement,f);a.leftButtonElement=f;e!=null&&b("Event").listen(f,"click",function(b){b=new CustomEvent(e);window.dispatchEvent(b);a.restorePageTray()})}d=c.rightButtonText;if(d!=null){var g=c.rightButtonEvent;f=c.rightButtonLoggingId;f=b("DOM").create("div",{className:"_6ykd",id:f},d);b("DOM").replace(a.rightButtonElement,f);a.rightButtonElement=f;g!=null&&b("Event").listen(f,"click",function(a){a=new CustomEvent(g);window.dispatchEvent(a)})}d=c.centerButtonText;if(d!=null&&a.centerButtonElement!=null&&d!=a.centerButtonElement.textContent){f=b("DOM").create("div",{className:"_7gvg"},d);b("DOM").replace(a.centerButtonElement,f);a.centerButtonElement=f}};this.$4=function(b){a.restorePageTray()}}var c=a.prototype;c.handleKeyEvents=function(a){__p&&__p();if(this.softkeyTrayContainer==null||this.softkeyTrayContainer.style.display!=""||this.viewportElement!=null&&this.viewportElement.style.display!="")return!1;switch(a.key){case"SoftLeft":a=this.leftButtonElement;if(a!=null){a.click();b("KaiOSSoftkeyTrayLogger").logSoftkeyTrayButtonClicked(a.getAttribute("id"));return!0}break;case"SoftRight":a=this.rightButtonElement;if(a!=null){a.click();b("KaiOSSoftkeyTrayLogger").logSoftkeyTrayButtonClicked(a.getAttribute("id"));return!0}break;case"Backspace":case"BrowserBack":case"ArrowUp":case"ArrowDown":if(this.menuShown&&this.leftButtonElement!=null){this.leftButtonElement.click();return!0}break}return!1};c.showFloatingMenu=function(){var a=this.menuContainerElement;a!=null&&(this.menuShown=!0,this.toggleMenuVisibility(a,!0),this.maybeSetupSpatialNavV2(),this.updateBackgroundOverlayVisibility(!0),this.setupCloseMenuButton())};c.maybeSetupSpatialNavV2=function(){__p&&__p();var a,c,d,e,f;return b("regeneratorRuntime").async(function(g){__p&&__p();while(1)switch(g.prev=g.next){case 0:a=this.menuContainerElement;if(!(a==null)){g.next=3;break}return g.abrupt("return");case 3:g.next=5;return b("regeneratorRuntime").awrap(b("SpatialNavController").getCurrentState());case 5:c=g.sent,this.prevSpatialNavContextState=c.contextState,d=null,this.prevSpatialNavContextState===j.MENU_CONTEXT&&c.menuContext!=null?d=c.menuContext.currentNode.getHTMLElement():(e=a.getElementsByClassName("popoverOpen"),e.length!==0&&(d=e[0])),f={traverserType:b("KaiOSSpatialNavTraverserKind").HORIZONTAL,pathType:b("KaiOSSpatialNavPath").MENU,isMenu:!1,disableScrollToNode:!0,focusMenuElementOnFirst:d,wrapAround:!0},b("SpatialNavController").setupNavOnContainer(a,f,!0);case 11:case"end":return g.stop()}},null,this)};c.setupCloseMenuButton=function(){__p&&__p();var a=this,c=this.leftButtonElement,d=this.rightButtonElement,e=this.centerButtonElement,f=b("DOM").create("div",{className:"_6ykc",id:"kaios_tray_menu_close"},i._("Close"));b("DOM").replace(this.leftButtonElement,f);this.leftB
|
||
|
__d("KaiOSNavigatorUtils",["KaiOSConnectionHelper","KaiOSSendMessageUtil"],(function(a,b,c,d,e,f){"use strict";var g=new Map([["nav_mode","spatial"]]),h=new Map([["nav_mode","cursor"]]);function i(a){b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.TOGGLE_SPATIAL_NAV,a)}a={showCursor:function(){i(h)},hideCursor:function(){i(g)}};e.exports=a}),null);
|
||
|
__d("KaiOSKeyEventHandlers",["KaiOSConnectionHelper","KaiOSControllerConfig","KaiOSControllerUtils","KaiOSHTMLElementUtils","KaiOSMenuHandler","KaiOSNavigatorUtils","KaiOSSendMessageUtil","MViewport","SpatialNavController","SpatialNavControllerUtils","URI","isLinkshimURI"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function a(a){__p&&__p();if(b("KaiOSControllerConfig").fullScreenVideoHandler&&b("KaiOSControllerConfig").fullScreenVideoHandler.handleClickEvent(a)){a.preventDefault();a.stopPropagation();return}var c=a.target,d=null;c&&c.tagName==="A"?d=c.href:c&&c.parentElement&&c.parentElement.tagName==="A"?d=c.parentElement.href:c&&c.parentElement&&c.parentElement.parentElement&&c.parentElement.parentElement.tagName==="A"&&(d=c.parentElement.parentElement.href);c=new(b("URI"))(d);var e=d!=null&&d!==""&&!/\.facebook.com$/i.test(c.getDomain());d!=null&&(b("isLinkshimURI")(c)||e)&&(b("KaiOSControllerUtils").openUrl(d),a.preventDefault(),a.stopPropagation())}function g(a){return b("KaiOSControllerConfig").appVersion!=null&&!b("SpatialNavController").isSpatialNavEnabled()&&b("KaiOSHTMLElementUtils").isTextfieldInput(a.target)}function c(a){g(a)?b("KaiOSNavigatorUtils").hideCursor():b("SpatialNavController").isSpatialNavEnabled()&&a.target instanceof HTMLElement&&b("SpatialNavController").handleFocusChange(a.target)}function d(a){g(a)?b("KaiOSNavigatorUtils").showCursor():(a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLInputElement)&&b("SpatialNavController").isSpatialNavEnabled()&&b("KaiOSNavigatorUtils").hideCursor()}function f(a){__p&&__p();if(b("KaiOSMenuHandler").handleKeyEvents(a)||b("KaiOSControllerConfig").fullScreenVideoHandler&&b("KaiOSControllerConfig").fullScreenVideoHandler.handleKeyDownEvent(a)){a.preventDefault();a.stopPropagation();return}switch(a.key){case"Backspace":if(m())break;case"BrowserBack":h(a);break;case"Enter":i(a);break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":j(a);break}}function h(a){b("SpatialNavController").isSpatialNavEnabled()&&b("SpatialNavControllerUtils").shouldInterceptBackKey(a)?(a.preventDefault(),a.stopPropagation(),b("SpatialNavController").interceptBackKey()):document.fullscreenElement?(document.exitFullscreen(),a.preventDefault(),a.stopPropagation()):b("KaiOSControllerUtils").keyDownEventHandledByRegPage(a.key)?(a.preventDefault(),a.stopPropagation()):b("KaiOSControllerUtils").isOnHomeOrConfPage()&&b("MViewport").getScrollTop()>5?(a.preventDefault(),a.stopPropagation(),b("SpatialNavController").isSpatialNavEnabled()==!0?b("SpatialNavController").scrollToTop():b("MViewport").scrollTo(0,0)):!b("KaiOSControllerUtils").isOnHomeOrConfPage()&&!b("KaiOSControllerUtils").shouldExitOnBackForLoggedOutPush()&&(b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.HANDLE_BACK),a.preventDefault(),a.stopPropagation())}function i(a){b("KaiOSControllerConfig").appVersion!=null&&a.target.type=="textarea"?(a.target.blur(),a.preventDefault(),a.stopPropagation()):j(a)}function j(a){b("SpatialNavController").isSpatialNavEnabled()&&!k(a)&&(a.preventDefault(),b("SpatialNavController").handleKeyDown(a))}function k(a){__p&&__p();var b=!1,c=l();switch(a.key){case"ArrowLeft":b=(a=c.shouldOverrideLeft)!=null?a:!1;break;case"ArrowRight":b=(a=c.shouldOverrideRight)!=null?a:!1;break;case"ArrowUp":b=(a=c.shouldOverrideUp)!=null?a:!1;break;case"ArrowDown":b=(a=c.shouldOverrideDown)!=null?a:!1;break;case"Enter":b=(a=c.shouldOverrideCSK)!=null?a:!1;break}return b}function l(){var a=document.activeElement;if(a instanceof HTMLInputElement&&b("KaiOSHTMLElementUtils").isTextfieldInput(a))return{shouldOverrideLeft:!0,shouldOverrideRight:!0};return a instanceof HTMLElement&&b("KaiOSHTMLElementUtils").isFileUploadElement(a)?{shouldOverrideCSK:!0}:{}}function m(){var a=document.activeElement;if(a&&a instanceof HTMLInputElement)return!0;else return!1}e.exports={interceptClick:a,handleTextfieldFocus:c,handleTextfieldBlur:d,handleKeyDown:f}}),null);
|
||
|
__d("XExternalShareComposerController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/kaiosapp/composer/",{csid:{type:"String"},length:{type:"Int"}})}),null);
|
||
|
__d("KaiOSShareHandler",["XAsyncRequest","XExternalShareComposerController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={handle:function(a){if(a===void 0)return;var c=Math.min(a.length,3),d=new FormData();for(var e=0;e<c;e++)d.append("file_"+e,a[e]);e=b("XExternalShareComposerController").getURIBuilder().setInt("length",c).getURI();new(b("XAsyncRequest"))(e).setRawData(d).setMethod("POST").send()}};e.exports=a}),null);
|
||
|
__d("XKaiOSAppJioTagController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/kaiosapp/jio/tag/",{})}),null);
|
||
|
__d("XKaiOSUpdatePushController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/kaiosapp/push/update/",{})}),null);
|
||
|
__d("KaiOSController",["Promise","regeneratorRuntime","KaiOSAppMigrationEvent","KaiOSConnectionHelper","KaiOSControllerConfig","KaiOSControllerUtils","KaiOSFullscreenVideoHandler","KaiOSKeyEventHandlers","KaiOSLogger","KaiOSSendMessageUtil","KaiOSShareHandler","MRequest","SpatialNavController","Stratcom","XKaiOSAppJioTagController","XKaiOSUpdatePushController","getActiveElement","nullthrows","promiseDone","setTimeoutAcrossTransitions"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("KaiOSControllerUtils").createCallbackHandler(),h="app://m.facebook.com",i=Object.freeze({APP_INFO:"app_info",UPDATE_PUSH:"update_push",CONFIG_REQUEST:"config_request",SHARE_PHOTO:"share_photo",LOG_MIGRATION_EVENT:"log_migration_event",TIME_TO_BROWSER_IFRAME_INIT:"time_to_browser_iframe_init"});function j(a){__p&&__p();if(!(a instanceof Map))return;var c=a.get(b("KaiOSSendMessageUtil").Action),d=a.get(b("KaiOSSendMessageUtil").ActionPayload);a=a.get(b("KaiOSSendMessageUtil").CallbackID);if(g.handleCallback(a,d))return;switch(c){case i.APP_INFO:d&&d.get&&(b("KaiOSControllerConfig").appVersion=d.get("app_version"),b("KaiOSControllerConfig").shouldLogAppVersion&&(b("KaiOSLogger").logAppVersion(b("KaiOSControllerConfig").appVersion),b("KaiOSControllerConfig").shouldLogAppVersion=!1),t.setup());break;case i.UPDATE_PUSH:if(d&&d.get){a=d.get("subscription");t.updatePush(a.endpoint,JSON.stringify(a.keys))}break;case i.CONFIG_REQUEST:c=new Map();c.set("show_news_feed_on_notification_back",b("KaiOSControllerConfig").showNewsFeedOnNotificationBack);b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.CONFIG_RESPONSE,c);break;case i.SHARE_PHOTO:b("KaiOSShareHandler").handle(d);break;case i.LOG_MIGRATION_EVENT:if(d&&d.get){a=d.get("migration_phase");c=d.get("roundtrip_durations");if(c&&c instanceof Array)for(var e=0;e<c.length;e++)b("KaiOSLogger").logAppMigrationEvent(b("KaiOSAppMigrationEvent").COMPLETED_ROUNDTRIP,a,c[e],{roundtrip_count:e+1})}break;case i.TIME_TO_BROWSER_IFRAME_INIT:if(d&&d.get){e=d.get("timeToBrowserIframeInit");a=d.get("timestampAtBrowserIframeInit");c=d.get("migrationPhase");var f=d.get("experimentGroup");d=d.get("experimentName");e&&b("KaiOSLogger").logAppMigrationEvent(b("KaiOSAppMigrationEvent").COMPLETED_BROWSER_IFRAME_INIT,c,e,{timestamp_at_browser_iframe_init:a,lid:b("KaiOSControllerConfig").lid},d,f)}break}}function k(a){b("KaiOSControllerConfig").fullScreenVideoHandler&&b("KaiOSControllerConfig").fullScreenVideoHandler.handleMouseMoveEvent(a)&&(a.preventDefault(),a.stopPropagation())}function l(a){if(document.fullscreenElement)document.fullscreenElement.nodeName=="VIDEO"&&(screen.orientation&&screen.orientation.lock("landscape"),document.fullscreenElement.mozRequestPointerLock());else{a=new Map();a.set("orientation","natural");b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.SCREEN_ORIENTATION_LOCK,a)}}var m=null,n=!1,o=!1,p=null,q=null,r=new(b("Promise"))(function(a){p=a}),s=new(b("Promise"))(function(a){q=a}),t={waitForKaiOS:function(){return s},init:function(a){a.get("kaios__dev__")&&(p?p():function(){},q?q():function(){},p=null,this.setup()),b("KaiOSControllerConfig").appID=Number(a.get("app_id")),b("KaiOSControllerConfig").shouldLogAppVersion=!!a.get("should_log_app_version"),m=a.get("fbt_strings"),b("KaiOSControllerConfig").showNewsFeedOnNotificationBack=!!a.get("show_news_feed_on_notification_back"),b("KaiOSControllerConfig").userLoggedIn=!!a.get("user_logged_in"),b("KaiOSControllerConfig").inLatestMigrationPhase=!!a.get("in_latest_migration_phase"),b("KaiOSControllerConfig").migrationGroup=String(a.get("migration_group")),b("KaiOSControllerConfig").lid=String(a.get("lid")),window.addEventListener("message",t.receiveMessage,!1),b("promiseDone")(r,function(){n?b("SpatialNavController").enableSpatialNav():b("SpatialNavController").disableSpatialNavForAll(),n=!1})},enableBackButtonOnRegPage:function(){b("KaiOSControllerConfig").backButtonOnRegPage=!0},setup:function(){__p&&__p();window.addEventListener("
|
||
|
__d("MLoggedOutBannerGooglePlayRedirectWithFallback",["BanzaiLogger","DirectDownloadEvents","DOM","UserAgent","clearInterval","clearTimeout","goURI","setInterval","setTimeout"],(function(a,b,c,d,e,f){__p&&__p();var g=200,h=300,i=350,j=1500,k=2500;a=function(){"use strict";__p&&__p();function a(a){this.$1=a.button,this.$2=a.native_app_url,this.$3=a.fallback_url,this.$4=a.logging_data,this.$5=null,this.$6=null,this.$7=null,this.$8=null,this.$9=0,this.$10=!0,this.$11=b("DOM").create("iframe",{style:{display:"none"}}),b("DOM").insertAfter(this.$1,this.$11),b("BanzaiLogger").create({signal:!0,delay:1e3}).log("DirectDownloadLoggerConfig",{event:b("DirectDownloadEvents").logged_out_banner_impression_client,app_referrer:this.$4.app_referrer,app:this.$4.app,country:this.$4.country}),this.$12()}var c=a.prototype;c.$12=function(){var a=this;this.$1.addEventListener("click",function(){a.$13()});this.$10=!0};c.$13=function(){this.$10&&(this.$10=!1,this.$14(),this.$15())};c.$15=function(){var a=this;a.$9=Date.now();var c=function(){a.$16(a.$3)},d=function(){a.$17(a.$2,c)},e=function(){a.$6=b("setTimeout")(d,j),a.$18(a.$2,c)};a.$5=b("setInterval")(function(){a.$19()?a.$20():a.$9=Date.now()},g);b("UserAgent").isBrowser("Firefox")?e():d()};c.$17=function(a,c){__p&&__p();var d=this;if(d.$19())return;b("clearTimeout")(d.$8);var e=!1;d.$11.src="";d.$11.onload=function(){e=!0,b("BanzaiLogger").create({signal:!0,delay:1e3}).log("DirectDownloadLoggerConfig",{event:b("DirectDownloadEvents").logged_out_banner_google_play_redirect_failed,app_referrer:d.$4.app_referrer,app:d.$4.app,country:d.$4.country}),c()};d.$11.src=a;d.$8=b("setTimeout")(function(){var b=d.$11.contentDocument||d.$11.contentWindow.document;b.readyState=="complete"&&!e&&d.$18(a,c)},i)};c.$18=function(a,c){if(this.$19())return;this.$7=b("setTimeout")(c,k);this.$16(a)};c.$20=function(){b("clearInterval")(this.$5),b("clearTimeout")(this.$6),b("clearTimeout")(this.$7),b("clearTimeout")(this.$8)};c.$19=function(){if(document.hidden||Date.now()-this.$9>=h){this.$10=!0;return!0}return!1};c.$16=function(a){if(this.$19())return;b("goURI")(a)};c.$14=function(){this.$4||(this.$4={app_referrer:"",app:"",country:""}),b("BanzaiLogger").create({signal:!0,delay:1e3}).log("DirectDownloadLoggerConfig",{event:b("DirectDownloadEvents").logged_out_banner_upgrade_button_click,app_referrer:this.$4.app_referrer,app:this.$4.app,country:this.$4.country})};return a}();e.exports=a}),null);
|