updatePrice(argument: economy_economy_pb.UpdatePriceRequest, callback: grpc.requestCallback<economy_economy_pb.UpdatePriceResponse>): grpc.ClientUnaryCall;


updatePrice(argument: economy_economy_pb.UpdatePriceRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<economy_economy_pb.UpdatePriceResponse>): grpc.ClientUnaryCall;


updatePrice(argument: economy_economy_pb.UpdatePriceRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<economy_economy_pb.UpdatePriceResponse>): grpc.ClientUnaryCall;


getPrice(argument: economy_economy_pb.GetPriceRequest, callback: grpc.requestCallback<economy_economy_pb.GetPriceResponse>): grpc.ClientUnaryCall;


getPrice(argument: economy_economy_pb.GetPriceRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<economy_economy_pb.GetPriceResponse>): grpc.ClientUnaryCall;


getPrice(argument: economy_economy_pb.GetPriceRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<economy_economy_pb.GetPriceResponse>): grpc.ClientUnaryCall;


buyProduct(argument: economy_economy_pb.BuyProductRequest, callback: grpc.requestCallback<economy_economy_pb.BuyProductResponse>): grpc.ClientUnaryCall;


buyProduct(argument: economy_economy_pb.BuyProductRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<economy_economy_pb.BuyProductResponse>): grpc.ClientUnaryCall;


buyProduct(argument: economy_economy_pb.BuyProductRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<economy_economy_pb.BuyProductResponse>): grpc.ClientUnaryCall;


watchProduct(argument: economy_economy_pb.WatchProductRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream<economy_economy_pb.WatchProductResponse>;


watchProduct(argument: economy_economy_pb.WatchProductRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream<economy_economy_pb.WatchProductResponse>;


watchPrice(argument: economy_economy_pb.WatchPriceRequest, metadataOrOptions?: grpc.Metadata | grpc.CallOptions | null): grpc.ClientReadableStream<economy_economy_pb.WatchPriceResponse>;


watchPrice(argument: economy_economy_pb.WatchPriceRequest, metadata?: grpc.Metadata | null, options?: grpc.CallOptions | null): grpc.ClientReadableStream<economy_economy_pb.WatchPriceResponse>;


function Nest({
    children,
    fields,
    itemProps,
    label,
    description,
    name,
    onChange, // Not used on purpose
    wrap, // Not used on purpose
    ref, // Not used on purpose
    className = "",
    ...props
}: NestFieldProps) {
    const nameArray = joinName(null, name);
    const lastNamePart = nameArray[nameArray.length - 1];
    const isInList = !isNaN(parseInt(lastNamePart));
    const itemIndex = isInList ? parseInt(lastNamePart) : 0;

    if (isInList) {
        return (
            <EuiFlexGroup {...filterDOMProps(props)} className={`${className} nest-field`}>
                {label && (
                    <>
                        <label className="euiFormLabel euiFormRow__label">{label}</label>
                        <EuiText size="m">{description}</EuiText>
                    </>
                )}


(field) => (
                        <EuiFlexItem key={field}>
                            <AutoField name


(field) => (
                        <AutoField
                            key={field}


interface FilterDOMProps {
        properties: never;
    }


export type NestFieldProps = FieldProps<null, { fields?: any[]; itemProps?: object }>;


(props: Props) => {
  const { theme, componentClass, componentStyle, isOpen, allowNull = true } = props;
  const { children, handleToggle, switchType= 'normal' } = props;
  let switchTypeClass = theme.switchNormal;
  switch (switchType) {
    case 'normal':
      switchTypeClass = theme.switchNormal;
      break;
    case 'trueFalse':
      switchTypeClass = theme.switchTrueFalse;
      break;
    case 'yesNo' :
      switchTypeClass = theme.switchYesNo;
      break;
    default:
      switchTypeClass = theme.switchNormal;
      break;
  }

  const className = classNames(
        componentClass,
        theme.switchCheckbox,
        switchTypeClass,
        isOpen === false && theme.falseSelect,
        isOpen === true && theme.trueSelect,
        typeof isOpen !== 'boolean' && !isOpen && theme.nullSelect ,
        allowNull && theme.disableSwitch
    );
  return (

                  <input type="radio" checked={isOpen === false}


export interface Props {
  // Set theme for SwitchCheckbox
  theme?: any;
  // To apply custom styling.
  componentStyle?: React.CSSProperties;
  // Set a custom class
  componentClass?: string;
  componentId?: string;
  children?: React.ReactNode;
  // component props to handle toggle
  disabled?: boolean;
  isOpen?: boolean;
  handleToggle: (value?: boolean) => void;
  switchType?:ISwitchType;
  allowNull?:boolean;
}


export type ISwitchType = 'normal' | 'trueFalse' | 'yesNo';


export function amountResultToStatData([current, previous]: AmountResult[][]): StatData[] {
    current ??= [];
    previous ??= [];
    const allCurrencies = current.concat(previous).map((c) => c.currency);
    const currencies = [...new Set(allCurrencies)];
    return currencies.map((currency) => ({
        current: current.find((c) => c.currency === currency)?.amount,
        currency,
        previous: previous.find((p) => p.currency === currency)?.amount,
    }));
}


(c) => c.currency


(currency) => ({
        current: current.find((c) => c.currency === currency)?.amount,
        currency,
        previous: previous.find((p) => p.currency === currency)?.amount,
    })


(c) => c.currency === currency


(p) => p.currency === currency


(amount) => {
          return this.cp.transform(amount);
        }


data => {
        //this.reports=data.result;
        this.source.load(data.result);
      }


wsdata => wsdata && this.checkResult(wsdata)


@Component({
  selector: 'pettycash',
  templateUrl: './pettycash.component.html',
  styleUrls: ['./pettycash.component.scss']
})
export class PettycashComponent implements OnInit {

  //reports: any[];
  source: LocalDataSource = new LocalDataSource();
  settings = {
    mode: 'external',
    edit: {
      editButtonContent: '',
      saveButtonContent: '',
      cancelButtonContent: '',
      confirmSave: true,
    },
    //,"memo":"","checkNo":"2","checkDate":"2014-09-28T04:00:00.000+0000","swiftCode":null,"pvdate":"2014-09-28T04:00:00.000+0000","cheque":"Cheque"

    actions: { add: false, edit: true, delete: false ,position:'right'},
    columns: {
      pvNo: {
        title: 'PV No',
        type: 'string',
      },
      pvDate: {
        title: 'PV Date',
        type: 'string',
      },
      payeeType: {
        title: 'Payee Type',
        type: 'string',
      },
      printName: {
        title: 'Print Name',
        type: 'string',
      },
      amount: {
        title: 'Amount',
        type: 'number',
        valuePrepareFunction: (amount) => {
          return this.cp.transform(amount);
        }
      },

      memo: {
        title: 'Memo',
        type: 'string',
      },

    },
  };

  constructor(private apiAuth: ApiAuth,private cp: DecimalPipe,private dialogService: NbDialogService) { }

  ngOnInit() {
    this.loadData();
  }

  loadData(): void {
    try
    {
      // console.log("grade>> "+ this.apiParam.grade);
      this.apiAuth.getPettyCashList().subscribe(data => {
        //this.reports=data.result;
        this.source.load(data.result);
      });
    }
    catch (e) {
      console.log(e);
    }
  }

  editRow(event) {
    console.log('event: ', event.data);
    this.dialogService.open(EditPettycashComponent,{
      context: {
        title: 'Petty Cash Info: ' + event.data.pvNo,
        payment: event.data,
      }
    }).onClose.subscribe (wsdata => wsdata && this.checkResult(wsdata));
  }

  checkResult(wsdata){
    console.log(wsdata);
  }

}


ngOnInit() {
    this.loadData();
  }


loadData(): void {
    try
    {
      // console.log("grade>> "+ this.apiParam.grade);
      this.apiAuth.getPettyCashList().subscribe(data => {
        //this.reports=data.result;
        this.source.load(data.result);
      });
    }
    catch (e) {
      console.log(e);
    }
  }


editRow(event) {
    console.log('event: ', event.data);
    this.dialogService.open(EditPettycashComponent,{
      context: {
        title: 'Petty Cash Info: ' + event.data.pvNo,
        payment: event.data,
      }
    }).onClose.subscribe (wsdata => wsdata && this.checkResult(wsdata));
  }


checkResult(wsdata){
    console.log(wsdata);
  }


export class Rook implements Piece {
  white = true;

  constructor(white = true) {
    this.white = white;
  }

  get html(): string {
    return this.white ? '♖' : '♜';
  }

  get symbol(): string {
    return 'r';
  }
}


() =>
      props.type &&
      props.type !== 'default' && (
        <span class


setup(props) {
    const ns = useNamespace('popover');

    return () =>
      props.type &&
      props.type !== 'default' && (
        <span class={ns.e('icon-wrap')}>
          {props.type === 'success' && <SuccessIcon />}
          {props.type === 'warning' && <WarningIcon />}
          {props.type === 'info' && <InfoIcon />}
          {props.type === 'error' && <ErrorIcon />}
        </span>


export function fetchPosts(page: number){
  return async (dispatch: any) => {
    const posts:Array<Item> = await getPosts(page);
    if(posts.length){
      dispatch({ type: FETCH_POSTS, payload: posts });
      dispatch({ type: LOAD_MORE });
    }
  }
}


async (dispatch: any) => {
    const posts:Array<Item> = await getPosts(page);
    if(posts.length){
      dispatch({ type: FETCH_POSTS, payload: posts });
      dispatch({ type: LOAD_MORE });
    }
  }


export interface IcreatePost {
  type: String,
  payload: Object
}


(s: S): S => s.replace(/(_\w)/g, m => m[1].toUpperCase())


m => m[1].toUpperCase()


(a: any): any => {
    const b: any = {}
    for (const k in a) {
      const v = a[k]
      b[snakeToCamel(k)] =
        (v === 'true')
          ? true
          : v === 'false'
            ? false
            : /^\d+$/.test(v)
              ? parseInt(v, 10)
              : v
    }
    return b
  }


(s: S): B => /^\w+$/.test(s)


(v: any, { hash: opts }: any) => {
  opts = kvToOpts(opts)
  const t = opts.type
  return t === 'date'
    ? intl.formatDate(v, opts)
    : t === 'time'
      ? intl.formatTime(v, opts)
      : t === 'number' || typeof v === 'number'
        ? intl.formatNumber(v, opts)
        : v
}


(f: any): B => typeof f === 'string' && f.length > 1 && f.charAt(0) === '=' && f.charAt(1) !== '='


(s: S): [S, HandlebarsTemplateDelegate<any> | undefined] | null => {
    if (!isFormatExpr(s)) return null

    // "=foo"
    s = s.substr(1) // lop off leading '='

    // "foo"
    if (isBareExpr(s)) return [s, undefined]

    // "{{func foo-bar ..."
    const invocation = s.match(/\{\{\s*(\w+)\s+(\S+)/)
    if (invocation) return [invocation[2], compile(s)]

    // "{{foo-bar ..."
    const bare = s.match(/\{\{\s*(\S+)/)
    if (bare) return [bare[1], undefined]

    return null
  }


(s: S): any => Handlebars.compile(s)


(s: S, data: any): S => {
    if (isBareExpr(s)) s = '{{' + s + '}}'
    const t = compile(s)
    return t ? t(data) : s
  }


export type Fmt = (datum: any, value?: any) => S


function ChallengeTitle({
  block,
  children,
  isCompleted,
  superBlock,
  translationPending
}: ChallengeTitleProps): JSX.Element {
  return (
    <div className='challenge-title-wrap'>
      {translationPending && (
        <>
          {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
          {/* @ts-ignore */}
          <Link
            className='title-translation-cta'
            // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
            to={i18next.t('links:help-translate-link-url')}
          >
            {i18next.t('misc.translation-pending')}
          </Link>
        </>
      )}


interface ChallengeTitleProps {
  block: string;
  children: string;
  isCompleted: boolean;
  superBlock: string;
  translationPending: boolean;
}


() => {
	test('empty range', () => {
		let s = new Range(1, 1, 1, 1);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 1);
		assert.equal(s.endColumn, 1);
		assert.equal(s.isEmpty(), true);
	});

	test('swap start and stop same line', () => {
		let s = new Range(1, 2, 1, 1);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 1);
		assert.equal(s.endColumn, 2);
		assert.equal(s.isEmpty(), false);
	});

	test('swap start and stop', () => {
		let s = new Range(2, 1, 1, 2);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 2);
		assert.equal(s.endLineNumber, 2);
		assert.equal(s.endColumn, 1);
		assert.equal(s.isEmpty(), false);
	});

	test('no swap same line', () => {
		let s = new Range(1, 1, 1, 2);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 1);
		assert.equal(s.endColumn, 2);
		assert.equal(s.isEmpty(), false);
	});

	test('no swap', () => {
		let s = new Range(1, 1, 2, 1);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 2);
		assert.equal(s.endColumn, 1);
		assert.equal(s.isEmpty(), false);
	});

	test('compareRangesUsingEnds', () => {
		let a: Range, b: Range;

		a = new Range(1, 1, 1, 3);
		b = new Range(1, 2, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start < b.start, a.end < b.end');

		a = new Range(1, 1, 1, 3);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start = b.start, a.end < b.end');

		a = new Range(1, 2, 1, 3);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start > b.start, a.end < b.end');

		a = new Range(1, 1, 1, 4);
		b = new Range(1, 2, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start < b.start, a.end = b.end');

		a = new Range(1, 1, 1, 4);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) === 0, 'a.start = b.start, a.end = b.end');

		a = new Range(1, 2, 1, 4);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start > b.start, a.end = b.end');

		a = new Range(1, 1, 1, 5);
		b = new Range(1, 2, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start < b.start, a.end > b.end');

		a = new Range(1, 1, 2, 4);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start = b.start, a.end > b.end');

		a = new Range(1, 1, 5, 1);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start = b.start, a.end > b.end');
	});

	test('containsPosition', () => {
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(1, 3)), false);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(2, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(2, 2)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(2, 3)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(3, 1)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(5, 9)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(5, 10)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(5, 11)), false);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(6, 1)), false);
	});

	test('containsRange', () => {
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(1, 3, 2, 2)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 1, 2, 2)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 2, 5, 11)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 2, 6, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(5, 9, 6, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(5, 10, 6, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 2, 5, 10)), true);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 3, 5, 9)), true);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(3, 100, 4, 100)), true);
	});

	test('areIntersecting', () => {
		assert.equal(Range.areIntersecting(new Range(2, 2, 3, 2), new Range(4, 2, 5, 2)), false);
		assert.equal(Range.areIntersecting(new Range(4, 2, 5, 2), new Range(2, 2, 3, 2)), false);
		assert.equal(Range.areIntersecting(new Range(4, 2, 5, 2), new Range(5, 2, 6, 2)), false);
		assert.equal(Range.areIntersecting(new Range(5, 2, 6, 2), new Range(4, 2, 5, 2)), false);
		assert.equal(Range.areIntersecting(new Range(2, 2, 2, 7), new Range(2, 4, 2, 6)), true);
		assert.equal(Range.areIntersecting(new Range(2, 2, 2, 7), new Range(2, 4, 2, 9)), true);
		assert.equal(Range.areIntersecting(new Range(2, 4, 2, 9), new Range(2, 2, 2, 7)), true);
	});
}


() => {
		let s = new Range(1, 1, 1, 1);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 1);
		assert.equal(s.endColumn, 1);
		assert.equal(s.isEmpty(), true);
	}


() => {
		let s = new Range(1, 2, 1, 1);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 1);
		assert.equal(s.endColumn, 2);
		assert.equal(s.isEmpty(), false);
	}


() => {
		let s = new Range(2, 1, 1, 2);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 2);
		assert.equal(s.endLineNumber, 2);
		assert.equal(s.endColumn, 1);
		assert.equal(s.isEmpty(), false);
	}


() => {
		let s = new Range(1, 1, 1, 2);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 1);
		assert.equal(s.endColumn, 2);
		assert.equal(s.isEmpty(), false);
	}


() => {
		let s = new Range(1, 1, 2, 1);
		assert.equal(s.startLineNumber, 1);
		assert.equal(s.startColumn, 1);
		assert.equal(s.endLineNumber, 2);
		assert.equal(s.endColumn, 1);
		assert.equal(s.isEmpty(), false);
	}


() => {
		let a: Range, b: Range;

		a = new Range(1, 1, 1, 3);
		b = new Range(1, 2, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start < b.start, a.end < b.end');

		a = new Range(1, 1, 1, 3);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start = b.start, a.end < b.end');

		a = new Range(1, 2, 1, 3);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start > b.start, a.end < b.end');

		a = new Range(1, 1, 1, 4);
		b = new Range(1, 2, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) < 0, 'a.start < b.start, a.end = b.end');

		a = new Range(1, 1, 1, 4);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) === 0, 'a.start = b.start, a.end = b.end');

		a = new Range(1, 2, 1, 4);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start > b.start, a.end = b.end');

		a = new Range(1, 1, 1, 5);
		b = new Range(1, 2, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start < b.start, a.end > b.end');

		a = new Range(1, 1, 2, 4);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start = b.start, a.end > b.end');

		a = new Range(1, 1, 5, 1);
		b = new Range(1, 1, 1, 4);
		assert.ok(Range.compareRangesUsingEnds(a, b) > 0, 'a.start = b.start, a.end > b.end');
	}


() => {
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(1, 3)), false);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(2, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(2, 2)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(2, 3)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(3, 1)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(5, 9)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(5, 10)), true);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(5, 11)), false);
		assert.equal(new Range(2, 2, 5, 10).containsPosition(new Position(6, 1)), false);
	}


() => {
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(1, 3, 2, 2)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 1, 2, 2)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 2, 5, 11)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 2, 6, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(5, 9, 6, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(5, 10, 6, 1)), false);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 2, 5, 10)), true);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(2, 3, 5, 9)), true);
		assert.equal(new Range(2, 2, 5, 10).containsRange(new Range(3, 100, 4, 100)), true);
	}


() => {
		assert.equal(Range.areIntersecting(new Range(2, 2, 3, 2), new Range(4, 2, 5, 2)), false);
		assert.equal(Range.areIntersecting(new Range(4, 2, 5, 2), new Range(2, 2, 3, 2)), false);
		assert.equal(Range.areIntersecting(new Range(4, 2, 5, 2), new Range(5, 2, 6, 2)), false);
		assert.equal(Range.areIntersecting(new Range(5, 2, 6, 2), new Range(4, 2, 5, 2)), false);
		assert.equal(Range.areIntersecting(new Range(2, 2, 2, 7), new Range(2, 4, 2, 6)), true);
		assert.equal(Range.areIntersecting(new Range(2, 2, 2, 7), new Range(2, 4, 2, 9)), true);
		assert.equal(Range.areIntersecting(new Range(2, 4, 2, 9), new Range(2, 2, 2, 7)), true);
	}


type => Sport


sport => sport.matchs


type => Team


team => team.match


type => Score


score => score.match


type => ScoreVerif


scoreVerif => scoreVerif.match


@Entity("match")
export class Match extends BaseEntity {
    @PrimaryGeneratedColumn()
    public id: number;

    @Column({
        type: "numeric",
        default: 1000
    })
    public ranking: number;

    @ManyToOne(type => Sport, sport => sport.matchs)
    sport: Sport;

    @OneToMany(type => Team, team => team.match, {
        cascade: true
    })
    teams: Team[];

    @Column({
        default: false
    })
    public isFill: boolean;

    @OneToMany(type => Score, score => score.match, {
        cascade: true
    })
    scores: Score[];

    @Column({
        type: "numeric",
        default: 0
    })
    teamCount: number;

    @OneToOne(type => ScoreVerif, scoreVerif => scoreVerif.match, {
        cascade: true
    })
    @JoinColumn()
    scoreVerif: ScoreVerif;
}


/* STATISTICS */
class Statistics {

  item; itemProps; config; tokens;

  constructor () {

    this.item = this._initItem ();
    this.itemProps = {};

    this.update ();

  }

  _initItem () {

    const alignment = Config.getKey ( 'statistics.statusbar.alignment' ) === 'right' ? vscode.StatusBarAlignment.Right : vscode.StatusBarAlignment.Left,
          priority = Config.getKey ( 'statistics.statusbar.priority' );

    return vscode.window.createStatusBarItem ( alignment, priority );

  }

  _setItemProp ( prop, value, _set = true ) {

    if ( this.itemProps[prop] === value ) return false;

    this.itemProps[prop] = value;

    if ( _set ) {

      this.item[prop] = value;

    }

    return true;

  }

  update () {

    this.config = Config.get ();
    this.tokens = Utils.statistics.tokens.global;

    this.updateVisibility ();

    if ( !this.itemProps.visibility ) return;

    this.updateColor ();
    this.updateCommand ();
    this.updateTooltip ();
    this.updateText ();

  }

  updateColor () {

    const {color} = this.config.statistics.statusbar;

    this._setItemProp ( 'color', color );

  }

  updateCommand () {

    const {command} = this.config.statistics.statusbar;

    this._setItemProp ( 'command', command );

  }

  updateTooltip () {

    let template = this.config.statistics.statusbar.tooltip,
        tooltip = Utils.statistics.template.render ( template, this.tokens );

    if ( !tooltip ) return;

    this._setItemProp ( 'tooltip', tooltip );

  }

  updateText () {

    let template = this.config.statistics.statusbar.text,
        text = Utils.statistics.template.render ( template, this.tokens );

    if ( !text ) return;

    this._setItemProp ( 'text', text );

  }

  updateVisibility () {

    const condition = this.config.statistics.statusbar.enabled,
          visibility = Utils.editor.isSupported ( vscode.window.activeTextEditor ) && Utils.statistics.condition.is ( condition, this.tokens, undefined );

    if ( this._setItemProp ( 'visibility', visibility ) ) {

      this.item[visibility ? 'show' : 'hide']();

    }

  }

}


_initItem () {

    const alignment = Config.getKey ( 'statistics.statusbar.alignment' ) === 'right' ? vscode.StatusBarAlignment.Right : vscode.StatusBarAlignment.Left,
          priority = Config.getKey ( 'statistics.statusbar.priority' );

    return vscode.window.createStatusBarItem ( alignment, priority );

  }


_setItemProp ( prop, value, _set = true ) {

    if ( this.itemProps[prop] === value ) return false;

    this.itemProps[prop] = value;

    if ( _set ) {

      this.item[prop] = value;

    }

    return true;

  }


update () {

    this.config = Config.get ();
    this.tokens = Utils.statistics.tokens.global;

    this.updateVisibility ();

    if ( !this.itemProps.visibility ) return;

    this.updateColor ();
    this.updateCommand ();
    this.updateTooltip ();
    this.updateText ();

  }


updateColor () {

    const {color} = this.config.statistics.statusbar;

    this._setItemProp ( 'color', color );

  }


updateCommand () {

    const {command} = this.config.statistics.statusbar;

    this._setItemProp ( 'command', command );

  }


updateTooltip () {

    let template = this.config.statistics.statusbar.tooltip,
        tooltip = Utils.statistics.template.render ( template, this.tokens );

    if ( !tooltip ) return;

    this._setItemProp ( 'tooltip', tooltip );

  }


updateText () {

    let template = this.config.statistics.statusbar.text,
        text = Utils.statistics.template.render ( template, this.tokens );

    if ( !text ) return;

    this._setItemProp ( 'text', text );

  }


updateVisibility () {

    const condition = this.config.statistics.statusbar.enabled,
          visibility = Utils.editor.isSupported ( vscode.window.activeTextEditor ) && Utils.statistics.condition.is ( condition, this.tokens, undefined );

    if ( this._setItemProp ( 'visibility', visibility ) ) {

      this.item[visibility ? 'show' : 'hide']();

    }

  }


(predeterminado: 22555 or testnet: 44555)


/**
* A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.
*/
export class V1TopologySelectorLabelRequirement {
    /**
    * The label key that the selector applies to.
    */
    'key': string;
    /**
    * An array of string values. One value must match the label to be selected. Each entry in Values is ORed.
    */
    'values': Array<string>;

    static discriminator: string | undefined = undefined;

    static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
        {
            "name": "key",
            "baseName": "key",
            "type": "string"
        },
        {
            "name": "values",
            "baseName": "values",
            "type": "Array<string>"
        }    ];

    static getAttributeTypeMap() {
        return V1TopologySelectorLabelRequirement.attributeTypeMap;
    }
}


static getAttributeTypeMap() {
        return V1TopologySelectorLabelRequirement.attributeTypeMap;
    }


@Controller('storage')
export class StorageController {
  constructor(private readonly storageService: StorageService) {}

  @ApiResponse({ status: HttpStatus.CREATED })
  @UseGuards(AuthGuard('jwt'))
  @HttpCode(HttpStatus.OK)
  @Post('token')
  token(@Body() fileInfo: ReqPresignedPostDto) {
    return this.storageService.createSignedUrl(fileInfo.key, fileInfo.contentType)
  }
}


@ApiResponse({ status: HttpStatus.CREATED })
  @UseGuards(AuthGuard('jwt'))
  @HttpCode(HttpStatus.OK)
  @Post('token')
  token(@Body() fileInfo: ReqPresignedPostDto) {
    return this.storageService.createSignedUrl(fileInfo.key, fileInfo.contentType)
  }


(item) => {
        return {
            label: item.name + item.id,
            value: item,
            triggerValue: '( ' + item.id + ' )',
            disabled: item.id === 'B' ? true : false,
            icon: ''
        };
    }


export class Fruit {
    id: string;
    name: string;
    age: number;

    constructor(id: string, name: string, age: number) {
        this.id = id;
        this.name = name;
        this.age = age;
    }
}


@Component({
    selector: 'fdp-select-types-noborder-example',
    templateUrl: './platform-select-types-noborder-example.component.html'
})
export class PlatformSelectTypesNoBorderExampleComponent implements OnInit {
    selectedValue: string;

    userList = [
        new Fruit('A', 'Apple', 10),
        new Fruit('B', 'orange', 70),
        new Fruit('C', 'Plums', 10),
        new Fruit('D', 'pineapple', 11),
        new Fruit('E', 'watermelon', 10)
    ];
    option = this.userList.map<SelectItem>((item) => {
        return {
            label: item.name + item.id,
            value: item,
            triggerValue: '( ' + item.id + ' )',
            disabled: item.id === 'B' ? true : false,
            icon: ''
        };
    });

    constructor() {}

    ngOnInit() {}
}


/**
   * Drive Activity API
   *
   * Provides a historical view of activity in Google Drive.
   *
   * @example
   * ```js
   * const {google} = require('googleapis');
   * const driveactivity = google.driveactivity('v2');
   * ```
   */
export class Driveactivity {
    context: APIRequestContext;
    activity: Resource$Activity;

    constructor(options: GlobalOptions, google?: GoogleConfigurable) {
      this.context = {
        _options: options || {},
        google,
      };

      this.activity = new Resource$Activity(this.context);
    }
  }


export class Resource$Activity {
    context: APIRequestContext;
    constructor(context: APIRequestContext) {
      this.context = context;
    }

    /**
     * Query past activity in Google Drive.
     * @example
     * ```js
     * // Before running the sample:
     * // - Enable the API at:
     * //   https://console.developers.google.com/apis/api/driveactivity.googleapis.com
     * // - Login into gcloud by running:
     * //   `$ gcloud auth application-default login`
     * // - Install the npm module by running:
     * //   `$ npm install googleapis`
     *
     * const {google} = require('googleapis');
     * const driveactivity = google.driveactivity('v2');
     *
     * async function main() {
     *   const auth = new google.auth.GoogleAuth({
     *     // Scopes can be specified either as an array or as a single, space-delimited string.
     *     scopes: [
     *       'https://www.googleapis.com/auth/drive.activity',
     *       'https://www.googleapis.com/auth/drive.activity.readonly',
     *     ],
     *   });
     *
     *   // Acquire an auth client, and bind it to all future calls
     *   const authClient = await auth.getClient();
     *   google.options({auth: authClient});
     *
     *   // Do the magic
     *   const res = await driveactivity.activity.query({
     *     // Request body metadata
     *     requestBody: {
     *       // request body parameters
     *       // {
     *       //   "ancestorName": "my_ancestorName",
     *       //   "consolidationStrategy": {},
     *       //   "filter": "my_filter",
     *       //   "itemName": "my_itemName",
     *       //   "pageSize": 0,
     *       //   "pageToken": "my_pageToken"
     *       // }
     *     },
     *   });
     *   console.log(res.data);
     *
     *   // Example response
     *   // {
     *   //   "activities": [],
     *   //   "nextPageToken": "my_nextPageToken"
     *   // }
     * }
     *
     * main().catch(e => {
     *   console.error(e);
     *   throw e;
     * });
     *
     * ```
     *
     * @param params - Parameters for request
     * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param callback - Optional callback that handles the response.
     * @returns A promise if used with async/await, or void if used with a callback.
     */
    query(
      params: Params$Resource$Activity$Query,
      options: StreamMethodOptions
    ): GaxiosPromise<Readable>;
    query(
      params?: Params$Resource$Activity$Query,
      options?: MethodOptions
    ): GaxiosPromise<Schema$QueryDriveActivityResponse>;
    query(
      params: Params$Resource$Activity$Query,
      options: StreamMethodOptions | BodyResponseCallback<Readable>,
      callback: BodyResponseCallback<Readable>
    ): void;
    query(
      params: Params$Resource$Activity$Query,
      options:
        | MethodOptions
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>,
      callback: BodyResponseCallback<Schema$QueryDriveActivityResponse>
    ): void;
    query(
      params: Params$Resource$Activity$Query,
      callback: BodyResponseCallback<Schema$QueryDriveActivityResponse>
    ): void;
    query(
      callback: BodyResponseCallback<Schema$QueryDriveActivityResponse>
    ): void;
    query(
      paramsOrCallback?:
        | Params$Resource$Activity$Query
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>
        | BodyResponseCallback<Readable>,
      optionsOrCallback?:
        | MethodOptions
        | StreamMethodOptions
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>
        | BodyResponseCallback<Readable>,
      callback?:
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>
        | BodyResponseCallback<Readable>
    ):
      | void
      | GaxiosPromise<Schema$QueryDriveActivityResponse>
      | GaxiosPromise<Readable> {
      let params = (paramsOrCallback || {}) as Params$Resource$Activity$Query;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Activity$Query;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl =
        options.rootUrl || 'https://driveactivity.googleapis.com/';
      const parameters = {
        options: Object.assign(
          {
            url: (rootUrl + '/v2/activity:query').replace(/([^:]\/)\/+/g, '$1'),
            method: 'POST',
          },
          options
        ),
        params,
        requiredParams: [],
        pathParams: [],
        context: this.context,
      };
      if (callback) {
        createAPIRequest<Schema$QueryDriveActivityResponse>(
          parameters,
          callback as BodyResponseCallback<unknown>
        );
      } else {
        return createAPIRequest<Schema$QueryDriveActivityResponse>(parameters);
      }
    }
  }


export interface Options extends GlobalOptions {
    version: 'v2';
  }


/**
   * Information about the action.
   */
export interface Schema$Action {
    /**
     * The actor responsible for this action (or empty if all actors are responsible).
     */
    actor?: Schema$Actor;
    /**
     * The type and detailed information about the action.
     */
    detail?: Schema$ActionDetail;
    /**
     * The target this action affects (or empty if affecting all targets). This represents the state of the target immediately after this action occurred.
     */
    target?: Schema$Target;
    /**
     * The action occurred over this time range.
     */
    timeRange?: Schema$TimeRange;
    /**
     * The action occurred at this specific time.
     */
    timestamp?: string | null;
  }


/**
   * Data describing the type and additional information of an action.
   */
export interface Schema$ActionDetail {
    /**
     * A change about comments was made.
     */
    comment?: Schema$Comment;
    /**
     * An object was created.
     */
    create?: Schema$Create;
    /**
     * An object was deleted.
     */
    delete?: Schema$Delete;
    /**
     * A change happened in data leak prevention status.
     */
    dlpChange?: Schema$DataLeakPreventionChange;
    /**
     * An object was edited.
     */
    edit?: Schema$Edit;
    /**
     * An object was moved.
     */
    move?: Schema$Move;
    /**
     * The permission on an object was changed.
     */
    permissionChange?: Schema$PermissionChange;
    /**
     * An object was referenced in an application outside of Drive/Docs.
     */
    reference?: Schema$ApplicationReference;
    /**
     * An object was renamed.
     */
    rename?: Schema$Rename;
    /**
     * A deleted object was restored.
     */
    restore?: Schema$Restore;
    /**
     * Settings were changed.
     */
    settingsChange?: Schema$SettingsChange;
  }


/**
   * The actor of a Drive activity.
   */
export interface Schema$Actor {
    /**
     * An administrator.
     */
    administrator?: Schema$Administrator;
    /**
     * An anonymous user.
     */
    anonymous?: Schema$AnonymousUser;
    /**
     * An account acting on behalf of another.
     */
    impersonation?: Schema$Impersonation;
    /**
     * A non-user actor (i.e. system triggered).
     */
    system?: Schema$SystemEvent;
    /**
     * An end user.
     */
    user?: Schema$User;
  }


/**
   * Empty message representing an administrator.
   */
export interface Schema$Administrator {}


/**
   * Empty message representing an anonymous user or indicating the authenticated user should be anonymized.
   */
export interface Schema$AnonymousUser {}


/**
   * Represents any user (including a logged out user).
   */
export interface Schema$Anyone {}


/**
   * Activity in applications other than Drive.
   */
export interface Schema$ApplicationReference {
    /**
     * The reference type corresponding to this event.
     */
    type?: string | null;
  }


/**
   * A comment with an assignment.
   */
export interface Schema$Assignment {
    /**
     * The user to whom the comment was assigned.
     */
    assignedUser?: Schema$User;
    /**
     * The sub-type of this event.
     */
    subtype?: string | null;
  }


/**
   * A change about comments on an object.
   */
export interface Schema$Comment {
    /**
     * A change on an assignment.
     */
    assignment?: Schema$Assignment;
    /**
     * Users who are mentioned in this comment.
     */
    mentionedUsers?: Schema$User[];
    /**
     * A change on a regular posted comment.
     */
    post?: Schema$Post;
    /**
     * A change on a suggestion.
     */
    suggestion?: Schema$Suggestion;
  }


/**
   * How the individual activities are consolidated. A set of activities may be consolidated into one combined activity if they are related in some way, such as one actor performing the same action on multiple targets, or multiple actors performing the same action on a single target. The strategy defines the rules for which activities are related.
   */
export interface Schema$ConsolidationStrategy {
    /**
     * The individual activities are consolidated using the legacy strategy.
     */
    legacy?: Schema$Legacy;
    /**
     * The individual activities are not consolidated.
     */
    none?: Schema$NoConsolidation;
  }


/**
   * An object was created by copying an existing object.
   */
export interface Schema$Copy {
    /**
     * The the original object.
     */
    originalObject?: Schema$TargetReference;
  }


/**
   * An object was created.
   */
export interface Schema$Create {
    /**
     * If present, indicates the object was created by copying an existing Drive object.
     */
    copy?: Schema$Copy;
    /**
     * If present, indicates the object was newly created (e.g. as a blank document), not derived from a Drive object or external object.
     */
    new?: Schema$New;
    /**
     * If present, indicates the object originated externally and was uploaded to Drive.
     */
    upload?: Schema$Upload;
  }


/**
   * A change in the object's data leak prevention status.
   */
export interface Schema$DataLeakPreventionChange {
    /**
     * The type of Data Leak Prevention (DLP) change.
     */
    type?: string | null;
  }


/**
   * An object was deleted.
   */
export interface Schema$Delete {
    /**
     * The type of delete action taken.
     */
    type?: string | null;
  }


/**
   * A user whose account has since been deleted.
   */
export interface Schema$DeletedUser {}


/**
   * Information about a domain.
   */
export interface Schema$Domain {
    /**
     * An opaque string used to identify this domain.
     */
    legacyId?: string | null;
    /**
     * The name of the domain, e.g. "google.com".
     */
    name?: string | null;
  }


/**
   * Information about a shared drive.
   */
export interface Schema$Drive {
    /**
     * The resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID". Clients should not assume a specific collection ID for this resource name.
     */
    name?: string | null;
    /**
     * The root of this shared drive.
     */
    root?: Schema$DriveItem;
    /**
     * The title of the shared drive.
     */
    title?: string | null;
  }


/**
   * A single Drive activity comprising one or more Actions by one or more Actors on one or more Targets. Some Action groupings occur spontaneously, such as moving an item into a shared folder triggering a permission change. Other groupings of related Actions, such as multiple Actors editing one item or moving multiple files into a new folder, are controlled by the selection of a ConsolidationStrategy in the QueryDriveActivityRequest.
   */
export interface Schema$DriveActivity {
    /**
     * Details on all actions in this activity.
     */
    actions?: Schema$Action[];
    /**
     * All actor(s) responsible for the activity.
     */
    actors?: Schema$Actor[];
    /**
     * Key information about the primary action for this activity. This is either representative, or the most important, of all actions in the activity, according to the ConsolidationStrategy in the request.
     */
    primaryActionDetail?: Schema$ActionDetail;
    /**
     * All Google Drive objects this activity is about (e.g. file, folder, drive). This represents the state of the target immediately after the actions occurred.
     */
    targets?: Schema$Target[];
    /**
     * The activity occurred over this time range.
     */
    timeRange?: Schema$TimeRange;
    /**
     * The activity occurred at this specific time.
     */
    timestamp?: string | null;
  }


/**
   * A Drive item which is a file.
   */
export interface Schema$DriveFile {}


/**
   * A Drive item which is a folder.
   */
export interface Schema$DriveFolder {
    /**
     * The type of Drive folder.
     */
    type?: string | null;
  }


/**
   * A Drive item, such as a file or folder.
   */
export interface Schema$DriveItem {
    /**
     * The Drive item is a file.
     */
    driveFile?: Schema$DriveFile;
    /**
     * The Drive item is a folder. Includes information about the type of folder.
     */
    driveFolder?: Schema$DriveFolder;
    /**
     * This field is deprecated; please use the `driveFile` field instead.
     */
    file?: Schema$File;
    /**
     * This field is deprecated; please use the `driveFolder` field instead.
     */
    folder?: Schema$Folder;
    /**
     * The MIME type of the Drive item. See https://developers.google.com/drive/v3/web/mime-types.
     */
    mimeType?: string | null;
    /**
     * The target Drive item. The format is "items/ITEM_ID".
     */
    name?: string | null;
    /**
     * Information about the owner of this Drive item.
     */
    owner?: Schema$Owner;
    /**
     * The title of the Drive item.
     */
    title?: string | null;
  }


/**
   * A lightweight reference to a Drive item, such as a file or folder.
   */
export interface Schema$DriveItemReference {
    /**
     * The Drive item is a file.
     */
    driveFile?: Schema$DriveFile;
    /**
     * The Drive item is a folder. Includes information about the type of folder.
     */
    driveFolder?: Schema$DriveFolder;
    /**
     * This field is deprecated; please use the `driveFile` field instead.
     */
    file?: Schema$File;
    /**
     * This field is deprecated; please use the `driveFolder` field instead.
     */
    folder?: Schema$Folder;
    /**
     * The target Drive item. The format is "items/ITEM_ID".
     */
    name?: string | null;
    /**
     * The title of the Drive item.
     */
    title?: string | null;
  }


/**
   * A lightweight reference to a shared drive.
   */
export interface Schema$DriveReference {
    /**
     * The resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID". Clients should not assume a specific collection ID for this resource name.
     */
    name?: string | null;
    /**
     * The title of the shared drive.
     */
    title?: string | null;
  }


/**
   * An empty message indicating an object was edited.
   */
export interface Schema$Edit {}


/**
   * This item is deprecated; please see `DriveFile` instead.
   */
export interface Schema$File {}


/**
   * A comment on a file.
   */
export interface Schema$FileComment {
    /**
     * The comment in the discussion thread. This identifier is an opaque string compatible with the Drive API; see https://developers.google.com/drive/v3/reference/comments/get
     */
    legacyCommentId?: string | null;
    /**
     * The discussion thread to which the comment was added. This identifier is an opaque string compatible with the Drive API and references the first comment in a discussion; see https://developers.google.com/drive/v3/reference/comments/get
     */
    legacyDiscussionId?: string | null;
    /**
     * The link to the discussion thread containing this comment, for example, "https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID".
     */
    linkToDiscussion?: string | null;
    /**
     * The Drive item containing this comment.
     */
    parent?: Schema$DriveItem;
  }


/**
   * This item is deprecated; please see `DriveFolder` instead.
   */
export interface Schema$Folder {
    /**
     * This field is deprecated; please see `DriveFolder.type` instead.
     */
    type?: string | null;
  }


/**
   * Information about a group.
   */
export interface Schema$Group {
    /**
     * The email address of the group.
     */
    email?: string | null;
    /**
     * The title of the group.
     */
    title?: string | null;
  }


/**
   * Information about an impersonation, where an admin acts on behalf of an end user. Information about the acting admin is not currently available.
   */
export interface Schema$Impersonation {
    /**
     * The impersonated user.
     */
    impersonatedUser?: Schema$User;
  }


/**
   * A known user.
   */
export interface Schema$KnownUser {
    /**
     * True if this is the user making the request.
     */
    isCurrentUser?: boolean | null;
    /**
     * The identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID". See https://developers.google.com/people/.
     */
    personName?: string | null;
  }


/**
   * A strategy which consolidates activities using the grouping rules from the legacy V1 Activity API. Similar actions occurring within a window of time can be grouped across multiple targets (such as moving a set of files at once) or multiple actors (such as several users editing the same item). Grouping rules for this strategy are specific to each type of action.
   */
export interface Schema$Legacy {}


/**
   * An object was moved.
   */
export interface Schema$Move {
    /**
     * The added parent object(s).
     */
    addedParents?: Schema$TargetReference[];
    /**
     * The removed parent object(s).
     */
    removedParents?: Schema$TargetReference[];
  }


/**
   * An object was created from scratch.
   */
export interface Schema$New {}


/**
   * A strategy which does no consolidation of individual activities.
   */
export interface Schema$NoConsolidation {}


/**
   * Information about the owner of a Drive item.
   */
export interface Schema$Owner {
    /**
     * The domain of the Drive item owner.
     */
    domain?: Schema$Domain;
    /**
     * The drive that owns the item.
     */
    drive?: Schema$DriveReference;
    /**
     * This field is deprecated; please use the `drive` field instead.
     */
    teamDrive?: Schema$TeamDriveReference;
    /**
     * The user that owns the Drive item.
     */
    user?: Schema$User;
  }


/**
   * The permission setting of an object.
   */
export interface Schema$Permission {
    /**
     * If true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item.
     */
    allowDiscovery?: boolean | null;
    /**
     * If set, this permission applies to anyone, even logged out users.
     */
    anyone?: Schema$Anyone;
    /**
     * The domain to whom this permission applies.
     */
    domain?: Schema$Domain;
    /**
     * The group to whom this permission applies.
     */
    group?: Schema$Group;
    /**
     * Indicates the Google Drive permissions role. The role determines a user's ability to read, write, and comment on items.
     */
    role?: string | null;
    /**
     * The user to whom this permission applies.
     */
    user?: Schema$User;
  }


/**
   * A change of the permission setting on an item.
   */
export interface Schema$PermissionChange {
    /**
     * The set of permissions added by this change.
     */
    addedPermissions?: Schema$Permission[];
    /**
     * The set of permissions removed by this change.
     */
    removedPermissions?: Schema$Permission[];
  }


/**
   * A regular posted comment.
   */
export interface Schema$Post {
    /**
     * The sub-type of this event.
     */
    subtype?: string | null;
  }


/**
   * The request message for querying Drive activity.
   */
export interface Schema$QueryDriveActivityRequest {
    /**
     * Return activities for this Drive folder and all children and descendants. The format is "items/ITEM_ID".
     */
    ancestorName?: string | null;
    /**
     * Details on how to consolidate related actions that make up the activity. If not set, then related actions are not consolidated.
     */
    consolidationStrategy?: Schema$ConsolidationStrategy;
    /**
     * The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the form "field operator value". Supported fields: - time: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - time \> 1452409200000 AND time <= 1492812924310 - time \>= "2016-01-10T01:02:03-05:00" - detail.action_detail_case: Uses the "has" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses. Examples: - detail.action_detail_case: RENAME - detail.action_detail_case:(CREATE EDIT) - -detail.action_detail_case:MOVE
     */
    filter?: string | null;
    /**
     * Return activities for this Drive item. The format is "items/ITEM_ID".
     */
    itemName?: string | null;
    /**
     * The miminum number of activities desired in the response; the server will attempt to return at least this quanitity. The server may also return fewer activities if it has a partial response ready before the request times out. If not set, a default value is used.
     */
    pageSize?: number | null;
    /**
     * The token identifying which page of results to return. Set this to the next_page_token value returned from a previous query to obtain the following page of results. If not set, the first page of results will be returned.
     */
    pageToken?: string | null;
  }


/**
   * Response message for querying Drive activity.
   */
export interface Schema$QueryDriveActivityResponse {
    /**
     * List of activity requested.
     */
    activities?: Schema$DriveActivity[];
    /**
     * Token to retrieve the next page of results, or empty if there are no more results in the list.
     */
    nextPageToken?: string | null;
  }


/**
   * An object was renamed.
   */
export interface Schema$Rename {
    /**
     * The new title of the drive object.
     */
    newTitle?: string | null;
    /**
     * The previous title of the drive object.
     */
    oldTitle?: string | null;
  }


/**
   * A deleted object was restored.
   */
export interface Schema$Restore {
    /**
     * The type of restore action taken.
     */
    type?: string | null;
  }


/**
   * Information about restriction policy changes to a feature.
   */
export interface Schema$RestrictionChange {
    /**
     * The feature which had a change in restriction policy.
     */
    feature?: string | null;
    /**
     * The restriction in place after the change.
     */
    newRestriction?: string | null;
  }


/**
   * Information about settings changes.
   */
export interface Schema$SettingsChange {
    /**
     * The set of changes made to restrictions.
     */
    restrictionChanges?: Schema$RestrictionChange[];
  }


/**
   * A suggestion.
   */
export interface Schema$Suggestion {
    /**
     * The sub-type of this event.
     */
    subtype?: string | null;
  }


/**
   * Event triggered by system operations instead of end users.
   */
export interface Schema$SystemEvent {
    /**
     * The type of the system event that may triggered activity.
     */
    type?: string | null;
  }


/**
   * Information about the target of activity.
   */
export interface Schema$Target {
    /**
     * The target is a shared drive.
     */
    drive?: Schema$Drive;
    /**
     * The target is a Drive item.
     */
    driveItem?: Schema$DriveItem;
    /**
     * The target is a comment on a Drive file.
     */
    fileComment?: Schema$FileComment;
    /**
     * This field is deprecated; please use the `drive` field instead.
     */
    teamDrive?: Schema$TeamDrive;
  }


/**
   * A lightweight reference to the target of activity.
   */
export interface Schema$TargetReference {
    /**
     * The target is a shared drive.
     */
    drive?: Schema$DriveReference;
    /**
     * The target is a Drive item.
     */
    driveItem?: Schema$DriveItemReference;
    /**
     * This field is deprecated; please use the `drive` field instead.
     */
    teamDrive?: Schema$TeamDriveReference;
  }


/**
   * This item is deprecated; please see `Drive` instead.
   */
export interface Schema$TeamDrive {
    /**
     * This field is deprecated; please see `Drive.name` instead.
     */
    name?: string | null;
    /**
     * This field is deprecated; please see `Drive.root` instead.
     */
    root?: Schema$DriveItem;
    /**
     * This field is deprecated; please see `Drive.title` instead.
     */
    title?: string | null;
  }


/**
   * This item is deprecated; please see `DriveReference` instead.
   */
export interface Schema$TeamDriveReference {
    /**
     * This field is deprecated; please see `DriveReference.name` instead.
     */
    name?: string | null;
    /**
     * This field is deprecated; please see `DriveReference.title` instead.
     */
    title?: string | null;
  }


/**
   * Information about time ranges.
   */
export interface Schema$TimeRange {
    /**
     * The end of the time range.
     */
    endTime?: string | null;
    /**
     * The start of the time range.
     */
    startTime?: string | null;
  }


/**
   * A user about whom nothing is currently known.
   */
export interface Schema$UnknownUser {}


/**
   * An object was uploaded into Drive.
   */
export interface Schema$Upload {}


/**
   * Information about an end user.
   */
export interface Schema$User {
    /**
     * A user whose account has since been deleted.
     */
    deletedUser?: Schema$DeletedUser;
    /**
     * A known user.
     */
    knownUser?: Schema$KnownUser;
    /**
     * A user about whom nothing is currently known.
     */
    unknownUser?: Schema$UnknownUser;
  }


export interface Params$Resource$Activity$Query extends StandardParameters {
    /**
     * Request body metadata
     */
    requestBody?: Schema$QueryDriveActivityRequest;
  }


/**
     * Query past activity in Google Drive.
     * @example
     * ```js
     * // Before running the sample:
     * // - Enable the API at:
     * //   https://console.developers.google.com/apis/api/driveactivity.googleapis.com
     * // - Login into gcloud by running:
     * //   `$ gcloud auth application-default login`
     * // - Install the npm module by running:
     * //   `$ npm install googleapis`
     *
     * const {google} = require('googleapis');
     * const driveactivity = google.driveactivity('v2');
     *
     * async function main() {
     *   const auth = new google.auth.GoogleAuth({
     *     // Scopes can be specified either as an array or as a single, space-delimited string.
     *     scopes: [
     *       'https://www.googleapis.com/auth/drive.activity',
     *       'https://www.googleapis.com/auth/drive.activity.readonly',
     *     ],
     *   });
     *
     *   // Acquire an auth client, and bind it to all future calls
     *   const authClient = await auth.getClient();
     *   google.options({auth: authClient});
     *
     *   // Do the magic
     *   const res = await driveactivity.activity.query({
     *     // Request body metadata
     *     requestBody: {
     *       // request body parameters
     *       // {
     *       //   "ancestorName": "my_ancestorName",
     *       //   "consolidationStrategy": {},
     *       //   "filter": "my_filter",
     *       //   "itemName": "my_itemName",
     *       //   "pageSize": 0,
     *       //   "pageToken": "my_pageToken"
     *       // }
     *     },
     *   });
     *   console.log(res.data);
     *
     *   // Example response
     *   // {
     *   //   "activities": [],
     *   //   "nextPageToken": "my_nextPageToken"
     *   // }
     * }
     *
     * main().catch(e => {
     *   console.error(e);
     *   throw e;
     * });
     *
     * ```
     *
     * @param params - Parameters for request
     * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
     * @param callback - Optional callback that handles the response.
     * @returns A promise if used with async/await, or void if used with a callback.
     */
query(
      params: Params$Resource$Activity$Query,
      options: StreamMethodOptions
    ): GaxiosPromise<Readable>;


query(
      params?: Params$Resource$Activity$Query,
      options?: MethodOptions
    ): GaxiosPromise<Schema$QueryDriveActivityResponse>;


query(
      params: Params$Resource$Activity$Query,
      options: StreamMethodOptions | BodyResponseCallback<Readable>,
      callback: BodyResponseCallback<Readable>
    ): void;


query(
      params: Params$Resource$Activity$Query,
      options:
        | MethodOptions
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>,
      callback: BodyResponseCallback<Schema$QueryDriveActivityResponse>
    ): void;


query(
      params: Params$Resource$Activity$Query,
      callback: BodyResponseCallback<Schema$QueryDriveActivityResponse>
    ): void;


query(
      callback: BodyResponseCallback<Schema$QueryDriveActivityResponse>
    ): void;


query(
      paramsOrCallback?:
        | Params$Resource$Activity$Query
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>
        | BodyResponseCallback<Readable>,
      optionsOrCallback?:
        | MethodOptions
        | StreamMethodOptions
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>
        | BodyResponseCallback<Readable>,
      callback?:
        | BodyResponseCallback<Schema$QueryDriveActivityResponse>
        | BodyResponseCallback<Readable>
    ):
      | void
      | GaxiosPromise<Schema$QueryDriveActivityResponse>
      | GaxiosPromise<Readable> {
      let params = (paramsOrCallback || {}) as Params$Resource$Activity$Query;
      let options = (optionsOrCallback || {}) as MethodOptions;

      if (typeof paramsOrCallback === 'function') {
        callback = paramsOrCallback;
        params = {} as Params$Resource$Activity$Query;
        options = {};
      }

      if (typeof optionsOrCallback === 'function') {
        callback = optionsOrCallback;
        options = {};
      }

      const rootUrl =
        options.rootUrl || 'https://driveactivity.googleapis.com/';
      const parameters = {
        options: Object.assign(
          {
            url: (rootUrl + '/v2/activity:query').replace(/([^:]\/)\/+/g, '$1'),
            method: 'POST',
          },
          options
        ),
        params,
        requiredParams: [],
        pathParams: [],
        context: this.context,
      };
      if (callback) {
        createAPIRequest<Schema$QueryDriveActivityResponse>(
          parameters,
          callback as BodyResponseCallback<unknown>
        );
      } else {
        return createAPIRequest<Schema$QueryDriveActivityResponse>(parameters);
      }
    }


({ children }: BlogLayoutProps) => {
  return (

      <Toaster />

          <Link
            to={routes.blogs()}
            className="rw-link"
          >
            Blogs
          </Link>

        <Link
          to={routes.newBlog()}
          className="rw-button rw-button-green"
        >

+
 New Blog
        </Link>

      {children}


type BlogLayoutProps = {
  children: React.ReactNode
}


data => {
        console.log(data);
        if (data.loading === false) {
          this.usersData = data.data.users;
        }

      }


(prev, {subscriptionData}) => {
        if (!subscriptionData.data) {
          return prev;
        }

        console.log('yas');

        const newUserItem = subscriptionData.data.userSubscription;
        return Object.assign({}, prev, {
          users: [...prev['users'], newUserItem.node]
        });
      }


@Component({
  selector: 'app-home',
  template: `

  <ul>
    <li *ngFor="let item of usersData">
        {{ item.firstname }}
    </li>
  </ul>

  `,
  styles: []
})
export class HomeComponent implements OnInit {

  usersQuery: QueryRef<any>;
  users: Observable<any>;
  params: any;

  usersData: any;

  constructor(
    private apollo: Apollo
  ) { }

  ngOnInit() {
    this.usersQuery = this.apollo.watchQuery({
      query: USER_QUERY
    });

    this.usersQuery.valueChanges.subscribe(
      data => {
        console.log(data);
        if (data.loading === false) {
          this.usersData = data.data.users;
        }

      });

    this.subscribeToNewUsers();

  }

  subscribeToNewUsers() {
    this.usersQuery.subscribeToMore({
      document: USER_SUBSCRIPTION,
      variables: {},
      updateQuery: (prev, {subscriptionData}) => {
        if (!subscriptionData.data) {
          return prev;
        }

        console.log('yas');

        const newUserItem = subscriptionData.data.userSubscription;
        return Object.assign({}, prev, {
          users: [...prev['users'], newUserItem.node]
        });
      }
    });
  }

}


ngOnInit() {
    this.usersQuery = this.apollo.watchQuery({
      query: USER_QUERY
    });

    this.usersQuery.valueChanges.subscribe(
      data => {
        console.log(data);
        if (data.loading === false) {
          this.usersData = data.data.users;
        }

      });

    this.subscribeToNewUsers();

  }


subscribeToNewUsers() {
    this.usersQuery.subscribeToMore({
      document: USER_SUBSCRIPTION,
      variables: {},
      updateQuery: (prev, {subscriptionData}) => {
        if (!subscriptionData.data) {
          return prev;
        }

        console.log('yas');

        const newUserItem = subscriptionData.data.userSubscription;
        return Object.assign({}, prev, {
          users: [...prev['users'], newUserItem.node]
        });
      }
    });
  }


/**
 * Generated class for the VideoPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */
@IonicPage()
@Component({
  selector: 'page-video',
  templateUrl: 'video.html',
})
export class VideoPage {

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad VideoPage');
  }

}


ionViewDidLoad() {
    console.log('ionViewDidLoad VideoPage');
  }


function* generateRange() {
    let x = start - step
    while (x < end - step) yield (x += step)
  }


(stop: number, start = 0, step = 1): Array<number> =>
  Array(Math.ceil((stop - start) / step))
    .fill(start)
    .map((x, y) => x + y * step)


(x, y) => x + y * step


(end: number, start = 0, step = 1) => {
  function* generateRange() {
    let x = start - step
    while (x < end - step) yield (x += step)
  }
  return {
    [Symbol.iterator]: generateRange,
  }
}


@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class PagesRoutingModule {
}


function monitorWindowResize () {
      // I can't use forwardref in class based components
      // Header still is a class component
      // FIXME: use a forwardRef when available
      const header = headerRef.current.headerRef

      function onWindowResize () {
        state.updateWindowDimensions({
          windowWidth: window.innerWidth,
          windowHeight: window.innerHeight,
        })
      }

      window.addEventListener('resize', debounce(onWindowResize))
      window.dispatchEvent(new Event('resize'))
    }


function onWindowResize () {
        state.updateWindowDimensions({
          windowWidth: window.innerWidth,
          windowHeight: window.innerHeight,
        })
      }


function onNavItemClick (index: number) {
      if (activeIndex !== index) {
        return setActiveIndex(index)
      }

      setActiveIndex(undefined)
    }


function toggleSpecsList () {
      setActiveIndex((val) => val === 0 ? undefined : 0)
      const newVal = !props.state.isSpecsListOpen

      state.setIsSpecsListOpen(newVal)
      props.eventManager.saveState({ ctIsSpecsListOpen: newVal })
    }


function focusSpecsList () {
      setActiveIndex(0)
      state.setIsSpecsListOpen(true)

      // a little trick to focus field on the next tick of event loop
      // to prevent the handled keydown/keyup event to fill input with "/"
      setTimeout(() => {
        searchRef.current?.focus()
      }, 0)
    }


function onReporterSplitPaneChange (newWidth: number) {
      state.updateReporterWidth(newWidth)
    }


function onPluginsSplitPaneChange (newHeight: number) {
      state.updatePluginsHeight(newHeight)
    }


function onSpecListPaneChange (newWidth: number) {
      state.updateSpecListWidth(newWidth)
    }


function persistWidth (prop: 'ctReporterWidth' | 'ctSpecListWidth') {
      return (newWidth: number) => {
        props.eventManager.saveState({ [prop]: newWidth })
      }
    }


function hideIfScreenshotting (callback: () => number) {
      if (state.screenshotting) {
        return 0
      }

      return callback()
    }


function hideReporterIfNecessary (callback: () => number) {
      if (state.screenshotting || !state.spec) {
        return 0
      }

      return callback()
    }


function hideSpecsListIfNecessary () {
      if (state.screenshotting || !props.state.isSpecsListOpen) {
        return true
      }

      return false
    }


(file: FileNode) => {
      setActiveIndex(0)
      state.setSingleSpec(props.state.specs.find((spec) => spec.absolute.includes(file.absolute)))
    }


(spec) => spec.absolute.includes(file.absolute)


() => {
      if (pluginRootContainer.current) {
        state.initializePlugins(config, pluginRootContainer.current)
      }
    }


() => {
      monitorWindowResize()
    }


() => {
      if (config.isTextTerminal) {
        state.setIsSpecsListOpen(false)
      }
    }


({ index }) => {
            onNavItemClick(index)
            const isOpen = !props.state.isSpecsListOpen

            state.setIsSpecsListOpen(isOpen)
            props.eventManager.saveState({ ctIsSpecsListOpen: isOpen })
          }


({ event, index }) => {
            if (!event.currentTarget || !event.currentTarget.href) {
              return
            }

            event.preventDefault()
            props.eventManager.reporterBus.emit('external:open', event.currentTarget.href)
          }


(val) => val === 0 ? undefined : 0


() => {
        searchRef.current?.focus()
      }


() => toggleSpecsList()


(newWidth: number) => {
        props.eventManager.saveState({ [prop]: newWidth })
      }


(props) => <div>{props.children}</div>


() => 100


() => 600


() => state.reporterWidth


(spec) => spec.relative.toLowerCase().includes(search.toLowerCase())


interface AppProps {
  state: State
  eventManager: typeof EventManager
  config: Cypress.RuntimeConfigOptions
}


hideIfScreenshotting(


persistWidth('ctSpecListWidth')


cs('primary', { 'isSpecsListClosed': !state


debounce(onSpecListPaneChange)


cs(styles


debounce(onPluginsSplitPaneChange)


// Interfaz de Usuarios
interface IUser {
  id: number;
  name: string;
  username: string;
  email: string;
}


() => {
	describe('constructor', () => {
		it('creates store with primary index', () => {
			let storage = new IndexedStore<Person>();
			expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);

			storage = new IndexedStore<Person>({ indexes: [] });
			expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
		});

		it('creates store with secondary indexes', () => {
			const indexes: Array<string> = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			expect(storage.indexes).to.be.containingAllOf(indexes.concat([PK_INDEX_NAME]));
		});
	});

	describe('values spec', () => {
		it('should return no values when storage is empty', () => {
			const storage = new IndexedStore<Person>();
			expect(storage.values.length).to.be.eq(0);
		});

		it('should return all values from storage', () => {
			const indexes = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			storage.insert(PersonsRepo);

			expect(storage.size).to.be.eq(PersonsRepo.length);
			expect(storage.values.length).to.be.eq(storage.size);
			expect(storage.values).to.be.containingAllOf(PersonsRepo);
		});
	});

	describe('iterator spec', () => {
		it('should iterate over no records when storage is empty', () => {
			const storage = new IndexedStore<Person>();
			let counter = 0;
			for (const _ of storage) {
				counter += 1;
			}
			expect(counter).to.be.eq(0);
		});

		it('should iterate over all records from storage', () => {
			const indexes = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			storage.insert(PersonsRepo);
			expect(storage.size).to.be.eq(PersonsRepo.length);

			const iterated = new Set<Person>();
			for (const record of storage) {
				iterated.add(record);
			}
			expect(iterated.size).to.be.eq(PersonsRepo.length);
		});
	});
}


() => {
		it('creates store with primary index', () => {
			let storage = new IndexedStore<Person>();
			expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);

			storage = new IndexedStore<Person>({ indexes: [] });
			expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
		});

		it('creates store with secondary indexes', () => {
			const indexes: Array<string> = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			expect(storage.indexes).to.be.containingAllOf(indexes.concat([PK_INDEX_NAME]));
		});
	}


() => {
			let storage = new IndexedStore<Person>();
			expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);

			storage = new IndexedStore<Person>({ indexes: [] });
			expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
		}


() => {
			const indexes: Array<string> = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			expect(storage.indexes).to.be.containingAllOf(indexes.concat([PK_INDEX_NAME]));
		}


() => {
		it('should return no values when storage is empty', () => {
			const storage = new IndexedStore<Person>();
			expect(storage.values.length).to.be.eq(0);
		});

		it('should return all values from storage', () => {
			const indexes = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			storage.insert(PersonsRepo);

			expect(storage.size).to.be.eq(PersonsRepo.length);
			expect(storage.values.length).to.be.eq(storage.size);
			expect(storage.values).to.be.containingAllOf(PersonsRepo);
		});
	}


() => {
			const storage = new IndexedStore<Person>();
			expect(storage.values.length).to.be.eq(0);
		}


() => {
			const indexes = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			storage.insert(PersonsRepo);

			expect(storage.size).to.be.eq(PersonsRepo.length);
			expect(storage.values.length).to.be.eq(storage.size);
			expect(storage.values).to.be.containingAllOf(PersonsRepo);
		}


() => {
		it('should iterate over no records when storage is empty', () => {
			const storage = new IndexedStore<Person>();
			let counter = 0;
			for (const _ of storage) {
				counter += 1;
			}
			expect(counter).to.be.eq(0);
		});

		it('should iterate over all records from storage', () => {
			const indexes = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			storage.insert(PersonsRepo);
			expect(storage.size).to.be.eq(PersonsRepo.length);

			const iterated = new Set<Person>();
			for (const record of storage) {
				iterated.add(record);
			}
			expect(iterated.size).to.be.eq(PersonsRepo.length);
		});
	}


() => {
			const storage = new IndexedStore<Person>();
			let counter = 0;
			for (const _ of storage) {
				counter += 1;
			}
			expect(counter).to.be.eq(0);
		}


() => {
			const indexes = Object.values(PersonIndexes);
			const storage = new IndexedStore<Person>({ indexes });
			storage.insert(PersonsRepo);
			expect(storage.size).to.be.eq(PersonsRepo.length);

			const iterated = new Set<Person>();
			for (const record of storage) {
				iterated.add(record);
			}
			expect(iterated.size).to.be.eq(PersonsRepo.length);
		}


(Standard: 15714 oder Testnetz: 25714)


(Standard: 15715 or Testnetz: 25715)


export class Empty implements ReadonlyHost {
  readonly capabilities: HostCapabilities = {
    synchronous: true,
  };

  read(path: Path): Observable<FileBuffer> {
    return throwError(new FileDoesNotExistException(path));
  }

  list(path: Path): Observable<PathFragment[]> {
    return of([]);
  }

  exists(path: Path): Observable<boolean> {
    return of(false);
  }

  isDirectory(path: Path): Observable<boolean> {
    return of(false);
  }

  isFile(path: Path): Observable<boolean> {
    return of(false);
  }

  stat(path: Path): Observable<Stats<{}> | null> {
    // We support stat() but have no file.
    return of(null);
  }
}


read(path: Path): Observable<FileBuffer> {
    return throwError(new FileDoesNotExistException(path));
  }


list(path: Path): Observable<PathFragment[]> {
    return of([]);
  }


exists(path: Path): Observable<boolean> {
    return of(false);
  }


isDirectory(path: Path): Observable<boolean> {
    return of(false);
  }


isFile(path: Path): Observable<boolean> {
    return of(false);
  }


stat(path: Path): Observable<Stats<{}> | null> {
    // We support stat() but have no file.
    return of(null);
  }


@Module({
  imports: [UtilsModule],
  providers: [XlsxWriterService],
  exports: [XlsxWriterService],
})
export class XlsxWriterModule {}


props => {
    const { size, withHoverEffect, color, margin, ...restProps } = props;
    return (
        <SvgIcon {...{ size, withHoverEffect, color, margin, ...restProps }}>
            <GeneralInformation390LineIconSvg {...restProps} width="1em" height="1em" />
        </SvgIcon>


u =>
    u
      .combine('storageClass', ['uniform', 'storage_r', 'storage_rw'] as const)
      .combine('vectorize', [undefined, 2, 3, 4] as const)


async t => {
    // [1]: Need to decide what the ground-truth is.
    const makeCase = (y: number, x: number): Case => {
      assert(x !== 0, 'atan2 is undefined for x = 0');
      return { input: [f32(y), f32(x)], expected: f32(Math.atan2(y, x)) };
    };

    const numeric_range = fullF32Range({
      neg_norm: 100,
      neg_sub: 10,
      pos_sub: 10,
      pos_norm: 100,
    }).filter(x => {
      return x !== 0;
    });

    const cases: Array<Case> = numeric_range.map(x => makeCase(0.0, x));
    numeric_range.forEach((y, y_idx) => {
      numeric_range.forEach((x, x_idx) => {
        if (x_idx >= y_idx) {
          cases.push(makeCase(y, x));
        }
      });
    });
    const cfg: Config = t.params;
    cfg.cmpFloats = ulpThreshold(4096);
    run(t, builtin('atan2'), [TypeF32, TypeF32], TypeF32, cfg, cases);
  }


(y: number, x: number): Case => {
      assert(x !== 0, 'atan2 is undefined for x = 0');
      return { input: [f32(y), f32(x)], expected: f32(Math.atan2(y, x)) };
    }


x => {
      return x !== 0;
    }


x => makeCase(0.0, x)


(y, y_idx) => {
      numeric_range.forEach((x, x_idx) => {
        if (x_idx >= y_idx) {
          cases.push(makeCase(y, x));
        }
      });
    }


(x, x_idx) => {
        if (x_idx >= y_idx) {
          cases.push(makeCase(y, x));
        }
      }


type BlockPoolDashboardContext = {
  obj: StoragePoolKind;
};


@Module({
  imports: [TypeOrmModule.forFeature([Post])],
  controllers: [PostsController],
  providers: [PostsService]
})
export class PostsModule {}


export declare type HasColumn<ColumnMapT extends ColumnMap, ColumnT extends IColumn> = (keyof ColumnMapT extends never ? false : ColumnMap extends ColumnMapT ? boolean : string extends ColumnT["name"] ? (string extends ColumnT["tableAlias"] ? (ReturnType<ColumnT["assertDelegate"]> extends ReturnType<ColumnUtil.FromColumnMap<ColumnMapT>["assertDelegate"]> ? boolean : false) : ColumnT["tableAlias"] extends ColumnUtil.FromColumnMap<ColumnMapT>["tableAlias"] ? (ReturnType<ColumnT["assertDelegate"]> extends ReturnType<{
    [columnName in Extract<keyof ColumnMapT, string>]: (ColumnT["tableAlias"] extends ColumnMapT[columnName]["tableAlias"] ? ColumnMapT[columnName]["assertDelegate"] : never);
}[Extract<keyof ColumnMapT, string>]> ? boolean : false) : false) : ColumnT["name"] extends keyof ColumnMapT ? (string extends ColumnT["tableAlias"] ? (ReturnType<ColumnT["assertDelegate"]> extends ReturnType<ColumnMapT[ColumnT["name"]]["assertDelegate"]> ? boolean : false) : ColumnT["tableAlias"] extends ColumnMapT[ColumnT["name"]]["tableAlias"] ? (ColumnT["name"] extends ColumnMapT[ColumnT["name"]]["name"] ? (ReturnType<ColumnT["assertDelegate"]> extends ReturnType<ColumnMapT[ColumnT["name"]]["assertDelegate"]> ? true : false) : false) : false) : false);


export default function ProductList() {
  const classes = useStyles();
  const [products, setProducts] = useState<Product[]>([]);
  const [previousCategoryId, setPreviousCategoryId] = useState<number>(0);
  const [isLoading, setIsLoading] = useState<boolean>(false);
  const [error, setError] = useState<Error | null>(null);
  const [state, dispatch] = useReducer(reducer, initialState);
  const { categoryId: categoryIdParam } = useParams();
  const categoryId: number = isNaN(categoryIdParam) ? 0 : Number(categoryIdParam);
  const [{ cartId }] = useCookies(['cartId']);
  const { enqueueSnackbar } = useSnackbar();

  useEffect(() => {
    if (!isLoading && categoryId > 0 && previousCategoryId !== categoryId) {
      setIsLoading(true);
      setError(null);
      client.listProductByCategory(categoryId)
        .then(response => response.json())
        .then(response => {
          if (Array.isArray(response)) {
            const newProducts: Product[] = response.map(product => new Product(
              product.id,
              product.categoryId,
              product.name,
              product.description,
              product.photo,
              product.price,
            ));
            setProducts(newProducts);
          }
        })
        .catch(error => {
          setProducts([]);
          setError(error)
        })
        .finally(() => {
          setIsLoading(false);
          setPreviousCategoryId(categoryId);
        })
    }
  }, [isLoading, categoryId, previousCategoryId]);

  const addProductToCart = (productId: number) => {
    dispatch(new Action(ActionType.AddToCart, productId));
    client.addProductToCart(cartId, productId)
      .then(response => {
        if (response.ok) {
          enqueueSnackbar('Product is added to cart', {
            autoHideDuration: 3000,
            variant: 'success',
            preventDuplicate: true,
          })
        } else {
          enqueueSnackbar('Failed when adding to cart', {
            autoHideDuration: 3000,
            variant: 'error',
            preventDuplicate: true,
          })
        }
      })
      .catch(error => {
        enqueueSnackbar('Sorry, something is broken', {
          autoHideDuration: 3000,
          variant: 'error',
          preventDuplicate: true,
        })
      })
      .finally(() => {
        dispatch(new Action(ActionType.MarkAsAdded, productId));
      })
  };

  const loadingContent = (
    <Grid item container justify="center" xs={12}>
      <CircularProgress />
    </Grid>
  );

  const content = products.map(product => (
    <Grid item xs={12} sm={6} md={4} key={product.id}>
      <Card className={classes.root}>
        <CardActionArea>
          <CardMedia
            className={classes.media}
            image={product.photo !== '' ? product.photo : 'https://sabbaytinh.com/media/original/no-image.png'}
            title={product.name}
          />
          <CardContent>
            <Typography gutterBottom variant="h5" component="h2">
              {product.name}
            </Typography>
            <Typography variant="body2" color="textPrimary" component="p" gutterBottom>
              {currencyFormatter.format(product.price)}
            </Typography>
            <Typography variant="body1" color="textSecondary" component="p">
              {product.description}
            </Typography>
          </CardContent>
        </CardActionArea>
        <CardActions>
          <Button size="small" color="primary" onClick={() => addProductToCart(product.id)}


(theme) => ({
  paper: {
    padding: theme.spacing(2),
    textAlign: 'center',
    color: theme.palette.text.secondary,
  },
  root: {
    maxWidth: 345,
  },
  media: {
    height: 140,
  },
})


() => {
    if (!isLoading && categoryId > 0 && previousCategoryId !== categoryId) {
      setIsLoading(true);
      setError(null);
      client.listProductByCategory(categoryId)
        .then(response => response.json())
        .then(response => {
          if (Array.isArray(response)) {
            const newProducts: Product[] = response.map(product => new Product(
              product.id,
              product.categoryId,
              product.name,
              product.description,
              product.photo,
              product.price,
            ));
            setProducts(newProducts);
          }
        })
        .catch(error => {
          setProducts([]);
          setError(error)
        })
        .finally(() => {
          setIsLoading(false);
          setPreviousCategoryId(categoryId);
        })
    }
  }


response => {
          if (Array.isArray(response)) {
            const newProducts: Product[] = response.map(product => new Product(
              product.id,
              product.categoryId,
              product.name,
              product.description,
              product.photo,
              product.price,
            ));
            setProducts(newProducts);
          }
        }


product => new Product(
              product.id,
              product.categoryId,
              product.name,
              product.description,
              product.photo,
              product.price,
            )


error => {
          setProducts([]);
          setError(error)
        }


() => {
          setIsLoading(false);
          setPreviousCategoryId(categoryId);
        }


(productId: number) => {
    dispatch(new Action(ActionType.AddToCart, productId));
    client.addProductToCart(cartId, productId)
      .then(response => {
        if (response.ok) {
          enqueueSnackbar('Product is added to cart', {
            autoHideDuration: 3000,
            variant: 'success',
            preventDuplicate: true,
          })
        } else {
          enqueueSnackbar('Failed when adding to cart', {
            autoHideDuration: 3000,
            variant: 'error',
            preventDuplicate: true,
          })
        }
      })
      .catch(error => {
        enqueueSnackbar('Sorry, something is broken', {
          autoHideDuration: 3000,
          variant: 'error',
          preventDuplicate: true,
        })
      })
      .finally(() => {
        dispatch(new Action(ActionType.MarkAsAdded, productId));
      })
  }


response => {
        if (response.ok) {
          enqueueSnackbar('Product is added to cart', {
            autoHideDuration: 3000,
            variant: 'success',
            preventDuplicate: true,
          })
        } else {
          enqueueSnackbar('Failed when adding to cart', {
            autoHideDuration: 3000,
            variant: 'error',
            preventDuplicate: true,
          })
        }
      }


error => {
        enqueueSnackbar('Sorry, something is broken', {
          autoHideDuration: 3000,
          variant: 'error',
          preventDuplicate: true,
        })
      }


() => {
        dispatch(new Action(ActionType.MarkAsAdded, productId));
      }


product => (
    <Grid item


menus => this.menus = menus


@Component({
  selector: 'app-menus',
  templateUrl: './menus.component.html',
  styleUrls: ['./menus.component.css']
})
export class MenusComponent implements OnInit {
  menus: Menu[];
  selectedMenu: Menu;

  constructor(private menuService: MenuService) { }

  ngOnInit() {
	  this.getMenus();
  }

  onSelect(menu: Menu): void {
    this.selectedMenu = menu;
  }

  getMenus(): void {
    this.menuService.getMenus().subscribe(menus => this.menus = menus);
  }

}


ngOnInit() {
	  this.getMenus();
  }


onSelect(menu: Menu): void {
    this.selectedMenu = menu;
  }


getMenus(): void {
    this.menuService.getMenus().subscribe(menus => this.menus = menus);
  }


() => {
  it('should create an instance', () => {
    let component = new IconsfontComponent();
    expect(component).toBeTruthy();
  });
}


() => {
    let component = new IconsfontComponent();
    expect(component).toBeTruthy();
  }


export async function createReviewComment(reviewId: string, body: CreateDto) {
  const stringValidator: StringValidator = new StringValidator();
  stringValidator.validate(reviewId, 'reviewId');

  const createValidator: CreateValidator = new CreateValidator();
  createValidator.validate(body, 'body');

  if (Config.mode === 'DEVELOPMENT') {
    console.log(`[DEVELOPMENT]: `);
    return {};
  }

  return await lite.request(
    'POST',
    `reviews/${reviewId}/comments`,
    { content: 'json' },
    { body }
  );
}


export async function getReviewComment(reviewId: string, commentId: string) {
  const stringValidator: StringValidator = new StringValidator();
  stringValidator.validate(reviewId, 'reviewId');
  stringValidator.validate(commentId, 'commentId');

  if (Config.mode === 'DEVELOPMENT') {
    console.log(`[DEVELOPMENT]: `);
    return {};
  }

  return await lite.request('GET', `reviews/${reviewId}/comments/${commentId}`);
}


export async function updateReviewComment(
  reviewId: string,
  commentId: string,
  body: UpdateOneByIdDto
) {
  const stringValidator: StringValidator = new StringValidator();
  stringValidator.validate(reviewId, 'reviewId');
  stringValidator.validate(commentId, 'commentId');

  const updateOneByIdValidator: UpdateOneByIdValidator = new UpdateOneByIdValidator();
  updateOneByIdValidator.validate(body, 'body');

  if (Config.mode === 'DEVELOPMENT') {
    console.log(`[DEVELOPMENT]: `);
    return {};
  }

  return await lite.request(
    'PATCH',
    `reviews/${reviewId}/comments/${commentId}`,
    { content: 'json' },
    {
      body,
    }
  );
}


export async function deleteReviewComment(reviewId: string, commentId: string) {
  const stringValidator: StringValidator = new StringValidator();
  stringValidator.validate(reviewId, 'reviewId');
  stringValidator.validate(commentId, 'commentId');

  if (Config.mode === 'DEVELOPMENT') {
    console.log(`[DEVELOPMENT]: `);
    return {};
  }

  return await lite.request(
    'DELETE',
    `reviews/${reviewId}/comments/${commentId}`
  );
}


//TODO: 서버 Dto에서 query가 비어있음
export async function getReviewComments(reviewId: string, query: any) {
  const stringValidator: StringValidator = new StringValidator();
  stringValidator.validate(reviewId, 'reviewId');

  return await lite.request(
    'GET',
    `reviews/${reviewId}/comments`,
    { content: 'json' },
    { query }
  );
}


result => {
            if (!result) {
                this.setValue(key, oldValue, { emitEvent: false });
            }
        }


(opt, i) => {
                            if (opt.value || opt.label) {
                                if (opt.value === optionToRemove || opt.label === optionToRemove) {
                                    index = i;
                                }
                            } else {
                                if (opt === optionToRemove) {
                                    index = i;
                                }
                            }
                        }


(opt, i) => {
                    if (opt.value || opt.label) {
                        if (opt.value === optionToRemove || opt.label === optionToRemove) {
                            index = i;
                        }
                    } else {
                        if (opt === optionToRemove) {
                            index = i;
                        }
                    }
                }


(query) => {
                        if (config.optionsPromise) {
                            return config.optionsPromise(query, this.http);
                        }
                        return new Promise((resolve, reject) => {
                            let url = config.optionsUrlBuilder ? config.optionsUrlBuilder(query) : `${config.optionsUrl}?filter=${query || ''}`;
                            if (query && query.length) {
                                this.http
                                    .get(url)
                                    .map(res => {
                                        if (res.json) {
                                            return res.json();
                                        }
                                        return res;
                                    })
                                    .map(results => {
                                        if (mapper) {
                                            return results.map(mapper);
                                        }
                                        return results;
                                    })
                                    .subscribe(resolve, reject);
                            } else {
                                resolve([]);
                            }
                        });
                    }


(resolve, reject) => {
                            let url = config.optionsUrlBuilder ? config.optionsUrlBuilder(query) : `${config.optionsUrl}?filter=${query || ''}`;
                            if (query && query.length) {
                                this.http
                                    .get(url)
                                    .map(res => {
                                        if (res.json) {
                                            return res.json();
                                        }
                                        return res;
                                    })
                                    .map(results => {
                                        if (mapper) {
                                            return results.map(mapper);
                                        }
                                        return results;
                                    })
                                    .subscribe(resolve, reject);
                            } else {
                                resolve([]);
                            }
                        }


res => {
                                        if (res.json) {
                                            return res.json();
                                        }
                                        return res;
                                    }


results => {
                                        if (mapper) {
                                            return results.map(mapper);
                                        }
                                        return results;
                                    }


() => {
                    this.setLoading(key, false);
                    this.displayTip(key, this.labels.asyncFailure, 'info', false);
                    this.setProperty(key, '_displayedAsyncFailure', true);
                }


(fieldset, fi) => {
                fieldset.controls.forEach((fieldsetControl, ci) => {
                    if (fieldsetControl.key === key) {
                        fieldsetIndex = fi;
                        controlIndex = ci;
                    }
                });
            }


(fieldsetControl, ci) => {
                    if (fieldsetControl.key === key) {
                        fieldsetIndex = fi;
                        controlIndex = ci;
                    }
                }


() => func()


public isActiveControlValid(): boolean {
        return !!this.getValue(this.currentKey);
    }


public getActiveControl(): NovoFormControl {
        return this.getControl(this.currentKey);
    }


public getActiveKey(): string {
        return this.currentKey;
    }


public getActiveValue(): any {
        return this.getValue(this.currentKey);
    }


public getActiveInitialValue(): any {
        return this.getInitialValue(this.currentKey);
    }


public getControl(key: string): NovoFormControl {
        if (!key) {
            console.error('[FieldInteractionAPI] - invalid or missing "key"'); // tslint:disable-line
            return null;
        }

        let control = this.form.controls[key];
        if (!control) {
            console.error('[FieldInteractionAPI] - could not find a control in the form by the key --', key); // tslint:disable-line
            return null;
        }

        return (control as NovoFormControl);
    }


public getValue(key: string): any {
        let control = this.getControl(key);
        if (control) {
            return control.value;
        }
        return null;
    }


public getRawValue(key: string): any {
        let control = this.getControl(key);
        if (control) {
            return control.rawValue;
        }
        return null;
    }


public getInitialValue(key: string): any {
        let control = this.getControl(key);
        if (control) {
            return control.initialValue;
        }
        return null;
    }


public setValue(key: string, value: any, options?: {
        onlySelf?: boolean,
        emitEvent?: boolean,
        emitModelToViewChange?: boolean,
        emitViewToModelChange?: boolean
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.setValue(value, options);
        }
    }


public patchValue(key: string, value: any, options?: {
        onlySelf?: boolean,
        emitEvent?: boolean,
        emitModelToViewChange?: boolean,
        emitViewToModelChange?: boolean
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.setValue(value, options);
        }
    }


public setReadOnly(key: string, isReadOnly: boolean): void {
        let control = this.getControl(key);
        if (control) {
            control.setReadOnly(isReadOnly);
        }
    }


public setRequired(key: string, required: boolean): void {
        let control = this.getControl(key);
        if (control) {
            control.setRequired(required);
        }
    }


public hide(key: string, clearValue: boolean = true): void {
        let control = this.getControl(key);
        if (control) {
            control.hide(clearValue);
            this.disable(key, { emitEvent: false });
        }
    }


public show(key: string): void {
        let control = this.getControl(key);
        if (control) {
            control.show();
            this.enable(key, { emitEvent: false });
        }
    }


public disable(key: string, options?: {
        onlySelf?: boolean;
        emitEvent?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.disable(options);
        }
    }


public enable(key: string, options?: {
        onlySelf?: boolean;
        emitEvent?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.enable(options);
        }
    }


public markAsInvalid(key: string, validationMessage?: string): void {
        let control = this.getControl(key);
        if (control) {
            if (control) {
                control.markAsInvalid(validationMessage);
            }
        }
    }


public markAsDirty(key: string, options?: {
        onlySelf?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.markAsDirty(options);
        }
    }


public markAsPending(key: string, options?: {
        onlySelf?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.markAsPending(options);
        }
    }


public markAsPristine(key: string, options?: {
        onlySelf?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.markAsPristine(options);
        }
    }


public markAsTouched(key: string, options?: {
        onlySelf?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.markAsTouched(options);
        }
    }


public markAsUntouched(key: string, options?: {
        onlySelf?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.markAsUntouched(options);
        }
    }


public updateValueAndValidity(key: string, options?: {
        onlySelf?: boolean;
        emitEvent?: boolean;
    }): void {
        let control = this.getControl(key);
        if (control) {
            control.updateValueAndValidity(options);
        }
    }